Sure send the changed files to me, I can create an update today. Regards, Andre
> -----Original Message----- > From: [email protected] [mailto:rsyslog- > [email protected]] On Behalf Of Radu Gheorghe > Sent: Freitag, 21. Dezember 2012 11:42 > To: rsyslog-users > Subject: Re: [rsyslog] Privilege drop makes stopping it (via Ubuntu upstart) > to > hang > > Thanks Rainer! It actually works like that, if you comment out "expect fork" > from /etc/init/rsyslog.conf > > I'm attaching a working /etc/init/rsyslog.conf and an /etc/default/rsyslog. > > As a bonus, now rsyslog doesn't start with the deprecated "-c5" anymore :) > > @Andre: could you integrate those in the next Ubuntu packages? The > upstart job should be in debian/rsyslog.upstart and the /etc/default file is > debian/rsyslog.default > > Best regards, > Radu > > > 2012/12/19 Rainer Gerhards <[email protected]> > > > > > would it be snow idea not to fork (-n option)? > > > > Sent from phone, thus brief. > > > > Radu Gheorghe <[email protected]> hat geschrieben: > > Hello, > > > > By default, ubuntu uses drop privileges, and with rsyslog v7 that > > seems to be causing a hang when you stop it (via upstart/init script - > > which is the only built-in way). > > > > That seems to be caused by the fact that with dropped privileges > > rsyslog has 2 processes, and in the PID file only one is shown. So > > when you try to stop, this happens: > > > > # ps ax | grep rsyslog > > 2647 ? Ss 0:00 rsyslogd -c5 > > 2648 ? Sl 0:00 rsyslogd -c5 > > # stop rsyslog #will hang here > > ^C > > root@userver-rgheorghe:~# ps ax | grep rsyslog > > 2647 ? Ss 0:00 rsyslogd -c5 > > 2648 ? Z 0:00 [rsyslogd] <defunct> > > > > That's because upstart killed 2648, which is the one that's in the PID > > file. One can get the same behavior when simply doing `kill 2648`. > > > > How to reproduce? Get a clean Ubuntu and run the attached script, > > which basically installs the latest rsyslog from the Adiscon > > repository, then restarts it one more time. > > > > If you uncomment that part of the script where a simple conf is > > written that prevents dropping privileges, the problem can no longer be > reproduced. > > > > Solution? I think it would be nice to write the PID of the parent > > process somewhere, and then change the upstart job to kill both > > processes. That will work. > > > > Lacking that information, one would either have to `killall rsyslogd` > > or to assume that PARENT_PID=$CHILD_PID-1. Both of which are risky. > > Here's an interesting link on the topic: > > > > http://stackoverflow.com/questions/12200217/can-upstart-expect- > respawn > > -be-used-on-processes-that-fork-more-than-twice > > > > Any feedback and suggestions are welcome :) > > > > Thanks and best regards, > > Radu > > _______________________________________________ > > 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. _______________________________________________ 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.

