[syslog-ng] Question about reopening sockets

Sandor Geller Sandor.Geller at morganstanley.com
Sat Jul 4 12:44:35 CEST 2009


Hi Zoltan,

syslog-ng doesn't detect the broken connection until it tries to write
to the socket. When the write error occurs then it will try to
reconnect to the socket and keeps to do so until it succeeds. You can
control how many seconds to wait between retries using the time_reopen
option.

You should consider migrating to 2.1 or even better to 3.0, both are
backward-compatible with the configuration file syntax of syslog-ng
2.0. AFAIK syslog-ng 2.0 isn't maintained anymore, and slowly
syslog-ng 2.1 will get "abandoned" as well.

Regards,

Sandor

On Fri, Jul 3, 2009 at 10:16 PM, Zoltan HERPAI<wigyori at uid0.hu> wrote:
> Hi all,
>
> I'm writing a small script that would be fed with data via pipe by
> syslog-ng 2.0.9. The script itself is responsible for creating the
> socket into which syslog-ng would be writing to. I'm looking for an
> option within syslog-ng that would allow for reopening the socket in
> case the script dies, quits, or it gets removed for some reason (like an
> epic admin fail).
>
> I did some testing, and as per that, checking with lsof, syslog-ng opens
> the socket only on the first time it would be writing to that
> destination, which is good. After the socket gets removed, it shows up as...
>
> syslog-ng 31666        root   17u     FIFO      253,2
> 24624 /tmp/pw.sock (deleted)
>
> ... in lsof, and the deleted flag does not go away after the socket gets
> recreated (f.e. the script is restarted), and a test message is sent
> into the given destination. Is there a config option available for
> reopening sockets?
>
> Thanks,
> Zoltan HERPAI
>
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.campin.net/syslog-ng/faq.html
>
>


More information about the syslog-ng mailing list