When I was using Debian with SysV Init, I ran Synchronet as daemon and it logged to syslog perfectly. However, since I moved to Ubuntu and systemd, whatever I run sbbs with nd and syslog parameters together I get duplicated syslog entries. The executed command line is:
/sbbs/exec/sbbs nd syslog
And in the syslog I can see things like:
Dec 12 22:42:35 HISPAMSX sbbs: srvc 0018 closing Gopher socket on port 70 Dec 12 22:42:35 HISPAMSX sbbs: 12/12 22:42:35 srvc 0018 closing Gopher socket on port 70
Notice the duplicated entrie has a date that could be the clue for what's happening.
If I run "/sbbs/exec/sbbs d syslog" I don't get the duplicated entries. However, systemd doesn't play nice with Synchronet daemonized.
I have discarded wrong syslog configuration ussing "logger".
$ logger -p local3.info "This is a Facility 3 test"
The message is logged just once.
Remember:
sbbs d syslog -> Logging correctly, just once. Doesn't work with systemd. sbbs nd syslog -> Duplicated syslog entries. Works nice with systemd.
Could it be a bug? Taking a look at the code:
==== sbbscon.c
if (is_daemon || syslog_always) { <- NOT daemon, SYSLOG, enter condition
if(str==NULL) <- It's not null
return(0);
if (std_facilities) <- Not clear to me this condition
syslog(level|LOG_AUTH,"%s",str); <- Ok, logging once
else
syslog(level,"term %s",str); <----- Ok, logging once
if(is_daemon)
return(strlen(str)); <- It's not, shouldn't be returning anything
}
So it's not clear to me what could be happening... Any ideas?
Remember:
sbbs d syslog -> Logging correctly, just once. Doesn't work with
systemd.
sbbs nd syslog -> Duplicated syslog entries. Works nice with
systemd.
Could it be a bug? Taking a look at the code:
It sounds like you're running Synchronet as a daemon, but not *telling* sbbs to daemonize. That is not a supported setup. Others are running Synchronet correctly daemonized with systemd just fine, so I think it is possible. So you need to get sbbs working *with* the daemonize option and your dupliate syslog output will stop.
There is a lot of people in the forums with problems like the one you are describing. Fortunately, this was not the case, as I just had to run SBBSin
daemonized mode with systemd Unit file as "Type=forking". This solved the issue.
I'm not sure what forums you're referring to, but I hadn't even thought of that. When I originally made my service file (awhile before you created the page on the wiki), I was already using forking. Sorry I couldn't have been more help.
| Sysop: | Winzlo |
|---|---|
| Location: | Minnesota, USA |
| Users: | 11 |
| Nodes: | 16 (0 / 16) |
| Uptime: | 495937:26:32 |
| Calls: | 82 |
| Files: | 1,070 |
| D/L today: |
27 files (11,920K bytes) |
| Messages: | 286,956 |