Howdy!
I'm running current CVS on Linux (Debian 64-bit) here. I've noticed that the QWKnet call-out semaphores are working, the recycle
semaphore is not. Is there a change in how things get reloaded?
-rw-r--r-- 1 sbbs sbbs 0 Mar 20 16:08 ctrl/recycle
sbbs@home:~$ date
Thu Mar 21 12:13:18 PDT 2019
That's awhile for the semaphore to sit around, it seems?
If the file is touched/updated and the BBS doesn't recycle, it could be a number of things, but the log output should reflect the detection of the
If the file is touched/updated and the BBS doesn't recycle, it could be a number of things, but the log output should reflect the detection of the semaphore file unless the "NO_RECYCLE" option flag is set in the [BBS] section of your ctrl/sbbs.ini file.
Re: Recycle semaphore?an
By: Digital Man to Va7aqd on Thu Mar 21 2019 01:38 pm
If the file is touched/updated and the BBS doesn't recycle, it could be number of things, but the log output should reflect the detection of the semaphore file unless the "NO_RECYCLE" option flag is set in the [BBS] section of your ctrl/sbbs.ini file.
After playing around with things for a few more days, I seem to be having
issue with the terminal serviceWeb
recycling. The logging shows detection of the recycle semaphore and the
and FTP services recycle, but the
terminal services do not, and I am guessing a large portion of SBBS itself doesn't, as things like newly added
message bases or external programs, etc., are not showing up until I completely restart SBBS.
There aren't any errors being thrown in to the logs, things just don't appear to be happening.
If this is not the expected behaviour, what kind of information could I supply on this?
The terminal server cannot recycle until there are:
1. no nodes in use
2. no foreground events (e.g. timed events) running in the event thread
Your log output will tell you what's happening.
It sounds like if there were a stuck event I should see some fairly constant logging about it?
Re: Recycle semaphore?
By: Digital Man to Va7aqd on Mon Mar 25 2019 06:47 pm
The terminal server cannot recycle until there are:
1. no nodes in use
2. no foreground events (e.g. timed events) running in the event thread
Your log output will tell you what's happening.
Unfortunately, the logs aren't being terribly helpful, from what I can see.
Currently the terminal server seems to be waiting to recycle - all nodes have an [R] status - and will have been that way overnight.
As far as the
log goes, it's not reporting on any event doing any work aside from the events that are coming up and finishing as things come along here.
I could post the logs somewhere if that would be useful - or if there's something in particular I should be seeing in the logs that would explain this, I'd be greatful to know what, exactly. It sounds like if there were stuck event I should see some fairly constant logging about it?
Perhaps it's useful to compare your log output with what a successful recycle looks like (as far terminal server log messages). This is a
How many nodes is "all nodes"? What do you have set for the FirstNode and LastNode values in the [bbs] section of you ctrl/sbbs.ini file?
So long as you can see when the last event completed and it's still executing new events, then the event thread isn't the problem.
What OS are you running? If *nix, then whether or not you run as root and change user-IDs (configured in the [unix] section of sbbs.ini) and ifLinux,
what version, all these things play a role in whether or not recycling is supported.
How are you initiating the recycle?
Re: Recycle semaphore?different,
By: Digital Man to Va7aqd on Tue Mar 26 2019 04:05 pm
Perhaps it's useful to compare your log output with what a successful recycle looks like (as far terminal server log messages). This is a
Thank you for providing that log output - mine is definitely very
with just web & FTP services noticing the recycle and recycling.
andHow many nodes is "all nodes"? What do you have set for the FirstNode
LastNode values in the [bbs] section of you ctrl/sbbs.ini file?
7 nodes total, FirstNode = 1, LastNode = 7
andSo long as you can see when the last event completed and it's still executing new events, then the event thread isn't the problem.
That's good to know, I believe there's no issue with the event thread then.
What OS are you running? If *nix, then whether or not you run as root
ischange user-IDs (configured in the [unix] section of sbbs.ini) and if Linux,
what version, all these things play a role in whether or not recycling
supported.
Debian stretch. SBBS is started as a service via systemd and is set to use the sbbs user & group in sbbs.ini as well as in the sbbs.service systemd services unit file. The information from Synchro's wiki was used and systemd runs the setcap service binding fix on /sbbs/src/sbbs3/gcc.linux.x64.exe.release/sbbs on each run.
How are you initiating the recycle?
scfg seems to trigger it itself, and the same behaviour is seen when I simply 'touch ctrl/recycle'.
So, yes, just doing it again right now I get the "Recycle semaphore file (/sbbs/ctrl/recycle) detected" log lines from the ftp and web servicesonly.
The example I supplied was for sbbsctrl/Windows and I was just clicking the "recycle" button, so I would expect it to appear somewhat different.
Are any of the nodes in use at that time? Perhaps run "/sbbs/exec/nodelist"
to be sure that all the nodes are in a recycleable state.
scfg seems to trigger it itself, and the same behaviour is seen when I simply 'touch ctrl/recycle'.Well they shouldn't be exactly the same (in regards to log output, node status).
So, yes, just doing it again right now I get the "Recycle semaphore file (/sbbs/ctrl/recycle) detected" log lines from the ftp and web services only.
That's unexpected. Is it possible you have the NO_RECYCLE option flag set for one or more sections of your ctrl/sbbs.ini file?
Re: Recycle semaphore?services
By: Digital Man to Va7aqd on Thu Mar 28 2019 12:58 am
The example I supplied was for sbbsctrl/Windows and I was just clicking the
"recycle" button, so I would expect it to appear somewhat different.
Sure, that makes sense. The parts that I mean are vastly different is the terminal services restarting, which doesn't happen here on my node.
Are any of the nodes in use at that time? Perhaps run "/sbbs/exec/node list"
to be sure that all the nodes are in a recycleable state.
"Waiting for connection" on all is currently by far the most common state. At this point I'm the only user on my system.
scfg seems to trigger it itself, and the same behaviour is seen when simply 'touch ctrl/recycle'.Well they shouldn't be exactly the same (in regards to log output, node status).
I will post the log output for each of these.
So, yes, just doing it again right now I get the "Recycle semaphore file
(/sbbs/ctrl/recycle) detected" log lines from the ftp and web
setonly.
That's unexpected. Is it possible you have the NO_RECYCLE option flag
for one or more sections of your ctrl/sbbs.ini file?
Definitely not:
sbbs@home:~$ grep -i RECYC ctrl/sbbs.ini
; NO_RECYCLE
; NO_RECYCLE - Don't allow server recycles
; NO_RECYCLE
; NO_RECYCLE
After playing around with things for a few more days, I seem to be havingan
issue with the terminal serviceWeb
recycling. The logging shows detection of the recycle semaphore and the
It's option value to be set automatically by sbbs. What is "Initializing on ... with options" value from the log of your various servers (during startup)?
If bit 27 is set, that means "No recycling is supported".
Are you running on CentOS by chance?
Re: Recycle semaphore?
By: Digital Man to Va7aqd on Sat Mar 30 2019 09:15 pm
It's option value to be set automatically by sbbs. What is "Initializing on
... with options" value from the log of your various servers (during startup)?
If bit 27 is set, that means "No recycling is supported".
OK, that's definitely it - Is there a way I can discover why that might be getting set? I upped the log level to debug and didn't see anything interesting explaining this particular item.
Mar 29 10:49:03 home synchronet: mail Initializing on Fri Mar 29 10:49:03 2019 with options: 68804624
Mar 29 10:49:03 home synchronet: srvc Initializing on Fri Mar 29 10:49:03 2019 with options: 8000800
Mar 29 10:49:03 home synchronet: term Initializing on Fri Mar 29 10:49:03 2019 with options: 8001022
Those seem to be the 3 services that have bit 27 set.
In order for sbbs to set that option flag (sbbscon.c, around line 2050), you'd have to not have linux "capabilities" installed. Do you have thefile
/usr/include/sys/capability.h ?
Re: Recycle semaphore?now
By: Digital Man to Va7aqd on Mon Apr 01 2019 01:15 am
In order for sbbs to set that option flag (sbbscon.c, around line 2050), you'd have to not have linux "capabilities" installed. Do you have the file /usr/include/sys/capability.h ?
OK, getting closer - I believe when I installed I realised there wasn't currently a Debian package "libcap2-dev" so continued on to see how things would go. I see it's now called "libcap-dev", so that's installed and I
have /usr/include/sys/capability.his
I did a CVS update and have rebuilt pretty much everything, but recycling
still being disabled and I am still not quite sure why - this is what's showing in the logs now, though:or
Apr 1 11:14:57 home synchronet: The process 12989 was given capabilities = cap_net_bind_service+ep
Apr 1 11:14:57 home synchronet: linux_initialprivs() FAILED
Apr 1 11:14:57 home synchronet: Verify the following kernel module is loaded [See insmod(8)]: capability
There doesn't seem to be a 'capability' kernel module for either the 3.16
4.9 kernels on the system.
So.. I suspect that either I need to do something further on the re-compiling, or add something on to the system?
It sounds like you're missing some kernel module associated with capabilities. Sorry, I don't know more than that (I didn't write this portion of the code, Deuce did). I don't seem to have any modules with"cap"
in the name installed/running on my Debian systems, yet the capabiliteswork
fine.
Re: Recycle semaphore?
By: Digital Man to Va7aqd on Mon Apr 01 2019 04:14 pm
It sounds like you're missing some kernel module associated with capabilities. Sorry, I don't know more than that (I didn't write this portion of the code, Deuce did). I don't seem to have any modules with "cap"
in the name installed/running on my Debian systems, yet the capabilites work
fine.
OK, I think I have things sorted, but much of what was wrong seems to be with
the suggestions
in the documentation (and that's no complaint about the docs at all - there's tons of great info in the wiki). Specifically, it looks like SBBS should be started as
root as it drops
privileges and runs as the user defined in ctrl/sbbs.ini appropriately.
However, in the wiki
docs, and I would point the finger mostly at the systemd page, which gives an
example with
systemd starting it as a non-root user & group.
When doing an
strace on sbbs when starting (and complaining about it's inability to recycle),
it looks like
it's checking other capabilities (though I'm not familiar with granting capabilities this way,
so I'm just guessing on what this means):
it needs, but it appears that "setcap 'cap_net_bind_service=ep'" isn't enough.
Someone contributed that wiki page. You can certainly update it to clarify your findings.
It seems to work for people. I don't personally use that method, so I can't vouch for it.
How does one get an account to edit the wiki? Does it authenticateagainst
Vertrauen?
How does one get an account to edit the wiki? Does it authenticate against Vertrauen?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 63:23:41 |
Calls: | 6,654 |
Files: | 12,200 |
Messages: | 5,331,697 |