I don't know who to blame for this exactly (killproc and daemon from /etc/init.d/functions or rsyslog only), but also stop fails sometimes and a restart left me with this :
ps -elf | grep rsysl 4 S root 29338 29089 0 76 0 - 18626 - 11:45 pts/1 00:00:00 vi /etc/init.d/rsyslog 0 S root 30801 1 0 84 0 - 11196 futex_ 11:54 pts/0 00:00:00 /sbin/rsyslogd -i /var/run/rsyslogd.pid 5 Z root 30803 30801 0 78 0 - 0 exit 11:54 ? 00:00:00 [rsyslogd] <defunct> 5 S root 31010 1 0 82 0 - 23488 - 11:56 ? 00:00:00 /sbin/rsyslogd -i /var/run/rsyslogd.pid 4 S root 31019 22228 0 78 0 - 15308 pipe_w 11:56 pts/0 00:00:00 grep rsysl In the logs rsyslog prints this: [origin software="rsyslogd" swVersion="8.2.2" x-pid="30803" x-info=" http://www.rsyslog.com"] exiting on signal 15. But after that, the stop function prints failed and the process is now a zombie. How I fixed it here: I replace the daemon call from the init script with this: (kill -0 $(cat "${PIDFILE}")) &> /dev/null || $exec -i "${PIDFILE}" $SYSLOGD_OPTIONS </dev/null &>/dev/null & sleep 2 kill -0 $(cat "${PIDFILE}") but because the process never forks, I get 2 instances (child and parent), but everything seems to work correctly 1 S root 2301 1 0 85 0 - 16523 wait 12:20 ? 00:00:00 /bin/bash /etc/init.d/rsyslog start 0 S root 2305 2301 0 85 0 - 11196 futex_ 12:20 ? 00:00:00 /sbin/rsyslogd -i /var/run/rsyslogd.pid 5 S root 2306 2305 0 85 0 - 23488 - 12:20 ? 00:00:00 /sbin/rsyslogd -i /var/run/rsyslogd.pid Also, for stop I appended after the killproc call this: kill -9 $(ps fax | grep /sbin/rsyslog | grep -v grep | gawk '{print $1}') &> /dev/null Best regards, Cristian Falcas On Tue, Aug 5, 2014 at 6:44 PM, Cristian Falcas <[email protected]> wrote: > From my tests, rsyslog is started and running, but it doesn't go to > background > > > On Tue, Aug 5, 2014 at 11:36 AM, AndyL <[email protected]> wrote: > >> >> >> > any output when it hangs? >> >> David, >> >> No it doesn't but if I use the debug flag, the last few lines are: >> >> 7578.099470000:2b71fea01e30: ratelimit:rsyslogd[dflt]:new >> ratelimiter:bReduceRepeatMsgs 0 >> 7578.099545000:2b71fea01e30: ratelimit:rsyslogd[internal_messages]:new >> ratelimiter:bReduceRepeatMsgs 0 >> 7578.099645000:2b71fea01e30: Checking pidfile '/var/run/rsyslog.pid'. >> >> I checked that/var/run/rsyslog.pid doesn't exist before I try and run >> rsyslog and I turned off SELinux just in case it was that, but it wasn't. >> >> Cheers >> >> Andy >> >> >> >> >> -- >> View this message in context: >> http://rsyslog-users.1305293.n2.nabble.com/rsyslog-startup-problem-on-Cent-OS-5-tp7586023p7586060.html >> Sent from the rsyslog-users mailing list archive at Nabble.com. >> _______________________________________________ >> rsyslog mailing list >> http://lists.adiscon.net/mailman/listinfo/rsyslog >> http://www.rsyslog.com/professional-services/ >> What's up with rsyslog? Follow https://twitter.com/rgerhards >> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad >> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you >> DON'T LIKE THAT. >> > > _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

