Hello all, I'm configuring syslog-ng 2.0 on a RHEL ES 4 U4 system. One of the destination is an unix stream socket. After the first log writen on this socket, I get the error message : ------------------------------------------------------------------------------------------------------- Nov 27 11:32:30 ch-syslog-1 syslog-ng[10153]: I/O error occurred while writing; fd='8', error='Connection refused (111)' Nov 27 11:32:30 ch-syslog-1 syslog-ng[10153]: Connection broken; time_reopen='10' ------------------------------------------------------------------------------------------------------- I checked the socket with a thin client (perl script) and that's working (whitout restart socket server of course), so I assume this issue comes from syslog-ng, but syslog-ng works as root ... I'm little bit confusing ... Hereby the the dest, template and options configurations. -------------------------------------------------------------------------------------------------------- options { sync (0); time_reopen (10); log_fifo_size (1000); long_hostnames (off); use_dns (no); use_fqdn (no); create_dirs (no); keep_hostname (yes); flush_lines(1); flush_timeout(5000); }; template t_test { template ("$R_STAMP;$S_STAMP;$HOST;$FACILITY;$LEVEL;$PROGRAM;$MSGONLY\n"); }; destination d_test { file("/var/log/test.log" template(t_test)); unix-stream('/var/tmp/syslog_generic.soc' template(t_test));}; --------------------------------------------------------------------------------------------------------- Many thx for your help Ciao patrick
On Mon, 2006-11-27 at 10:41 +0000, pat.hartemann@bluewin.ch wrote:
Hello all,
I'm configuring syslog-ng 2.0 on a RHEL ES 4 U4 system. One of the destination is an unix stream socket. After the first log writen on this socket, I get the error message :
------------------------------------------------------------------------------------------------------- Nov 27 11:32:30 ch-syslog-1 syslog-ng[10153]: I/O error occurred while writing; fd='8', error='Connection refused (111)' Nov 27 11:32:30 ch-syslog-1 syslog-ng[10153]: Connection broken; time_reopen='10'
please check syslog-ng using strace, and see where it gets the connection refused error. might happen that the perl script uses SOCK_DGRAM while syslog-ng uses SOCK_STREAM ? -- Bazsi
Balazs Scheidler wrote:
On Mon, 2006-11-27 at 10:41 +0000, pat.hartemann@bluewin.ch wrote:
Hello all,
I'm configuring syslog-ng 2.0 on a RHEL ES 4 U4 system. One of the destination is an unix stream socket. After the first log writen on this socket, I get the error message :
------------------------------------------------------------------------------------------------------- Nov 27 11:32:30 ch-syslog-1 syslog-ng[10153]: I/O error occurred while writing; fd='8', error='Connection refused (111)' Nov 27 11:32:30 ch-syslog-1 syslog-ng[10153]: Connection broken; time_reopen='10'
please check syslog-ng using strace, and see where it gets the connection refused error.
might happen that the perl script uses SOCK_DGRAM while syslog-ng uses SOCK_STREAM ?
in fact this comes from socket type. I've tried with tcp, and gotten the same issue. However with a udp or datagram unix socket that's working fine. Looks like syslog-ng doesn't like connection oriented type .... Once more, it doesn't work in anyway with syslog-ng 2.00 but works fine with 1.6.9 (on same RHEL system)
On Thu, 2006-11-30 at 06:02 +0100, patrick hartemann wrote:
Balazs Scheidler wrote:
On Mon, 2006-11-27 at 10:41 +0000, pat.hartemann@bluewin.ch wrote:
Hello all,
I'm configuring syslog-ng 2.0 on a RHEL ES 4 U4 system. One of the destination is an unix stream socket. After the first log writen on this socket, I get the error message :
------------------------------------------------------------------------------------------------------- Nov 27 11:32:30 ch-syslog-1 syslog-ng[10153]: I/O error occurred while writing; fd='8', error='Connection refused (111)' Nov 27 11:32:30 ch-syslog-1 syslog-ng[10153]: Connection broken; time_reopen='10'
please check syslog-ng using strace, and see where it gets the connection refused error.
might happen that the perl script uses SOCK_DGRAM while syslog-ng uses SOCK_STREAM ?
in fact this comes from socket type. I've tried with tcp, and gotten the same issue. However with a udp or datagram unix socket that's working fine. Looks like syslog-ng doesn't like connection oriented type .... Once more, it doesn't work in anyway with syslog-ng 2.00 but works fine with 1.6.9 (on same RHEL system)
tcp logging should work, and in fact I've just tried it and it really does. I also tested unix-stream destination and it also works, although I'm looking at the latest version in my version controlled tree. Can you check if the latest snapshot shows the same problem? -- Bazsi
participants (3)
-
Balazs Scheidler
-
pat.hartemannļ¼ bluewin.ch
-
patrick hartemann