[systemd-devel] rsyslog not starting inside a namespace when started using systemd.

Navneet Sinha nnavneetsinha1001 at gmail.com
Mon Dec 14 08:11:33 PST 2015


Just to add here:
Just before starting rsyslog I do a "systemctl --system daemon-reload ", as
I need to update the change in unit file, which I made. Here are some more
logs:

[  167.635681] systemd[1]: Reloading.
[  168.024463] systemd[1]: Stopping System Logging Service...
[  168.050426] systemd[1]: Starting System Logging Service...
[  168.072309] systemd[1]: Started System Logging Service.
[  168.100264] systemd[1]: rsyslog.service: main process exited,
code=exited, status=1/FAILURE
[  168.100387] systemd[1]: Unit rsyslog.service entered failed state.
[  168.100667] systemd[1]: Starting System Logging Service...
[  168.116240] systemd[1]: Started System Logging Service.
[  168.120085] systemd[1]: rsyslog.service: main process exited,
code=exited, status=1/FAILURE
[  168.147818] systemd[1]: Unit rsyslog.service entered failed state.
[  168.148077] systemd[1]: Starting System Logging Service...
[  168.164080] systemd[1]: Started System Logging Service.
[  168.169355] systemd[1]: rsyslog.service: main process exited,
code=exited, status=1/FAILURE
[  168.188378] systemd[1]: Unit rsyslog.service entered failed state.
[  168.188627] systemd[1]: Starting System Logging Service...
[  168.199284] strata-dma: module installed
[  168.204244] systemd[1]: Started System Logging Service.
[  168.223473] systemd[1]: rsyslog.service: main process exited,
code=exited, status=1/FAILURE
[  168.239790] systemd[1]: Unit rsyslog.service entered failed state.
[  168.240041] systemd[1]: Starting System Logging Service...
[  168.264078] systemd[1]: Started System Logging Service.
[  168.289038] systemd[1]: rsyslog.service: main process exited,
code=exited, status=1/FAILURE
[  168.303725] systemd[1]: Unit rsyslog.service entered failed state.
[  168.303988] systemd[1]: Starting System Logging Service...
[  168.304022] systemd[1]: rsyslog.service start request repeated too
quickly, refusing to start.
[  168.304096] systemd[1]: Unit syslog.socket entered failed state.
[  168.304167] systemd[1]: Failed to start System Logging Service.

It just keeps on restarting and then eventually fails.

Thanks
Navneet


On Mon, Dec 14, 2015 at 9:12 PM, Navneet Sinha <nnavneetsinha1001 at gmail.com>
wrote:

