[systemd-bugs] [Bug 61324] New: systemd implicitly depends on all compatible syslog daemons to support the "-n" switch for foreground mode

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Feb 22 17:55:50 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=61324

          Priority: medium
            Bug ID: 61324
          Assignee: systemd-bugs at lists.freedesktop.org
           Summary: systemd implicitly depends on all compatible syslog
                    daemons to support the "-n" switch for foreground mode
        QA Contact: systemd-bugs at lists.freedesktop.org
          Severity: major
    Classification: Unclassified
                OS: Linux (All)
          Reporter: nsane457 at gmail.com
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: unspecified
         Component: general
           Product: systemd

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

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130223/07a22d2e/attachment.html>


More information about the systemd-bugs mailing list