[syslog-ng] supervise/syslog-ng exits

Lance Laursen lance at demonware.net
Wed Dec 16 20:16:06 CET 2009


On Mon, Dec 14, 2009 at 9:43 AM, Kārlis Repsons <repsons at gmail.com> wrote:

> On Monday 14 December 2009 07:07:37 Balazs Scheidler wrote:
> > On Fri, 2009-12-11 at 19:11 +0000, Kārlis Repsons wrote:
> > > People,
> > >
> > > I wonder why is there some two messages like this in errors log each
> day:
> > > supervise/syslog-ng[28806]: Daemon exited gracefully, not restarting;
> > > exitcode='0'
> > >
> > > ?
> > >
> > > What are the possible reasons and what should be done?
> >
> > something has stopped syslog-ng. if it is intended, nothing needs to be
> > done, if it isn't, then you need to find out what stops syslog-ng.
> >
> > the exitcode of 0 means that it was an intentional stop, not an abort or
> > a segfault.
> Is it necessarily syslog-ng itself? I have a problematic errors reporting
> script connected to syslog-ng as a destination, maybe it exits and causes
> this? Otherwise I wouldn't like this a lot, because just a minute ago was
> "exit 0", but when I look, syslog-ng is working just fine... And no
> stop/start
> of syslog-ng is logged. And that script WAS restarted.
> Ok, at this point, I presume, its that script, which causes it...
>
> So, please, take a look at this script:
>
>
> #!/bin/bash
>
> tmpp="/tmp/crashmail-pipe"
>
> if [[ ! -p "$tmpp" ]]
> then
>    umask u=rwx,go=
>    mkfifo "$tmpp"
> fi
>
> while read -r line
> do
>   (
>    echo -en "From:crashmail at host\nTo:root at host\nSubject:" >> "$tmpp" &&
>    echo "$line" | cut -c 1-100 >> "$tmpp" &&
>    echo "$line" >> "$tmpp"
>   ) &
>    cat "$tmpp" | sendmail root at host
>    if [[ $? -ne 0 ]]
>    then
>       exit 1
>    fi
> done
>
>
> Well, ok, its not doing very well, for example I can't understand how
> comes, I
> receive an output like:
>
>
> No Subject
> From: root <root at host>
> To: undisclosed-recipients:
> Date: Today 17:20:02
>
> Dec 13 17:10:01 host2 supervise/syslog-ng[9735]: Daemon exited gracefully,
> not
> restarting; exitcod
> Dec 13 17:10:01 host2 supervise/syslog-ng[9735]: Daemon exited gracefully,
> not
> restarting; exitcode='0'
> From:crashmail at host
> To:root at host
> Subject:
>


Do these messages show up around 17:00 daily? Are you sure this isn't just
your logrotate scripts doing a reload/restart on syslog-ng?


-- 
Lance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20091216/33841384/attachment.htm 


More information about the syslog-ng mailing list