Hi guys, I'm trying to setup a master syslog-ng server which listens on UDP syslog port to incoming squid access log and Cisco syslog messages. It uses a db_parser to parse and store these access logs in different variables. I now need to store these values in a simple mysql database. I have created the database schema and thought of using a pipe and a wrapper script to write the query. But read that there are problems sometimes with this approach. I then thought about doing it using libddb and downloaded the package syslog-ng_3.2.2 from the website. So far so good, but when I try to run syslog-ng it gives me an error: syslog-ng Error opening plugin module; module='afsql', error='/usr/local/lib/syslog-ng/libafsql.so: undefined symbol: dbi_result_free' Error opening plugin module; module='afsql', error='/usr/local/lib/syslog-ng/libafsql.so: undefined symbol: dbi_result_free' Error parsing destination, destination plugin sql not found in /usr/local/etc/syslog-ng.conf at line 61, column 3: sql(type(mysql) ^^^ Any pointers on what I'm missing here ? I have commented out the '@module afsql' line in modules.conf, have made sure I've got the latest libdb and libdb-devel packages. I'm running CentOS 5.x and just don't know how to proceed :( Appreciate all and any help guys thank you. -- Eshan Bhide Engineer, Core Infrastructure and Systems Development Global Gossip 14 Wentworth Ave Surry Hills, NSW 2010 Australia ------------------------------------------------- IMPORTANT NOTICE : The information in this email is confidential and may also be privileged. If you are not the intended recipient, any use or dissemination of the information and any disclosure or copying of this email is unauthorised and strictly prohibited. If you have received this email in error, please promptly inform us by reply email or telephone. You should also delete this email and destroy any hard copies produced.
Hi, try running the 'syslog-ng --version' command and verify that your binary was compiled with SQL-support enabled. If not, you need to recompile syslog-ng, or use a binary from the balabit website: http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/... Regards, Robert On 03/08/2011 08:16 AM, Eshan Bhide wrote:
Hi guys,
I'm trying to setup a master syslog-ng server which listens on UDP syslog port to incoming squid access log and Cisco syslog messages. It uses a db_parser to parse and store these access logs in different variables. I now need to store these values in a simple mysql database. I have created the database schema and thought of using a pipe and a wrapper script to write the query. But read that there are problems sometimes with this approach. I then thought about doing it using libddb and downloaded the package syslog-ng_3.2.2 from the website.
So far so good, but when I try to run syslog-ng it gives me an error:
syslog-ng Error opening plugin module; module='afsql', error='/usr/local/lib/syslog-ng/libafsql.so: undefined symbol: dbi_result_free' Error opening plugin module; module='afsql', error='/usr/local/lib/syslog-ng/libafsql.so: undefined symbol: dbi_result_free' Error parsing destination, destination plugin sql not found in /usr/local/etc/syslog-ng.conf at line 61, column 3:
sql(type(mysql) ^^^
Any pointers on what I'm missing here ? I have commented out the '@module afsql' line in modules.conf, have made sure I've got the latest libdb and libdb-devel packages. I'm running CentOS 5.x and just don't know how to proceed :( Appreciate all and any help guys thank you.
-- Eshan Bhide Engineer, Core Infrastructure and Systems Development Global Gossip
14 Wentworth Ave Surry Hills, NSW 2010 Australia
-------------------------------------------------
IMPORTANT NOTICE : The information in this email is confidential and may also be privileged. If you are not the intended recipient, any use or dissemination of the information and any disclosure or copying of this email is unauthorised and strictly prohibited. If you have received this email in error, please promptly inform us by reply email or telephone. You should also delete this email and destroy any hard copies produced.
______________________________________________________________________________ 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
Hi thanks for replying Robert, I did use the --enable-sql switch when compiling from source, following is the output of syslog-ng --version: syslog-ng --version syslog-ng 3.2.2 Installer-Version: 3.2.2 Revision: ssh+git://bazsi@git.balabit //var/scm/git/syslog-ng/syslog-ng-ose--mainline--3.2#master#1d3f396485eb47b1ff6aa18ac4f1c4cd51c0ea4c Compile-Date: Mar 7 2011 20:13:29 Enable-Threads: on Enable-Debug: off Enable-GProf: off Enable-Memtrace: off Enable-Sun-STREAMS: off Enable-IPv6: on Enable-Spoof-Source: on Enable-TCP-Wrapper: on Enable-SSL: on Enable-SQL: on Enable-Linux-Caps: off Enable-Pcre: off Enable-Pacct: off I'm trying the binary of 3.3.0alpha1 from the website and will report back if it works :) Cheers, Eshan On 8 March 2011 19:23, Fekete Robert <frobert@balabit.hu> wrote:
Hi, try running the 'syslog-ng --version' command and verify that your binary was compiled with SQL-support enabled. If not, you need to recompile syslog-ng, or use a binary from the balabit website:
http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/...
Regards,
Robert
On 03/08/2011 08:16 AM, Eshan Bhide wrote:
Hi guys,
I'm trying to setup a master syslog-ng server which listens on UDP syslog port to incoming squid access log and Cisco syslog messages. It uses a db_parser to parse and store these access logs in different variables. I now need to store these values in a simple mysql database. I have created the database schema and thought of using a pipe and a wrapper script to write the query. But read that there are problems sometimes with this approach. I then thought about doing it using libddb and downloaded the package syslog-ng_3.2.2 from the website.
So far so good, but when I try to run syslog-ng it gives me an error:
syslog-ng Error opening plugin module; module='afsql', error='/usr/local/lib/syslog-ng/libafsql.so: undefined symbol: dbi_result_free' Error opening plugin module; module='afsql', error='/usr/local/lib/syslog-ng/libafsql.so: undefined symbol: dbi_result_free' Error parsing destination, destination plugin sql not found in /usr/local/etc/syslog-ng.conf at line 61, column 3:
sql(type(mysql) ^^^
Any pointers on what I'm missing here ? I have commented out the '@module afsql' line in modules.conf, have made sure I've got the latest libdb and libdb-devel packages. I'm running CentOS 5.x and just don't know how to proceed :( Appreciate all and any help guys thank you.
-- Eshan Bhide Engineer, Core Infrastructure and Systems Development Global Gossip
14 Wentworth Ave Surry Hills, NSW 2010 Australia
-------------------------------------------------
IMPORTANT NOTICE : The information in this email is confidential and may also be privileged. If you are not the intended recipient, any use or dissemination of the information and any disclosure or copying of this email is unauthorised and strictly prohibited. If you have received this email in error, please promptly inform us by reply email or telephone. You should also delete this email and destroy any hard copies produced.
______________________________________________________________________________
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
______________________________________________________________________________ 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
------------------------------------------------- IMPORTANT NOTICE : The information in this email is confidential and may also be privileged. If you are not the intended recipient, any use or dissemination of the information and any disclosure or copying of this email is unauthorised and strictly prohibited. If you have received this email in error, please promptly inform us by reply email or telephone. You should also delete this email and destroy any hard copies produced.
Further to this, I get an error when trying to compile the 3.3.0alpha1 version: make[7]: Entering directory `/tmp/syslog-ng-3.3.0alpha1/lib/ivykis/lib/man3' make[7]: *** No rule to make target `iv_deinit.3', needed by `all-am'. Stop. make[7]: Leaving directory `/tmp/syslog-ng-3.3.0alpha1/lib/ivykis/lib/man3' make[6]: *** [all-recursive] Error 1 make[6]: Leaving directory `/tmp/syslog-ng-3.3.0alpha1/lib/ivykis/lib' make[5]: *** [all-recursive] Error 1 Eshan. On 9 March 2011 13:13, Eshan Bhide <ebhide@globalgossip.net> wrote:
Hi thanks for replying Robert, I did use the --enable-sql switch when compiling from source, following is the output of syslog-ng --version:
syslog-ng --version syslog-ng 3.2.2 Installer-Version: 3.2.2 Revision: ssh+git://bazsi@git.balabit //var/scm/git/syslog-ng/syslog-ng-ose--mainline--3.2#master#1d3f396485eb47b1ff6aa18ac4f1c4cd51c0ea4c Compile-Date: Mar 7 2011 20:13:29 Enable-Threads: on Enable-Debug: off Enable-GProf: off Enable-Memtrace: off Enable-Sun-STREAMS: off Enable-IPv6: on Enable-Spoof-Source: on Enable-TCP-Wrapper: on Enable-SSL: on Enable-SQL: on Enable-Linux-Caps: off Enable-Pcre: off Enable-Pacct: off
I'm trying the binary of 3.3.0alpha1 from the website and will report back if it works :)
Cheers, Eshan
On 8 March 2011 19:23, Fekete Robert <frobert@balabit.hu> wrote:
Hi, try running the 'syslog-ng --version' command and verify that your binary was compiled with SQL-support enabled. If not, you need to recompile syslog-ng, or use a binary from the balabit website:
http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/...
Regards,
Robert
On 03/08/2011 08:16 AM, Eshan Bhide wrote:
Hi guys,
I'm trying to setup a master syslog-ng server which listens on UDP syslog port to incoming squid access log and Cisco syslog messages. It uses a db_parser to parse and store these access logs in different variables. I now need to store these values in a simple mysql database. I have created the database schema and thought of using a pipe and a wrapper script to write the query. But read that there are problems sometimes with this approach. I then thought about doing it using libddb and downloaded the package syslog-ng_3.2.2 from the website.
So far so good, but when I try to run syslog-ng it gives me an error:
syslog-ng Error opening plugin module; module='afsql', error='/usr/local/lib/syslog-ng/libafsql.so: undefined symbol: dbi_result_free' Error opening plugin module; module='afsql', error='/usr/local/lib/syslog-ng/libafsql.so: undefined symbol: dbi_result_free' Error parsing destination, destination plugin sql not found in /usr/local/etc/syslog-ng.conf at line 61, column 3:
sql(type(mysql) ^^^
Any pointers on what I'm missing here ? I have commented out the '@module afsql' line in modules.conf, have made sure I've got the latest libdb and libdb-devel packages. I'm running CentOS 5.x and just don't know how to proceed :( Appreciate all and any help guys thank you.
-- Eshan Bhide Engineer, Core Infrastructure and Systems Development Global Gossip
14 Wentworth Ave Surry Hills, NSW 2010 Australia
-------------------------------------------------
IMPORTANT NOTICE : The information in this email is confidential and may also be privileged. If you are not the intended recipient, any use or dissemination of the information and any disclosure or copying of this email is unauthorised and strictly prohibited. If you have received this email in error, please promptly inform us by reply email or telephone. You should also delete this email and destroy any hard copies produced.
______________________________________________________________________________
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
______________________________________________________________________________ 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
------------------------------------------------- IMPORTANT NOTICE : The information in this email is confidential and may also be privileged. If you are not the intended recipient, any use or dissemination of the information and any disclosure or copying of this email is unauthorised and strictly prohibited. If you have received this email in error, please promptly inform us by reply email or telephone. You should also delete this email and destroy any hard copies produced.
Eshan Bhide <ebhide@globalgossip.net> writes:
So far so good, but when I try to run syslog-ng it gives me an error:
syslog-ng Error opening plugin module; module='afsql', error='/usr/local/lib/syslog- ng/libafsql.so: undefined symbol: dbi_result_free' Error opening plugin module; module='afsql', error='/usr/local/lib/syslog- ng/libafsql.so: undefined symbol: dbi_result_free'
^^^^^^^^^^^^^^^ The problem lies here: while the module has been compiled, the DBI version is probably not fresh enough. I'd suggest compiling libdbi from CVS. Can you tell us the libdbi version you're using? Sadly, there hasn't been an official libdbi release for quite some time now, so distributions might carry ancient versions.
Error parsing destination, destination plugin sql not found in /usr/local/etc/syslog-ng.conf at line 61, column 3:
sql(type(mysql) ^^^
[...snip...]
Further to this, I get an error when trying to compile the 3.3.0alpha1 version:
make[7]: Entering directory `/tmp/syslog-ng-3.3.0alpha1/lib/ivykis/lib/man3' make[7]: *** No rule to make target `iv_deinit.3', needed by `all-am'. Stop. make[7]: Leaving directory `/tmp/syslog-ng-3.3.0alpha1/lib/ivykis/lib/man3' make[6]: *** [all-recursive] Error 1 make[6]: Leaving directory `/tmp/syslog-ng-3.3.0alpha1/lib/ivykis/lib' make[5]: *** [all-recursive] Error 1
The 3.3.0alpha1 tarball is sadly broken. This issue has since been fixed in git. -- |8]
On Wed, 2011-03-09 at 08:04 +0100, Gergely Nagy wrote:
Eshan Bhide <ebhide@globalgossip.net> writes:
So far so good, but when I try to run syslog-ng it gives me an error:
syslog-ng Error opening plugin module; module='afsql', error='/usr/local/lib/syslog- ng/libafsql.so: undefined symbol: dbi_result_free' Error opening plugin module; module='afsql', error='/usr/local/lib/syslog- ng/libafsql.so: undefined symbol: dbi_result_free'
^^^^^^^^^^^^^^^
The problem lies here: while the module has been compiled, the DBI version is probably not fresh enough. I'd suggest compiling libdbi from CVS.
Can you tell us the libdbi version you're using? Sadly, there hasn't been an official libdbi release for quite some time now, so distributions might carry ancient versions.
Hmm. this is not the root cause, at least not in this specific error message. dbi_result_free() is part of old and new libdbi alike. It seems that the configure script somehow munged the detection of libdbi and at the end libafsql.so didn't link against it. Can you run an ldd on /usr/local/lib/syslog-ng/libafsql.so?
Error parsing destination, destination plugin sql not found in /usr/local/etc/syslog-ng.conf at line 61, column 3:
sql(type(mysql) ^^^
[...snip...]
Further to this, I get an error when trying to compile the 3.3.0alpha1 version:
make[7]: Entering directory `/tmp/syslog-ng-3.3.0alpha1/lib/ivykis/lib/man3' make[7]: *** No rule to make target `iv_deinit.3', needed by `all-am'. Stop. make[7]: Leaving directory `/tmp/syslog-ng-3.3.0alpha1/lib/ivykis/lib/man3' make[6]: *** [all-recursive] Error 1 make[6]: Leaving directory `/tmp/syslog-ng-3.3.0alpha1/lib/ivykis/lib' make[5]: *** [all-recursive] Error 1
The 3.3.0alpha1 tarball is sadly broken. This issue has since been fixed in git.
-- Bazsi
On Wed, Mar 9, 2011 at 9:04 AM, Gergely Nagy <algernon@balabit.hu> wrote:
Eshan Bhide <ebhide@globalgossip.net> writes:
So far so good, but when I try to run syslog-ng it gives me an error:
syslog-ng Error opening plugin module; module='afsql',
error='/usr/local/lib/syslog-
ng/libafsql.so: undefined symbol: dbi_result_free' Error opening plugin module; module='afsql', error='/usr/local/lib/syslog- ng/libafsql.so: undefined symbol: dbi_result_free' ^^^^^^^^^^^^^^^
The problem lies here: while the module has been compiled, the DBI version is probably not fresh enough. I'd suggest compiling libdbi from CVS.
Perhaps not necessarily from CVS, but do make sure you also compiled the dbi-drivers. I suspect there might be problems with the afsql not linking/loading libdbi (or it's mysql driver from dbi-drivers) I'm a low level debugger, so running strace on syslog-ng and posting that would be interesting to confirm/deny my hypothesis.
Thanks for the replies guys they have been very helpful! @Bazsi Here is the ldd /usr/local/lib/syslog-ng/libafsql.so libsyslog-ng.so.0 => /usr/local/lib/libsyslog-ng.so.0 (0xb7f3c000) libdbi.so.1 => /usr/local/lib/libdbi.so.1 (0xb7f30000) libpthread.so.0 => /lib/libpthread.so.0 (0xb7f0e000) libc.so.6 => /lib/libc.so.6 (0xb7db5000) librt.so.1 => /lib/librt.so.1 (0xb7dac000) libnsl.so.1 => /lib/libnsl.so.1 (0xb7d93000) libgmodule-2.0.so.0 => /lib/libgmodule-2.0.so.0 (0xb7d8f000) libdl.so.2 => /lib/libdl.so.2 (0xb7d8a000) libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0xb7d85000) libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0xb7ce7000) libevtlog.so.0 => /usr/local/lib/libevtlog.so.0 (0xb7ce3000) libm.so.6 => /lib/libm.so.6 (0xb7cb9000) /lib/ld-linux.so.2 (0xb7fa1000) I have upgraded the libdbi to the latest, compiled from source and the message seems to have gone away. Now syslog-ng loads up fine but doesn't seem to be writing anything to the database! I will run strace and post up the results shortly, but in the meantime if there are any ideas on what could be happening I would love to hear. On 10 March 2011 20:59, Hendrik Visage <hvjunk@gmail.com> wrote:
On Wed, Mar 9, 2011 at 9:04 AM, Gergely Nagy <algernon@balabit.hu> wrote:
Eshan Bhide <ebhide@globalgossip.net> writes:
So far so good, but when I try to run syslog-ng it gives me an error:
syslog-ng Error opening plugin module; module='afsql',
error='/usr/local/lib/syslog-
ng/libafsql.so: undefined symbol: dbi_result_free' Error opening plugin module; module='afsql', error='/usr/local/lib/syslog- ng/libafsql.so: undefined symbol: dbi_result_free' ^^^^^^^^^^^^^^^
The problem lies here: while the module has been compiled, the DBI version is probably not fresh enough. I'd suggest compiling libdbi from CVS.
Perhaps not necessarily from CVS, but do make sure you also compiled the dbi-drivers.
I suspect there might be problems with the afsql not linking/loading libdbi (or it's mysql driver from dbi-drivers)
I'm a low level debugger, so running strace on syslog-ng and posting that would be interesting to confirm/deny my hypothesis.
______________________________________________________________________________ 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
------------------------------------------------- IMPORTANT NOTICE : The information in this email is confidential and may also be privileged. If you are not the intended recipient, any use or dissemination of the information and any disclosure or copying of this email is unauthorised and strictly prohibited. If you have received this email in error, please promptly inform us by reply email or telephone. You should also delete this email and destroy any hard copies produced.
@Hendrik, the following is the strace output: execve("/usr/local/sbin/syslog-ng", ["syslog-ng"], [/* 22 vars */]) = 0 brk(0) = 0x84fc000 uname({sys="Linux", node="DemonVPS", ...}) = 0 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/usr/local/lib/tls/i686/sse2/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/tls/i686/sse2", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/tls/i686/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/tls/i686", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/tls/sse2/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/tls/sse2", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/tls/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/tls", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/i686/sse2/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/i686/sse2", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/i686/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/i686", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/sse2/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/sse2", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libsyslog-ng.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\354\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1076587, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fc2000 mmap2(NULL, 364228, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f69000 mmap2(0xb7fbe000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x54) = 0xb7fbe000 close(3) = 0 open("/usr/local/lib/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=33705, ...}) = 0 mmap2(NULL, 33705, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f60000 close(3) = 0 open("/lib/librt.so.1", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\30\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=46144, ...}) = 0 mmap2(NULL, 33324, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f57000 mmap2(0xb7f5e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xb7f5e000 close(3) = 0 open("/usr/local/lib/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libnsl.so.1", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@1\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=107924, ...}) = 0 mmap2(NULL, 100296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f3e000 mmap2(0xb7f53000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xb7f53000 mmap2(0xb7f55000, 6088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f55000 close(3) = 0 open("/usr/local/lib/libgmodule-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libgmodule-2.0.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\v\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=9852, ...}) = 0 mmap2(NULL, 8720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f3b000 mmap2(0xb7f3d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7f3d000 close(3) = 0 open("/usr/local/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\n\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=18812, ...}) = 0 mmap2(NULL, 16504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f36000 mmap2(0xb7f39000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7f39000 close(3) = 0 open("/usr/local/lib/libgthread-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libgthread-2.0.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\16\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=14660, ...}) = 0 mmap2(NULL, 17504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f31000 mmap2(0xb7f35000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb7f35000 close(3) = 0 open("/usr/local/lib/libglib-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libglib-2.0.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\315\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=642956, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f30000 mmap2(NULL, 646636, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e92000 mmap2(0xb7f2f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c) = 0xb7f2f000 close(3) = 0 open("/usr/local/lib/libevtlog.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\17\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=41997, ...}) = 0 mmap2(NULL, 15116, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e8e000 mmap2(0xb7e91000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7e91000 close(3) = 0 open("/usr/local/lib/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libpthread.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0PH\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=135892, ...}) = 0 mmap2(NULL, 98788, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e75000 mmap2(0xb7e8a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15) = 0xb7e8a000 mmap2(0xb7e8c000, 4580, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7e8c000 close(3) = 0 open("/usr/local/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340_\1\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1686224, ...}) = 0 mmap2(NULL, 1410500, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d1c000 mmap2(0xb7e6f000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x152) = 0xb7e6f000 mmap2(0xb7e72000, 9668, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7e72000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d1b000 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d1a000 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7d1a6c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 mprotect(0xb7e6f000, 8192, PROT_READ) = 0 mprotect(0xb7e8a000, 4096, PROT_READ) = 0 mprotect(0xb7f39000, 4096, PROT_READ) = 0 mprotect(0xb7f53000, 4096, PROT_READ) = 0 mprotect(0xb7f5e000, 4096, PROT_READ) = 0 mprotect(0xb7fde000, 4096, PROT_READ) = 0 munmap(0xb7f60000, 33705) = 0 set_tid_address(0xb7d1a708) = 18079 set_robust_list(0xb7d1a710, 0xc) = 0 futex(0xbfd47a44, FUTEX_WAKE_PRIVATE, 1) = 0 rt_sigaction(SIGRTMIN, {0xb7e793e0, [], SA_RESTORER|SA_SIGINFO, 0xb7e82fa0}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0xb7e792e0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0xb7e82fa0}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0 uname({sys="Linux", node="DemonVPS", ...}) = 0 brk(0) = 0x84fc000 brk(0x851d000) = 0x851d000 gettimeofday({1299799042, 542931}, NULL) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(0, TIOCNOTTY) = 0 setsid() = 18079 setrlimit(RLIMIT_NOFILE, {rlim_cur=4*1024, rlim_max=4*1024}) = 0 pipe([3, 4]) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7d1a708) = 18080 close(4) = 0 read(3, "0\n", 6) = 2 close(3) = 0 exit_group(0) = ? On 11 March 2011 10:10, Eshan Bhide <ebhide@globalgossip.net> wrote:
Thanks for the replies guys they have been very helpful!
@Bazsi
Here is the ldd /usr/local/lib/syslog-ng/libafsql.so libsyslog-ng.so.0 => /usr/local/lib/libsyslog-ng.so.0 (0xb7f3c000) libdbi.so.1 => /usr/local/lib/libdbi.so.1 (0xb7f30000) libpthread.so.0 => /lib/libpthread.so.0 (0xb7f0e000) libc.so.6 => /lib/libc.so.6 (0xb7db5000) librt.so.1 => /lib/librt.so.1 (0xb7dac000) libnsl.so.1 => /lib/libnsl.so.1 (0xb7d93000) libgmodule-2.0.so.0 => /lib/libgmodule-2.0.so.0 (0xb7d8f000) libdl.so.2 => /lib/libdl.so.2 (0xb7d8a000) libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0xb7d85000) libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0xb7ce7000) libevtlog.so.0 => /usr/local/lib/libevtlog.so.0 (0xb7ce3000) libm.so.6 => /lib/libm.so.6 (0xb7cb9000) /lib/ld-linux.so.2 (0xb7fa1000)
I have upgraded the libdbi to the latest, compiled from source and the message seems to have gone away. Now syslog-ng loads up fine but doesn't seem to be writing anything to the database! I will run strace and post up the results shortly, but in the meantime if there are any ideas on what could be happening I would love to hear.
On 10 March 2011 20:59, Hendrik Visage <hvjunk@gmail.com> wrote:
On Wed, Mar 9, 2011 at 9:04 AM, Gergely Nagy <algernon@balabit.hu> wrote:
Eshan Bhide <ebhide@globalgossip.net> writes:
So far so good, but when I try to run syslog-ng it gives me an error:
syslog-ng Error opening plugin module; module='afsql',
error='/usr/local/lib/syslog-
ng/libafsql.so: undefined symbol: dbi_result_free' Error opening plugin module; module='afsql', error='/usr/local/lib/syslog- ng/libafsql.so: undefined symbol: dbi_result_free' ^^^^^^^^^^^^^^^
The problem lies here: while the module has been compiled, the DBI version is probably not fresh enough. I'd suggest compiling libdbi from CVS.
Perhaps not necessarily from CVS, but do make sure you also compiled the dbi-drivers.
I suspect there might be problems with the afsql not linking/loading libdbi (or it's mysql driver from dbi-drivers)
I'm a low level debugger, so running strace on syslog-ng and posting that would be interesting to confirm/deny my hypothesis.
______________________________________________________________________________ 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
------------------------------------------------- IMPORTANT NOTICE : The information in this email is confidential and may also be privileged. If you are not the intended recipient, any use or dissemination of the information and any disclosure or copying of this email is unauthorised and strictly prohibited. If you have received this email in error, please promptly inform us by reply email or telephone. You should also delete this email and destroy any hard copies produced.
The error seems to be: syslog-ng[48138]: No such DBI driver; type='mysql' I have the following installed: # rpm -qa|grep libdbi libdbi-0.8.1-2.1 libdbi-drivers-0.8.1a-1.2.2 libdbi-dbd-mysql-0.8.1a-1.2.2 Any ideas guys? On 11 March 2011 10:19, Eshan Bhide <ebhide@globalgossip.net> wrote:
@Hendrik, the following is the strace output:
execve("/usr/local/sbin/syslog-ng", ["syslog-ng"], [/* 22 vars */]) = 0 brk(0) = 0x84fc000 uname({sys="Linux", node="DemonVPS", ...}) = 0 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/usr/local/lib/tls/i686/sse2/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/tls/i686/sse2", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/tls/i686/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/tls/i686", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/tls/sse2/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/tls/sse2", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/tls/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/tls", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/i686/sse2/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/i686/sse2", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/i686/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/i686", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/sse2/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/sse2", 0xbfd471a8) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libsyslog-ng.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\354\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1076587, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fc2000 mmap2(NULL, 364228, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f69000 mmap2(0xb7fbe000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x54) = 0xb7fbe000 close(3) = 0 open("/usr/local/lib/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=33705, ...}) = 0 mmap2(NULL, 33705, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f60000 close(3) = 0 open("/lib/librt.so.1", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\30\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=46144, ...}) = 0 mmap2(NULL, 33324, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f57000 mmap2(0xb7f5e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xb7f5e000 close(3) = 0 open("/usr/local/lib/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libnsl.so.1", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@1\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=107924, ...}) = 0 mmap2(NULL, 100296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f3e000 mmap2(0xb7f53000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xb7f53000 mmap2(0xb7f55000, 6088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f55000 close(3) = 0 open("/usr/local/lib/libgmodule-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libgmodule-2.0.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\v\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=9852, ...}) = 0 mmap2(NULL, 8720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f3b000 mmap2(0xb7f3d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7f3d000 close(3) = 0 open("/usr/local/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\n\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=18812, ...}) = 0 mmap2(NULL, 16504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f36000 mmap2(0xb7f39000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7f39000 close(3) = 0 open("/usr/local/lib/libgthread-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libgthread-2.0.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\16\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=14660, ...}) = 0 mmap2(NULL, 17504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f31000 mmap2(0xb7f35000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb7f35000 close(3) = 0 open("/usr/local/lib/libglib-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libglib-2.0.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\315\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=642956, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f30000 mmap2(NULL, 646636, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e92000 mmap2(0xb7f2f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c) = 0xb7f2f000 close(3) = 0 open("/usr/local/lib/libevtlog.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\17\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=41997, ...}) = 0 mmap2(NULL, 15116, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e8e000 mmap2(0xb7e91000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7e91000 close(3) = 0 open("/usr/local/lib/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libpthread.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0PH\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=135892, ...}) = 0 mmap2(NULL, 98788, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e75000 mmap2(0xb7e8a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15) = 0xb7e8a000 mmap2(0xb7e8c000, 4580, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7e8c000 close(3) = 0 open("/usr/local/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340_\1\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1686224, ...}) = 0 mmap2(NULL, 1410500, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d1c000 mmap2(0xb7e6f000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x152) = 0xb7e6f000 mmap2(0xb7e72000, 9668, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7e72000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d1b000 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d1a000 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7d1a6c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 mprotect(0xb7e6f000, 8192, PROT_READ) = 0 mprotect(0xb7e8a000, 4096, PROT_READ) = 0 mprotect(0xb7f39000, 4096, PROT_READ) = 0 mprotect(0xb7f53000, 4096, PROT_READ) = 0 mprotect(0xb7f5e000, 4096, PROT_READ) = 0 mprotect(0xb7fde000, 4096, PROT_READ) = 0 munmap(0xb7f60000, 33705) = 0 set_tid_address(0xb7d1a708) = 18079 set_robust_list(0xb7d1a710, 0xc) = 0 futex(0xbfd47a44, FUTEX_WAKE_PRIVATE, 1) = 0 rt_sigaction(SIGRTMIN, {0xb7e793e0, [], SA_RESTORER|SA_SIGINFO, 0xb7e82fa0}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0xb7e792e0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0xb7e82fa0}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0 uname({sys="Linux", node="DemonVPS", ...}) = 0 brk(0) = 0x84fc000 brk(0x851d000) = 0x851d000 gettimeofday({1299799042, 542931}, NULL) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(0, TIOCNOTTY) = 0 setsid() = 18079 setrlimit(RLIMIT_NOFILE, {rlim_cur=4*1024, rlim_max=4*1024}) = 0 pipe([3, 4]) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7d1a708) = 18080 close(4) = 0 read(3, "0\n", 6) = 2 close(3) = 0 exit_group(0) = ?
On 11 March 2011 10:10, Eshan Bhide <ebhide@globalgossip.net> wrote:
Thanks for the replies guys they have been very helpful!
@Bazsi
Here is the ldd /usr/local/lib/syslog-ng/libafsql.so libsyslog-ng.so.0 => /usr/local/lib/libsyslog-ng.so.0 (0xb7f3c000) libdbi.so.1 => /usr/local/lib/libdbi.so.1 (0xb7f30000) libpthread.so.0 => /lib/libpthread.so.0 (0xb7f0e000) libc.so.6 => /lib/libc.so.6 (0xb7db5000) librt.so.1 => /lib/librt.so.1 (0xb7dac000) libnsl.so.1 => /lib/libnsl.so.1 (0xb7d93000) libgmodule-2.0.so.0 => /lib/libgmodule-2.0.so.0 (0xb7d8f000) libdl.so.2 => /lib/libdl.so.2 (0xb7d8a000) libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0xb7d85000) libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0xb7ce7000) libevtlog.so.0 => /usr/local/lib/libevtlog.so.0 (0xb7ce3000) libm.so.6 => /lib/libm.so.6 (0xb7cb9000) /lib/ld-linux.so.2 (0xb7fa1000)
I have upgraded the libdbi to the latest, compiled from source and the message seems to have gone away. Now syslog-ng loads up fine but doesn't seem to be writing anything to the database! I will run strace and post up the results shortly, but in the meantime if there are any ideas on what could be happening I would love to hear.
On 10 March 2011 20:59, Hendrik Visage <hvjunk@gmail.com> wrote:
On Wed, Mar 9, 2011 at 9:04 AM, Gergely Nagy <algernon@balabit.hu>wrote:
Eshan Bhide <ebhide@globalgossip.net> writes:
So far so good, but when I try to run syslog-ng it gives me an error:
syslog-ng Error opening plugin module; module='afsql',
error='/usr/local/lib/syslog-
ng/libafsql.so: undefined symbol: dbi_result_free' Error opening plugin module; module='afsql', error='/usr/local/lib/syslog- ng/libafsql.so: undefined symbol: dbi_result_free' ^^^^^^^^^^^^^^^
The problem lies here: while the module has been compiled, the DBI version is probably not fresh enough. I'd suggest compiling libdbi from CVS.
Perhaps not necessarily from CVS, but do make sure you also compiled the dbi-drivers.
I suspect there might be problems with the afsql not linking/loading libdbi (or it's mysql driver from dbi-drivers)
I'm a low level debugger, so running strace on syslog-ng and posting that would be interesting to confirm/deny my hypothesis.
______________________________________________________________________________ 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
------------------------------------------------- IMPORTANT NOTICE : The information in this email is confidential and may also be privileged. If you are not the intended recipient, any use or dissemination of the information and any disclosure or copying of this email is unauthorised and strictly prohibited. If you have received this email in error, please promptly inform us by reply email or telephone. You should also delete this email and destroy any hard copies produced.
On Fri, Mar 11, 2011 at 4:31 AM, Eshan Bhide <ebhide@globalgossip.net>wrote:
The error seems to be:
syslog-ng[48138]: No such DBI driver; type='mysql'
I have the following installed:
# rpm -qa|grep libdbi libdbi-0.8.1-2.1 libdbi-drivers-0.8.1a-1.2.2 libdbi-dbd-mysql-0.8.1a-1.2.2
Any ideas guys?
On 11 March 2011 10:19, Eshan Bhide <ebhide@globalgossip.net> wrote:
@Hendrik, the following is the strace output:
retry with strace -ff (ie. trace children too) I suspect your libdbi is searching for the drivers in the wrong place/directory and that is why it doesn't find the mysql driver there.
Hi Hendrik, Still having this problem of "No such DBI driver; type='mysql'" Strace is attached at: http://pastebin.com/qaJZ2ZbE I've tried recompiling by specifying paths and making sure all Env variables are set to current lib paths, upgrading libdbi-drivers from git, and tried different versions of syslog-ng, to no avail! I appreciate any and all help with this silly problem! I've got everything working but can't figure out why I get the no such DBI driver message :( Cheers, Eshan On 11 March 2011 22:07, Hendrik Visage <hvjunk@gmail.com> wrote:
On Fri, Mar 11, 2011 at 4:31 AM, Eshan Bhide <ebhide@globalgossip.net>wrote:
The error seems to be:
syslog-ng[48138]: No such DBI driver; type='mysql'
I have the following installed:
# rpm -qa|grep libdbi libdbi-0.8.1-2.1 libdbi-drivers-0.8.1a-1.2.2 libdbi-dbd-mysql-0.8.1a-1.2.2
Any ideas guys?
On 11 March 2011 10:19, Eshan Bhide <ebhide@globalgossip.net> wrote:
@Hendrik, the following is the strace output:
retry with strace -ff (ie. trace children too) I suspect your libdbi is searching for the drivers in the wrong place/directory and that is why it doesn't find the mysql driver there.
______________________________________________________________________________ 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
------------------------------------------------- IMPORTANT NOTICE : The information in this email is confidential and may also be privileged. If you are not the intended recipient, any use or dissemination of the information and any disclosure or copying of this email is unauthorised and strictly prohibited. If you have received this email in error, please promptly inform us by reply email or telephone. You should also delete this email and destroy any hard copies produced.
On Mon, Mar 14, 2011 at 6:37 AM, Eshan Bhide <ebhide@globalgossip.net>wrote:
Hi Hendrik,
Still having this problem of "No such DBI driver; type='mysql'"
Strace is attached at:
I see libdbi getting loaded, but what I am missing in that strace, is the libdbi searching for it's drivers....
On Mon, 2011-03-14 at 12:54 +0200, Hendrik Visage wrote:
On Mon, Mar 14, 2011 at 6:37 AM, Eshan Bhide <ebhide@globalgossip.net> wrote: Hi Hendrik,
Still having this problem of "No such DBI driver; type='mysql'"
Strace is attached at:
I see libdbi getting loaded, but what I am missing in that strace, is the libdbi searching for it's drivers....
your dbd directory seems empty: [pid 63416] open("/usr/local/lib/dbd", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 9 [pid 63416] fcntl64(9, F_SETFD, FD_CLOEXEC) = 0 [pid 63416] getdents(9, /* 2 entries */, 32768) = 32 [pid 63416] stat64("/usr/local/lib/dbd/.", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 63416] stat64("/usr/local/lib/dbd/..", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 63416] getdents(9, /* 0 entries */, 32768) = 0 As you can see, getdents() returns 2 entries, the one for '.' and the one for '..'. No .so files there. Can you please "ls -l /usr/local/lib/dbd" to confirm? If there are no .so files, we should find out why. Probably libdbi-drivers compilation went bad? -- Bazsi
Thanks guys, it works! The lib/dbd directory was indeed empty, and I recompiled the libdbi-drivers with the correct switches: ./configure --disable-docs --without-oracle \ --with-dbi --with-dbi-incdir='${prefix}/include/' --with-dbi-libdir='${prefix}/lib/' \ --with-freetds --with-mysql --with-pgsql \ --with-sqlite3 --without-sqlite \
From the bash file and everything works sweet as! thank you once again for the help:)
On 15 March 2011 23:19, Balazs Scheidler <bazsi@balabit.hu> wrote:
On Mon, 2011-03-14 at 12:54 +0200, Hendrik Visage wrote:
On Mon, Mar 14, 2011 at 6:37 AM, Eshan Bhide <ebhide@globalgossip.net> wrote: Hi Hendrik,
Still having this problem of "No such DBI driver; type='mysql'"
Strace is attached at:
I see libdbi getting loaded, but what I am missing in that strace, is the libdbi searching for it's drivers....
your dbd directory seems empty:
[pid 63416] open("/usr/local/lib/dbd", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 9 [pid 63416] fcntl64(9, F_SETFD, FD_CLOEXEC) = 0 [pid 63416] getdents(9, /* 2 entries */, 32768) = 32 [pid 63416] stat64("/usr/local/lib/dbd/.", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 63416] stat64("/usr/local/lib/dbd/..", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 63416] getdents(9, /* 0 entries */, 32768) = 0
As you can see, getdents() returns 2 entries, the one for '.' and the one for '..'.
No .so files there. Can you please "ls -l /usr/local/lib/dbd" to confirm?
If there are no .so files, we should find out why. Probably libdbi-drivers compilation went bad?
-- Bazsi
______________________________________________________________________________ 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
------------------------------------------------- IMPORTANT NOTICE : The information in this email is confidential and may also be privileged. If you are not the intended recipient, any use or dissemination of the information and any disclosure or copying of this email is unauthorised and strictly prohibited. If you have received this email in error, please promptly inform us by reply email or telephone. You should also delete this email and destroy any hard copies produced.
participants (5)
-
Balazs Scheidler
-
Eshan Bhide
-
Fekete Robert
-
Gergely Nagy
-
Hendrik Visage