Bug 61324 - systemd implicitly depends on all compatible syslog daemons to support the "-n" switch for foreground mode
Summary: systemd implicitly depends on all compatible syslog daemons to support the "-...
Status: RESOLVED MOVED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-23 01:55 UTC by P. Levine
Modified: 2013-02-27 00:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description P. Levine 2013-02-23 01:55:50 UTC
systemctl would fail to start syslog-ng.service with the following journal debug output:

...
Feb 22 16:00:43 Laptop-PC systemd[1]: Starting System Logging Service...
Feb 22 16:00:43 Laptop-PC systemd[1]: About to execute /usr/sbin/syslog-ng -n
Feb 22 16:00:43 Laptop-PC systemd[1]: Forked /usr/sbin/syslog-ng as 5167
Feb 22 16:00:43 Laptop-PC systemd[1]: syslog-ng.service changed failed -> running
Feb 22 16:00:43 Laptop-PC systemd[1]: Job syslog-ng.service/start finished, result=done
Feb 22 16:00:43 Laptop-PC systemd[1]: Started System Logging Service.
Feb 22 16:00:43 Laptop-PC systemd[1]: Accepted connection on private bus.
Feb 22 16:00:43 Laptop-PC systemd[1]: Got D-Bus request: org.freedesktop.systemd1.Ag...ent
Feb 22 16:00:43 Laptop-PC systemd[1]: Received SIGCHLD from PID 5167 (syslog-ng).
Feb 22 16:00:43 Laptop-PC systemd[1]: Got SIGCHLD for process 5167 (syslog-ng)
Feb 22 16:00:43 Laptop-PC systemd[1]: syslog-ng.service: main process exited, code=e...URE
Feb 22 16:00:43 Laptop-PC systemd[1]: Got D-Bus request: org.freedesktop.DBus.Local....cal
Feb 22 16:00:43 Laptop-PC systemd[1]: Child 5167 died (code=exited, status=1/FAILURE)
Feb 22 16:00:43 Laptop-PC systemd[1]: Child 5167 belongs to syslog-ng.service
Feb 22 16:00:43 Laptop-PC systemd[1]: syslog.socket got notified about service death...no)
Feb 22 16:00:43 Laptop-PC systemd[1]: syslog.socket changed running -> listening
Feb 22 16:00:43 Laptop-PC systemd[1]: syslog-ng.service changed running -> failed
Feb 22 16:00:43 Laptop-PC systemd[1]: Unit syslog-ng.service entered failed state
Feb 22 16:00:43 Laptop-PC systemd[1]: Incoming traffic on syslog.socket
Feb 22 16:00:43 Laptop-PC systemd[1]: Trying to enqueue job syslog-ng.service/start/...ace
Feb 22 16:00:43 Laptop-PC systemd[1]: Installed new job syslog-ng.service/start as 2745
Feb 22 16:00:43 Laptop-PC systemd[1]: Enqueued job syslog-ng.service/start as 2745
Feb 22 16:00:43 Laptop-PC systemd[1]: syslog.socket changed listening -> running
...


In spite of the line "ExecStart=/usr/sbin/syslog-ng -F" in syslog-ng.service file, the journal line "About to execute /usr/sbin/syslog-ng -n" implies it was ignoring the "-F" flag.

The syslog-ng daemon doesn't support the "-n" flag (at least not version >=3.4.1). "/usr/sbin/syslog-ng -n; echo $?" returns 1, corresponding to the journal output "code=exited, status=1/FAILURE".

To test if this was the problem, I altered the gprocess.c file in the syslog-ng source to accept "-n", instead of "-F", to enable foregrounding.
After recompiling and installing, syslog-ng.service started and remained active without a problem.
The journal output is:

...
Feb 22 20:46:23 Laptop-PC systemd[1]: syslog-ng.service changed dead -> running
Feb 22 20:46:23 Laptop-PC systemd[1]: Job syslog-ng.service/start finished, result=done
Feb 22 20:46:23 Laptop-PC systemd[1]: Incoming traffic on syslog.socket
Feb 22 20:46:23 Laptop-PC systemd[1]: syslog.socket changed listening -> running
Feb 22 20:46:23 Laptop-PC systemd[1]: Accepted connection on private bus.
Feb 22 20:46:23 Laptop-PC systemd[1]: Got D-Bus request: org.freedesktop.DBus.Local.Disconnected()
Feb 22 20:46:23 Laptop-PC systemd[1]: Got D-Bus request: org.freedesktop.systemd1.Agent.Released()
Feb 22 20:46:23 Laptop-PC systemd[1]: Got D-Bus request: org.freedesktop.DBus.Local.Disconnected()
...

The following is version info:
Laptop-PC ~ # journalctl --version
systemd 197
+PAM +LIBWRAP -AUDIT -SELINUX +IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ

Laptop-PC ~ # syslog-ng --version
syslog-ng 3.4.1
Installer-Version: 3.4.1
Revision: 
Compile-Date: Feb 22 2013 19:58:31
Available-Modules: cryptofuncs,system-source,syslogformat,json-plugin,afsocket,afprog,afsocket-tls,afsocket-notls,basicfuncs,dbparser,afuser,confgen,affile,afsql,csvparser,afamqp
Enable-Debug: off
Enable-GProf: off
Enable-Memtrace: off
Enable-IPv6: on
Enable-Spoof-Source: off
Enable-TCP-Wrapper: on
Enable-Linux-Caps: off
Enable-Pcre: on
Comment 1 P. Levine 2013-02-27 00:40:05 UTC
Closing bug.

Refiled at https://bugs.freedesktop.org/show_bug.cgi?id=61535


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.