[syslog-ng] supervise/syslog-ng exits
Kārlis Repsons
repsons at gmail.com
Mon Dec 14 18:43:51 CET 2009
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:
I wonder... Maybe you have some suggestions how should I do better?
Write a C code and collect messages for some time before disposal?!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.balabit.hu/pipermail/syslog-ng/attachments/20091214/22a5560c/attachment-0001.pgp
More information about the syslog-ng
mailing list