RE: [syslog-ng] SIGHUP kills syslog-ng on FreeBSD 3-STABLE
Hi, No, it didn't help. Now it just dies silently, not even a work on the console. The only thing I can see is that if I start the old syslogd immediately after syslog-ng died on HUP, I get the following on the console: syslogd: cannot create /var/run/log: Address already in use Cheers, GLZ -----Original Message----- From: Balazs Scheidler [mailto:bazsi@balabit.hu] Sent: Tuesday, December 07, 1999 10:52 PM To: syslog-ng@venus.terrasoft.hu Subject: Re: [syslog-ng] SIGHUP kills syslog-ng on FreeBSD 3-STABLE On Tue, Dec 07, 1999 at 09:37:44PM +0100, Lowkrantz, Goran wrote:
Hi,
Here it is.
This patch should solve the problem with SIGHUP, because it drops messages while the configuration is initialized. The real problem is not solved though, the error message says that for some reason syslog-ng cannot bind to 0.0.0.0:514. I'll check that out too later. diff -u -r1.18 sources.c --- sources.c 1999/11/22 18:26:16 1.18 +++ sources.c 1999/12/07 13:19:22 @@ -182,7 +182,10 @@ CAST(log_source_group, self, c); struct ol_string *name = get_source_hostname(logmsg->saddr); - assert(self->super.next); + if (!self->super.next) { + log_info_free(logmsg); + return; + } logmsg->source = c; if (self->long_hostnames) { if (logmsg->flags & LF_LOCAL) { -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1 url: http://www.balabit.hu/pgpkey.txt _______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu http://lists.balabit.hu/mailman/listinfo/syslog-ng
On Wed, Dec 08, 1999 at 03:38:42AM +0100, Lowkrantz, Goran wrote:
Hi,
No, it didn't help. Now it just dies silently, not even a work on the console.
It most probably fails to bind to 0.0.0.0:514, and since the configuration cannot be initialized, it exits. I've installed freebsd 3.3-release, and will check this out.
The only thing I can see is that if I start the old syslogd immediately after syslog-ng died on HUP, I get the following on the console: syslogd: cannot create /var/run/log: Address already in use
syslogd doesn't remove the af_unix socket it is using to get messages before opening it. You can solve this problem by rm-ing /var/run/log. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1 url: http://www.balabit.hu/pgpkey.txt
On Wed, Dec 08, 1999 at 03:38:42AM +0100, Lowkrantz, Goran wrote:
Hi,
No, it didn't help. Now it just dies silently, not even a work on the console.
The only thing I can see is that if I start the old syslogd immediately after syslog-ng died on HUP, I get the following on the console: syslogd: cannot create /var/run/log: Address already in use
I have yet another patch which should really fix your problems under BSD. Touch afinet.c.x and afunix.c.x before rebuilding, if you don't have scsh installed. diff -urN syslog-ng-1.3.6/src/afinet.c syslog-ng.bsd/src/afinet.c --- syslog-ng-1.3.6/src/afinet.c Tue Nov 23 20:45:45 1999 +++ syslog-ng.bsd/src/afinet.c Thu Dec 9 16:31:34 1999 @@ -269,11 +269,15 @@ case AFSOCKET_DGRAM: { struct afsocket_source_connection *conn; struct io_fd *client = make_io_fd(cfg->backend, fd); + int res; self->super.num_connections = 1; conn = make_afinet_source_connection(client, NULL, &self->super, self->super.super.super.next); - LOG_HANDLER_INIT(conn, cfg, NULL); - + res = LOG_HANDLER_INIT(conn, cfg, NULL); + if ((res & ST_FAIL) == 0) { + conn->queue_node = + object_queue_add_tail(self->super.connections, &conn->super.super.super); + } break; } default: diff -urN syslog-ng-1.3.6/src/afunix.c syslog-ng.bsd/src/afunix.c --- syslog-ng-1.3.6/src/afunix.c Tue Nov 23 20:32:37 1999 +++ syslog-ng.bsd/src/afunix.c Thu Dec 9 16:33:15 1999 @@ -241,11 +241,16 @@ case AFSOCKET_DGRAM: { struct afsocket_source_connection *conn; struct io_fd *client = make_io_fd(cfg->backend, fd); - + int res; + self->super.num_connections = 1; conn = make_afunix_source_connection(client, NULL, &self->super, self->super.super.super.next); - LOG_HANDLER_INIT(conn, cfg, NULL); - + res = LOG_HANDLER_INIT(conn, cfg, NULL); + + if ((res & ST_FAIL) == 0) { + conn->queue_node = + object_queue_add_tail(self->super.connections, &conn->super.super.super); + } break; } default: -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1 url: http://www.balabit.hu/pgpkey.txt
participants (2)
-
Balazs Scheidler
-
Lowkrantz, Goran