syslog-ng 1.3.15 compile fails on FreeBSD 3.2R
I just tried compiling syslog-ng 1.3.15 with libol 0.2.14 on a FreeBSD 3.2R box and it fails with the following: affile.c: In function `do_open_file': affile.c:52: storage size of `st' isn't known affile.c:54: warning: implicit declaration of function `stat' affile.c:55: warning: implicit declaration of function `S_ISDIR' affile.c:61: warning: implicit declaration of function `mkdir' affile.c:52: warning: unused variable `st' *** Error code 1
On Mon, Feb 14, 2000 at 08:38:05PM -0500, George Madden wrote:
I just tried compiling syslog-ng 1.3.15 with libol 0.2.14 on a FreeBSD 3.2R box and it fails with the following:
affile.c: In function `do_open_file': affile.c:52: storage size of `st' isn't known affile.c:54: warning: implicit declaration of function `stat' affile.c:55: warning: implicit declaration of function `S_ISDIR' affile.c:61: warning: implicit declaration of function `mkdir' affile.c:52: warning: unused variable `st'
try this patch (and touch affile.c.x after applying if you don't have scsh): diff -u -r1.27 affile.c --- affile.c 2000/02/13 16:24:01 1.27 +++ affile.c 2000/02/15 09:39:31 @@ -30,6 +30,8 @@ #include "utils.h" #include "center.h" +#include <sys/types.h> +#include <sys/stat.h> #include <fcntl.h> #include <assert.h> #include <errno.h> -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1 url: http://www.balabit.hu/pgpkey.txt
I applied the patch and it complied fine. This box is a heavy logger (about 4000 messages a minute). I installed 1.3.15 and tried to do a kill -HUP and it fails. It stops writing to the log files after the HUP but the process is still alive. It can't bind to the socket after the HUP. Here's the output when I run with -v -d options. Objects alive: 240, garbage collected: 6 SIGHUP received, restarting syslog-ng Marking fd 3 for closing. Marking fd 4 for closing. Marking fd 18 for closing. Marking fd 17 for closing. Marking fd 16 for closing. Marking fd 15 for closing. Marking fd 14 for closing. Marking fd 13 for closing. Marking fd 12 for closing. Marking fd 11 for closing. Marking fd 10 for closing. Marking fd 9 for closing. Marking fd 5 for closing. Marking fd 8 for closing. Marking fd 7 for closing. Marking fd 6 for closing. binding fd 19, inetaddr: 0.0.0.0, port: 514 io.c: bind_inet_socket() bind failed 0.0.0.0:514 Address already in use Closing fd 18. Closing fd 17. Closing fd 16. Closing fd 15. Closing fd 14. Closing fd 13. Closing fd 12. Closing fd 11. Closing fd 10. Closing fd 9. Closing fd 8. Closing fd 7. Closing fd 6. Closing fd 4. Closing fd 3. Garbage collecting while idle... Objects alive: 419, garbage collected: 12 Closing fd 5. binding fd 3, inetaddr: 0.0.0.0, port: 514 io.c: Preparing fd 3 for reading io.c: Preparing fd 4 for reading io.c: Preparing fd 6 for writing io.c: Preparing fd 7 for writing io.c: Preparing fd 8 for writing Initializing new configuration failed, reverting to old config. Garbage collecting while idle... Objects alive: 435, garbage collected: 6 ----- Original Message ----- From: Balazs Scheidler <bazsi@balabit.hu> To: <syslog-ng@venus.terrasoft.hu> Sent: Tuesday, February 15, 2000 4:40 AM Subject: Re: [syslog-ng] syslog-ng 1.3.15 compile fails on FreeBSD 3.2R
On Mon, Feb 14, 2000 at 08:38:05PM -0500, George Madden wrote:
I just tried compiling syslog-ng 1.3.15 with libol 0.2.14 on a FreeBSD 3.2R box and it fails with the following:
affile.c: In function `do_open_file': affile.c:52: storage size of `st' isn't known affile.c:54: warning: implicit declaration of function `stat' affile.c:55: warning: implicit declaration of function `S_ISDIR' affile.c:61: warning: implicit declaration of function `mkdir' affile.c:52: warning: unused variable `st'
try this patch (and touch affile.c.x after applying if you don't have scsh):
diff -u -r1.27 affile.c --- affile.c 2000/02/13 16:24:01 1.27 +++ affile.c 2000/02/15 09:39:31 @@ -30,6 +30,8 @@ #include "utils.h" #include "center.h"
+#include <sys/types.h> +#include <sys/stat.h> #include <fcntl.h> #include <assert.h> #include <errno.h>
-- 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, Feb 16, 2000 at 03:47:47PM -0500, George Madden wrote:
I applied the patch and it complied fine. This box is a heavy logger (about 4000 messages a minute). I installed 1.3.15 and tried to do a kill -HUP and it fails. It stops writing to the log files after the HUP but the process is still alive. It can't bind to the socket after the HUP. Here's the output when I run with -v -d options.
Objects alive: 240, garbage collected: 6 SIGHUP received, restarting syslog-ng Marking fd 3 for closing.
try this patch: Index: main.c =================================================================== RCS file: /home/bazsi/cvs/syslog-ng/src/main.c,v retrieving revision 1.24 diff -u -r1.24 main.c --- main.c 2000/02/13 16:45:14 1.24 +++ main.c 2000/02/17 20:08:32 @@ -60,7 +60,7 @@ switch (self->state) { case 0: - case 2: + case 3: self->backend->persistent = make_persistent_config(); CONFIG_DESTROY(self->backend->configuration, self->backend->persistent); self->state++; @@ -69,6 +69,10 @@ io_callout(&self->backend->super, 0, c); break; case 1: + self->state++; + io_callout(&self->backend->super, 0, c); + break; + case 2: if (CONFIG_INIT(self->backend->configuration, self->backend->persistent)) { notice("new configuration initialized\n"); self->backend->newconfig = NULL; @@ -87,7 +91,7 @@ } break; - case 3: + case 4: if (CONFIG_INIT(self->backend->configuration, self->backend->persistent)) { notice("Initializing new configuration failed, reverting to old config.\n"); } @@ -156,6 +160,7 @@ if (backend->newconfig) { static struct reread_config r = { { STATIC_HEADER, do_reread_config }, NULL, 0 }; + r.backend = backend; r.state = 0; io_callout(&backend->super, 0, &r.super); -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1 url: http://www.balabit.hu/pgpkey.txt
Balazs, For some reason the patch fails. I didn't investigate why, I just edited main.c. I recompliled after applying the patches for afile.c and main.c. It seems to work fine now. I can do a HUP and it restarts. I'll let it run for a while and watch it. Thanks for all your help on this. -George ----- Original Message ----- From: Balazs Scheidler <bazsi@balabit.hu> To: <syslog-ng@venus.terrasoft.hu> Sent: Thursday, February 17, 2000 3:15 PM Subject: Re: [syslog-ng] syslog-ng 1.3.15 compile fails on FreeBSD 3.2R
On Wed, Feb 16, 2000 at 03:47:47PM -0500, George Madden wrote:
I applied the patch and it complied fine. This box is a heavy logger (about 4000 messages a minute). I installed 1.3.15 and tried to do a kill -HUP and it fails. It stops writing to the log files after the HUP but the process is still alive. It can't bind to the socket after the HUP. Here's the output when I run with -v -d options.
Objects alive: 240, garbage collected: 6 SIGHUP received, restarting syslog-ng Marking fd 3 for closing.
try this patch:
Index: main.c =================================================================== RCS file: /home/bazsi/cvs/syslog-ng/src/main.c,v retrieving revision 1.24 diff -u -r1.24 main.c --- main.c 2000/02/13 16:45:14 1.24 +++ main.c 2000/02/17 20:08:32 @@ -60,7 +60,7 @@
switch (self->state) { case 0: - case 2: + case 3: self->backend->persistent = make_persistent_config(); CONFIG_DESTROY(self->backend->configuration, self->backend->persistent); self->state++; @@ -69,6 +69,10 @@ io_callout(&self->backend->super, 0, c); break; case 1: + self->state++; + io_callout(&self->backend->super, 0, c); + break; + case 2: if (CONFIG_INIT(self->backend->configuration, self->backend->persistent)) { notice("new configuration initialized\n"); self->backend->newconfig = NULL; @@ -87,7 +91,7 @@
} break; - case 3: + case 4: if (CONFIG_INIT(self->backend->configuration, self->backend->persistent)) { notice("Initializing new configuration failed, reverting to old config.\n"); } @@ -156,6 +160,7 @@ if (backend->newconfig) { static struct reread_config r = { { STATIC_HEADER, do_reread_config }, NULL, 0 }; + r.backend = backend; r.state = 0; io_callout(&backend->super, 0, &r.super);
-- 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
participants (2)
-
Balazs Scheidler
-
George Madden