ankiit / logstash

Automatically exported from code.google.com/p/logstash
0 stars 0 forks source link

/usr/lib/libgrok.so: undefined symbol: tccmpint32 (LoadError) #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Starting logstash results in the server not starting with the following error:

I, [2011-03-28T17:33:01.273675 #20283]  INFO -- logstash: Registering 
file://<server>/var/log/messages
/usr/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/lib/ffi/library.rb:61:in `block in 
ffi_lib': Could not open library 'libgrok': libgrok: cannot open shared object 
file: No such file or directory. Could not open library 'libgrok.so': 
/usr/lib/libgrok.so: undefined symbol: tccmpint32 (LoadError)
        from /usr/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/lib/ffi/library.rb:43:in `map'
        from /usr/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/lib/ffi/library.rb:43:in `ffi_lib'
        from /usr/lib/ruby/gems/1.9.1/gems/jls-grok-0.4.6/lib/grok.rb:7:in `<module:CGrok>'
        from /usr/lib/ruby/gems/1.9.1/gems/jls-grok-0.4.6/lib/grok.rb:5:in `<class:Grok>'
        from /usr/lib/ruby/gems/1.9.1/gems/jls-grok-0.4.6/lib/grok.rb:4:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from /usr/lib/ruby/gems/1.9.1/gems/logstash-0.2.20110206003556/lib/logstash/filters/grok.rb:5:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from /usr/lib/ruby/gems/1.9.1/gems/logstash-0.2.20110206003556/lib/logstash/filters.rb:11:in `from_name'
        from /usr/lib/ruby/gems/1.9.1/gems/logstash-0.2.20110206003556/lib/logstash/agent.rb:74:in `block in register'
        from /usr/lib/ruby/gems/1.9.1/gems/logstash-0.2.20110206003556/lib/logstash/agent.rb:71:in `each'
        from /usr/lib/ruby/gems/1.9.1/gems/logstash-0.2.20110206003556/lib/logstash/agent.rb:71:in `register'
        from /usr/lib/ruby/gems/1.9.1/gems/logstash-0.2.20110206003556/lib/logstash/agent.rb:96:in `block in run'
        from /usr/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `call'
        from /usr/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
        from /usr/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
        from /usr/lib/ruby/gems/1.9.1/gems/logstash-0.2.20110206003556/lib/logstash/agent.rb:95:in `run'
        from /usr/lib/ruby/gems/1.9.1/gems/logstash-0.2.20110206003556/bin/logstash:86:in `<top (required)>'
        from /usr/bin/logstash:19:in `load'
        from /usr/bin/logstash:19:in `<main>'

This is using grok-1.20110308.1 on a 64 bit system. Grok compiles and install 
fine so I am not sure if the error is with grok of logstash

Original issue reported on code.google.com by tom.ash...@gmail.com on 28 Mar 2011 at 4:35

GoogleCodeExporter commented 9 years ago
Sounds like a tokyocabinet problem; tccmpint32 is a tokyocabinet function, so I 
bet libgrok can't find libtokyocabinet. You can confirm this by using 'ldd'

% ldd /usr/lib/libgrok.so.1 | grep tokyo
        libtokyocabinet.so.9 => /usr/local/lib/libtokyocabinet.so.9 (0x00007f942ae87000)

Is libtokyocabinet.so (or similar) missing on your system?  What version of 
tokyocabinet do you have? 

Original comment by jls.semi...@gmail.com on 28 Mar 2011 at 4:56

GoogleCodeExporter commented 9 years ago
I do have tokyocabinet - I needed it to compile grok.

ldd only returns
# ldd /usr/lib/libgrok.so.1 
        linux-vdso.so.1 =>  (0x00007fffa79ff000)
        libc.so.6 => /lib/libc.so.6 (0x00007fad26bd1000)
        /lib/ld-linux-x86-64.so.2 (0x00007fad27175000)

tokyocabinet is ver 1.4.46-1

and I have /usr/lib/libtokyocabinet.so.9

Original comment by tom.ash...@gmail.com on 28 Mar 2011 at 5:44

GoogleCodeExporter commented 9 years ago
Sounds like grok isn't linked properly. Yours is missing libdl, libpcre, 
libevent, libtokyocabinet, etc.

        linux-vdso.so.1 =>  (0x00007fffc89ff000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007f4bb22d5000)
        libpcre.so.3 => /lib/libpcre.so.3 (0x00007f4bb20a7000)
        libevent-1.4.so.2 => /usr/lib/libevent-1.4.so.2 (0x00007f4bb1e8c000)
        libtokyocabinet.so.9 => /usr/local/lib/libtokyocabinet.so.9 (0x00007f4bb1c09000)
        libc.so.6 => /lib/libc.so.6 (0x00007f4bb1886000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f4bb2713000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x00007f4bb166b000)
        librt.so.1 => /lib/librt.so.1 (0x00007f4bb1463000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x00007f4bb124a000)
        libbz2.so.1.0 => /lib/libbz2.so.1.0 (0x00007f4bb1038000)
        libz.so.1 => /lib/libz.so.1 (0x00007f4bb0e21000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f4bb0c04000)
        libm.so.6 => /lib/libm.so.6 (0x00007f4bb0980000)

If you compile libgrok with 'make libgrok.so' what does 'ldd ./libgrok.so' say 
after building?

Original comment by jls.semi...@gmail.com on 28 Mar 2011 at 5:51

GoogleCodeExporter commented 9 years ago
Strange.
I recompiled and ran
make grok
instead of just make. It seems to have linked properly this time.

Thanks for your help.
logstash -f logstash-grep.yaml 
I, [2011-03-28T21:07:00.518179 #13663]  INFO -- logstash: Registering 
file://<server>/var/log/messages

Original comment by tom.ash...@gmail.com on 28 Mar 2011 at 8:08

GoogleCodeExporter commented 9 years ago
Sweet, glad it's working for you now :)

Original comment by jls.semi...@gmail.com on 28 Mar 2011 at 9:35