You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Nikolai Grigoriev (JIRA)" <ji...@apache.org> on 2013/11/06 02:02:16 UTC

[jira] [Comment Edited] (CASSANDRA-6301) nodetool fails with java.lang.UnsatisfiedLinkError (cannot find libjemalloc.so) when JEMalloc is configured

    [ https://issues.apache.org/jira/browse/CASSANDRA-6301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13814475#comment-13814475 ] 

Nikolai Grigoriev edited comment on CASSANDRA-6301 at 11/6/13 1:01 AM:
-----------------------------------------------------------------------

[~brandon.williams]

Indeed, your fix indirectly fixes this problem because by sourcing cassandra-end.sh it effectively does this:

{code}
export LD_LIBRARY_PATH=/usr/local/lib
{code}

I have applied your patch to test it to confirm that it does help. I took the liberty of closing this issue and linking it to CASSANDRA-6273. Thanks!



was (Author: ngrigoriev):
[~brandon.williams]

Indeed, your fix indirectly fixes this problem because by sourcing cassandra-end.sh it effectively does this:

{code}
export LD_LIBRARY_PATH=/usr/local/lib
{code}



> nodetool fails with java.lang.UnsatisfiedLinkError (cannot find libjemalloc.so) when JEMalloc is configured
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6301
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6301
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: Linux
> Cassandra 2.0.2
> libjemalloc.so in /usr/local/lib
>            Reporter: Nikolai Grigoriev
>            Priority: Trivial
>             Fix For: 2.0.3
>
>
> {code}
> >/opt/apache-cassandra-2.0.2/bin/nodetool ring
> Note: Ownership information does not include topology; for complete information, specify a keyspace
> Datacenter: DC1
> ==========
> Address      Rack        Status State   Load            Owns                Token
>                                                                             9208241795664305161
> 10.3.45.160  r1          Up     Normal  125.88 GB       16.41%              -9222548266947385654
> 10.3.45.160  r1          Up     Normal  125.88 GB       16.41%              -9177629719965963707
> 10.3.45.160  r1          Up     Normal  125.88 GB       16.41%              -9039272433194428886
> 10.3.45.160  r1          Up     Normal  125.88 GB       16.41%              -9037742357058937987
> ...
> Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'jemalloc': libjemalloc.so: cannot open shared object file: No such file or directory
>         at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:164)
>         at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:237)
>         at com.sun.jna.Library$Handler.<init>(Library.java:140)
>         at com.sun.jna.Native.loadLibrary(Native.java:375)
>         at com.sun.jna.Native.loadLibrary(Native.java:359)
>         at org.apache.cassandra.io.util.JEMallocAllocator.<init>(JEMallocAllocator.java:36)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>         at java.lang.Class.newInstance(Class.java:374)
>         at org.apache.cassandra.utils.FBUtilities.construct(FBUtilities.java:488)
>         at org.apache.cassandra.utils.FBUtilities.newOffHeapAllocator(FBUtilities.java:438)
>         at org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:442)
>         at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:104)
>         at org.apache.cassandra.tools.NodeCmd.printRing(NodeCmd.java:286)
>         at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:1092)
> {code}
> In my conf/cassandra-env.sh I have:
> {code}
> # Configure the following for JEMallocAllocator and if jemalloc is not available in the system
> # library path (Example: /usr/local/lib/). Usually "make install" will do the right thing.
> export LD_LIBRARY_PATH=/usr/local/lib
> JVM_OPTS="$JVM_OPTS -Djava.library.path=/usr/local/lib/"
> {code}
> I believe this file is not sourced by the tools, this is why a tool that might need that library cannot find it.



--
This message was sent by Atlassian JIRA
(v6.1#6144)