The error seems to be:<div><br><div>syslog-ng[48138]: No such DBI driver; type='mysql'</div><div><br><br></div><div>I have the following installed:</div><div><br></div><div><div><div># rpm -qa|grep libdbi</div><div>
libdbi-0.8.1-2.1</div><div>libdbi-drivers-0.8.1a-1.2.2</div><div>libdbi-dbd-mysql-0.8.1a-1.2.2</div></div></div><div><br></div><div>Any ideas guys?</div><div><br></div><div><div class="gmail_quote">On 11 March 2011 10:19, Eshan Bhide <span dir="ltr"><<a href="mailto:ebhide@globalgossip.net">ebhide@globalgossip.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">@Hendrik, the following is the strace output:<div><br></div><div><br></div><div><div>execve("/usr/local/sbin/syslog-ng", ["syslog-ng"], [/* 22 vars */]) = 0</div>
<div>brk(0) = 0x84fc000</div>
<div>uname({sys="Linux", node="DemonVPS", ...}) = 0</div><div>access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)</div><div>open("/usr/local/lib/tls/i686/sse2/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)</div>
<div>stat64("/usr/local/lib/tls/i686/sse2", 0xbfd471a8) = -1 ENOENT (No such file or directory)</div><div>open("/usr/local/lib/tls/i686/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)</div>
<div>stat64("/usr/local/lib/tls/i686", 0xbfd471a8) = -1 ENOENT (No such file or directory)</div><div>open("/usr/local/lib/tls/sse2/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)</div>
<div>stat64("/usr/local/lib/tls/sse2", 0xbfd471a8) = -1 ENOENT (No such file or directory)</div><div>open("/usr/local/lib/tls/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)</div>
<div>stat64("/usr/local/lib/tls", 0xbfd471a8) = -1 ENOENT (No such file or directory)</div><div>open("/usr/local/lib/i686/sse2/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)</div>
<div>stat64("/usr/local/lib/i686/sse2", 0xbfd471a8) = -1 ENOENT (No such file or directory)</div><div>open("/usr/local/lib/i686/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)</div>
<div>stat64("/usr/local/lib/i686", 0xbfd471a8) = -1 ENOENT (No such file or directory)</div><div>open("/usr/local/lib/sse2/libsyslog-ng.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)</div><div>
stat64("/usr/local/lib/sse2", 0xbfd471a8) = -1 ENOENT (No such file or directory)</div><div>open("/usr/local/lib/libsyslog-ng.so.0", O_RDONLY) = 3</div><div>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</div>
<div>fstat64(3, {st_mode=S_IFREG|0755, st_size=1076587, ...}) = 0</div><div>mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fc2000</div><div>mmap2(NULL, 364228, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f69000</div>
<div>mmap2(0xb7fbe000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x54) = 0xb7fbe000</div><div>close(3) = 0</div><div>open("/usr/local/lib/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)</div>
<div>open("/etc/ld.so.cache", O_RDONLY) = 3</div><div>fstat64(3, {st_mode=S_IFREG|0644, st_size=33705, ...}) = 0</div><div>mmap2(NULL, 33705, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f60000</div><div>close(3) = 0</div>
<div>open("/lib/librt.so.1", O_RDONLY) = 3</div><div>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</div><div>fstat64(3, {st_mode=S_IFREG|0755, st_size=46144, ...}) = 0</div>
<div>mmap2(NULL, 33324, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f57000</div><div>mmap2(0xb7f5e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xb7f5e000</div><div>close(3) = 0</div>
<div>open("/usr/local/lib/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)</div><div>open("/lib/libnsl.so.1", O_RDONLY) = 3</div><div>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</div>
<div>fstat64(3, {st_mode=S_IFREG|0755, st_size=107924, ...}) = 0</div><div>mmap2(NULL, 100296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f3e000</div><div>mmap2(0xb7f53000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xb7f53000</div>
<div>mmap2(0xb7f55000, 6088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f55000</div><div>close(3) = 0</div><div>open("/usr/local/lib/libgmodule-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)</div>
<div>open("/lib/libgmodule-2.0.so.0", O_RDONLY) = 3</div><div>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</div><div>fstat64(3, {st_mode=S_IFREG|0755, st_size=9852, ...}) = 0</div>
<div>mmap2(NULL, 8720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f3b000</div><div>mmap2(0xb7f3d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7f3d000</div><div>close(3) = 0</div>
<div>open("/usr/local/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)</div><div>open("/lib/libdl.so.2", O_RDONLY) = 3</div><div>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</div>
<div>fstat64(3, {st_mode=S_IFREG|0755, st_size=18812, ...}) = 0</div><div>mmap2(NULL, 16504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f36000</div><div>mmap2(0xb7f39000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7f39000</div>
<div>close(3) = 0</div><div>open("/usr/local/lib/libgthread-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)</div><div>open("/lib/libgthread-2.0.so.0", O_RDONLY) = 3</div>
<div>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</div><div>fstat64(3, {st_mode=S_IFREG|0755, st_size=14660, ...}) = 0</div><div>mmap2(NULL, 17504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f31000</div>
<div>mmap2(0xb7f35000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb7f35000</div><div>close(3) = 0</div><div>open("/usr/local/lib/libglib-2.0.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)</div>
<div>open("/lib/libglib-2.0.so.0", O_RDONLY) = 3</div><div>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</div><div>fstat64(3, {st_mode=S_IFREG|0755, st_size=642956, ...}) = 0</div>
<div>mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f30000</div><div>mmap2(NULL, 646636, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e92000</div><div>mmap2(0xb7f2f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c) = 0xb7f2f000</div>
<div>close(3) = 0</div><div>open("/usr/local/lib/libevtlog.so.0", O_RDONLY) = 3</div><div>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</div>
<div>fstat64(3, {st_mode=S_IFREG|0755, st_size=41997, ...}) = 0</div><div>mmap2(NULL, 15116, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e8e000</div><div>mmap2(0xb7e91000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7e91000</div>
<div>close(3) = 0</div><div>open("/usr/local/lib/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)</div><div>open("/lib/libpthread.so.0", O_RDONLY) = 3</div>
<div>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</div><div>fstat64(3, {st_mode=S_IFREG|0755, st_size=135892, ...}) = 0</div><div>mmap2(NULL, 98788, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e75000</div>
<div>mmap2(0xb7e8a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15) = 0xb7e8a000</div><div>mmap2(0xb7e8c000, 4580, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7e8c000</div>
<div>close(3) = 0</div><div>open("/usr/local/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)</div><div>open("/lib/libc.so.6", O_RDONLY) = 3</div>
<div>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</div><div>fstat64(3, {st_mode=S_IFREG|0755, st_size=1686224, ...}) = 0</div><div>mmap2(NULL, 1410500, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d1c000</div>
<div>mmap2(0xb7e6f000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x152) = 0xb7e6f000</div><div>mmap2(0xb7e72000, 9668, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7e72000</div>
<div>close(3) = 0</div><div>mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d1b000</div><div>mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d1a000</div>
<div>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</div><div>mprotect(0xb7e6f000, 8192, PROT_READ) = 0</div>
<div>mprotect(0xb7e8a000, 4096, PROT_READ) = 0</div><div>mprotect(0xb7f39000, 4096, PROT_READ) = 0</div><div>mprotect(0xb7f53000, 4096, PROT_READ) = 0</div><div>mprotect(0xb7f5e000, 4096, PROT_READ) = 0</div><div>
mprotect(0xb7fde000, 4096, PROT_READ) = 0</div><div>munmap(0xb7f60000, 33705) = 0</div><div>set_tid_address(0xb7d1a708) = 18079</div><div>set_robust_list(0xb7d1a710, 0xc) = 0</div><div>
futex(0xbfd47a44, FUTEX_WAKE_PRIVATE, 1) = 0</div>
<div>rt_sigaction(SIGRTMIN, {0xb7e793e0, [], SA_RESTORER|SA_SIGINFO, 0xb7e82fa0}, NULL, 8) = 0</div><div>rt_sigaction(SIGRT_1, {0xb7e792e0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0xb7e82fa0}, NULL, 8) = 0</div><div>rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0</div>
<div>getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0</div><div>uname({sys="Linux", node="DemonVPS", ...}) = 0</div><div>brk(0) = 0x84fc000</div>
<div>brk(0x851d000) = 0x851d000</div><div>gettimeofday({1299799042, 542931}, NULL) = 0</div><div>ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0</div><div>ioctl(0, TIOCNOTTY) = 0</div>
<div>setsid() = 18079</div><div>setrlimit(RLIMIT_NOFILE, {rlim_cur=4*1024, rlim_max=4*1024}) = 0</div><div>pipe([3, 4]) = 0</div><div>clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7d1a708) = 18080</div>
<div>close(4) = 0</div><div>read(3, "0\n", 6) = 2</div><div>close(3) = 0</div><div>exit_group(0) = ?</div>
<div><div></div><div class="h5">
<div><br></div><br><div class="gmail_quote">On 11 March 2011 10:10, Eshan Bhide <span dir="ltr"><<a href="mailto:ebhide@globalgossip.net" target="_blank">ebhide@globalgossip.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for the replies guys they have been very helpful!<div><br></div><div><span style="border-collapse:collapse;color:rgb(32, 32, 32);font-family:'Droid Sans', arial, sans-serif;font-size:13px">@Bazsi</span></div>
<div><font color="#202020" face="'Droid Sans', arial, sans-serif"><span style="border-collapse:collapse"><br></span></font></div><div><font color="#202020" face="'Droid Sans', arial, sans-serif"><span style="border-collapse:collapse">Here is the ldd /usr/local/lib/syslog-ng/libafsql.so<div>
libsyslog-ng.so.0 => /usr/local/lib/libsyslog-ng.so.0 (0xb7f3c000)</div><div> libdbi.so.1 => /usr/local/lib/libdbi.so.1 (0xb7f30000)</div><div> libpthread.so.0 => /lib/libpthread.so.0 (0xb7f0e000)</div>
<div> libc.so.6 => /lib/libc.so.6 (0xb7db5000)</div><div> librt.so.1 => /lib/librt.so.1 (0xb7dac000)</div><div> libnsl.so.1 => /lib/libnsl.so.1 (0xb7d93000)</div><div> libgmodule-2.0.so.0 => /lib/libgmodule-2.0.so.0 (0xb7d8f000)</div>
<div> libdl.so.2 => /lib/libdl.so.2 (0xb7d8a000)</div><div> libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0xb7d85000)</div><div> libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0xb7ce7000)</div>
<div> libevtlog.so.0 => /usr/local/lib/libevtlog.so.0 (0xb7ce3000)</div><div> libm.so.6 => /lib/libm.so.6 (0xb7cb9000)</div><div> /lib/ld-linux.so.2 (0xb7fa1000)</div><div><br></div><div><br></div>
<div>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.</div>
<div><br></div><div><br></div></span></font><br><div class="gmail_quote"><div><div></div><div>On 10 March 2011 20:59, Hendrik Visage <span dir="ltr"><<a href="mailto:hvjunk@gmail.com" target="_blank">hvjunk@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>
<br><br><div class="gmail_quote"><div>On Wed, Mar 9, 2011 at 9:04 AM, Gergely Nagy <span dir="ltr"><<a href="mailto:algernon@balabit.hu" target="_blank">algernon@balabit.hu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div>Eshan Bhide <<a href="mailto:ebhide@globalgossip.net" target="_blank">ebhide@globalgossip.net</a>> writes:<br>
<br>
><br>
> So far so good, but when I try to run syslog-ng it gives me an error:<br>
><br>
> syslog-ng<br>
> Error opening plugin module; module='afsql', error='/usr/local/lib/syslog-<br>
> ng/libafsql.so: undefined symbol: dbi_result_free'<br>
> Error opening plugin module; module='afsql', error='/usr/local/lib/syslog-<br>
> ng/libafsql.so: undefined symbol: dbi_result_free'<br>
</div> ^^^^^^^^^^^^^^^<br>
<br>
The problem lies here: while the module has been compiled, the DBI<br>
version is probably not fresh enough. I'd suggest compiling libdbi from<br>
CVS.<br></blockquote></div><div><br>Perhaps not necessarily from CVS, but do make sure you also compiled the dbi-drivers.<br><br>I suspect there might be problems with the afsql not linking/loading libdbi (or it's mysql driver from dbi-drivers)<br>
<br>I'm a low level debugger, so running strace on syslog-ng and posting that would be interesting to confirm/deny my hypothesis.<br><br></div></div>
<br></div></div><div>______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.campin.net/syslog-ng/faq.html" target="_blank">http://www.campin.net/syslog-ng/faq.html</a><br>
<br>
<br></div></blockquote></div><br></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div>
<pre>-------------------------------------------------
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.