> I don't know whether this is the right place to talk about this.
>
> Here is my rsyslog.service file.
>
>     [Unit] Description=System Logging Service
>
>     [Service]
>     EnvironmentFile=-/etc/sysconfig/rsyslog
>     ExecStart=/sbin/ip netns exec $NSNAME /sbin/rsyslogd -n
>     Sockets=syslog.socket
>     StandardOutput=null
>
>     [Install]
>     WantedBy=multi-user.target
>     Alias=syslog.service
>
> Here is the environment file:
>
>     # NOTE NOTE NOTE NOTE NOTE
>     #
>     # This file is AUTO-GENERATED based on the system's configuration.
>     # Any modifications you make to this file will be lost when the
>     # system's configuration is changed, e.g. from the CLI.
>     #
>
>     SYSLOGD_OPTIONS=""
>     NSNAME="default"
>
>     # End of auto-generated file
>
> When, systemd tries to start this service during boot up of my machine.
> I see following debug logs:
>
>     'About to execute /sbin/ip netns exec $NSNAME /sbin/rsyslogd -n\n'
>     'Forked /sbin/ip as 2794\n'
>     'rsyslog.service changed dead -> running\n'
>     'Job rsyslog.service/start finished, result=done\n'
>     'Got D-Bus request: org.freedesktop.systemd1.Manager.GetUnit() on
> /org/freedesktop/systemd1\n'
>     'Got D-Bus request: org.freedesktop.DBus.Properties.Get() on
> /org/freedesktop/systemd1/unit/rsyslog_2eservice\n'
>     'Got D-Bus request: org.freedesktop.DBus.Local.Disconnected() on
> /org/freedesktop/DBus/Local\n'
>     'Accepted connection on private bus.\n'
>     'Got D-Bus request: org.freedesktop.systemd1.Agent.Released() on
> /org/freedesktop/systemd1/agent\n'
>     'Got D-Bus request: org.freedesktop.DBus.Local.Disconnected() on
> /org/freedesktop/DBus/Local\n'
>     'Accepted connection on private bus.\n'
>     'Received SIGCHLD from PID 2794 (ip).\n'
>     'Got SIGCHLD for process 2794 (ip)\n'
>     'Child 2794 died (code=exited, status=1/FAILURE)\n'
>     'Child 2794 belongs to rsyslog.service\n'
>     'rsyslog.service: main process exited, code=exited, status=1/FAILURE\n'
>     'rsyslog.service changed running -> failed\n'
>     'Unit rsyslog.service entered failed state.\n'
>
>
> ***why it fails to start, why pid 2794 receives the SIGCHLD ?***
> *Any ideas ? I am unable to think on what to check next.*
>
> systemd version : systemd-201-2.fc18.9.i686
>
> rsyslog version : rsyslog-7.2.6
>
> Before changing to systemd, I had rsyslog initscript in /etc/init.d/ to
> start up rsyslog during boot up. Just in case, someone wants to take a look
> at it. Here is the main part of the initscript, which I changed an made a
> systemd service
>
>     #!/bin/bash
>     #
>     # rsyslog        Startup script for rsyslog.
>     #
>     # chkconfig: 2345 12 88
>     # description: Syslog is the facility by which many daemons use to log
> \
>     # messages to various system log files.  It is a good idea to always \
>     # run rsyslog.
>     ### BEGIN INIT INFO
>     # Provides: $syslog
>     # Required-Start: $local_fs
>     # Required-Stop: $local_fs
>     # Default-Start:  2 3 4 5
>     # Default-Stop: 0 1 6
>     # Short-Description: Enhanced system logging and kernel message
> trapping daemons
>     # Description: Rsyslog is an enhanced multi-threaded syslogd
> supporting,
>     #              among others, MySQL, syslog/tcp, RFC 3195, permitted
>     #              sender lists, filtering on any message part, and fine
>     #              grain output format control.
>     ### END INIT INFO
>
>
>     # Source function library.
>     . /etc/init.d/functions
>
>     RETVAL=0
>     PIDFILE=/var/run/syslogd.pid
>
>     prog=rsyslog
>     exec=/sbin/rsyslogd
>     lockfile=/var/lock/subsys/$prog
>
>     # Source config
>     if [ -f /etc/sysconfig/$prog ] ; then
>         . /etc/sysconfig/$prog
>     fi
>
>     start() {
>             [ -x $exec ] || exit 5
>
>             umask 077
>
>             echo -n $"Starting system logger: "
>             sudo $NETNS_EXEC $exec -i "${PIDFILE}" $SYSLOGD_OPTIONS
>             RETVAL=$?
>             echo
>             [ $RETVAL -eq 0 ] && touch $lockfile
>             return $RETVAL
>     }
>     stop() {
>            echo -n $"Shutting down system logger: "
>            killproc -p "${PIDFILE}" $exec
>            RETVAL=$?
>            echo
>            [ $RETVAL -eq 0 ] && rm -f $lockfile
>            return $RETVAL
>     }
>     rhstatus() {
>            status -p "${PIDFILE}" $exec
>     }
>     restart() {
>            stop
>            start
>     }
>
>
> Any help will be appreciated. Kindly, help.
>
> Thanks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151214/7ecec356/attachment-0001.html>


More information about the systemd-devel mailing list