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