cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolai Grigoriev (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6301) nodetool fails with java.lang.UnsatisfiedLinkError (cannot find when JEMalloc is configured
Date Tue, 05 Nov 2013 20:28:17 GMT


Nikolai Grigoriev commented on CASSANDRA-6301:

Hmmm...I do not think it is sourced by nodetool.

/opt/apache-cassandra-2.0.2 >grep bin/* conf/*
bin/cassandra:if [ -f "$CASSANDRA_CONF/" ]; then
bin/cassandra:    . "$CASSANDRA_CONF/"
bin/debug-cql:if [ -f "$CASSANDRA_CONF/" ]; then
bin/debug-cql:    . "$CASSANDRA_CONF/"
conf/        echo "please set or unset MAX_HEAP_SIZE and HEAP_NEWSIZE in
pairs (see"
conf/ in
conf/cassandra.yaml:# modify as directed in the file.

I see that nodetool invokes JAVA directly, so it is sourced only by cassandra itself and debug-cql.
And it seems to me that sourcing from the tools would not be appropriate
- it contains a number of settings that are server-specific all packed in JVM_OPTS. Or I am
missing something...

The allocator is probably not needed, but, in general, a tool might need a native library
that is used by the server too. Maybe I am using wrong example but something like native snappy probably it may make sense to use the same set of native libraries for the tools
as for the server itself. Even if not really needed now this may be more useful in the future.
Just my two cents.

> nodetool fails with java.lang.UnsatisfiedLinkError (cannot find when
JEMalloc is configured
> -----------------------------------------------------------------------------------------------------------
>                 Key: CASSANDRA-6301
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: Linux
> Cassandra 2.0.2
> in /usr/local/lib
>            Reporter: Nikolai Grigoriev
>            Priority: Trivial
> {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
>  r1          Up     Normal  125.88 GB       16.41%              -9222548266947385654
>  r1          Up     Normal  125.88 GB       16.41%              -9177629719965963707
>  r1          Up     Normal  125.88 GB       16.41%              -9039272433194428886
>  r1          Up     Normal  125.88 GB       16.41%              -9037742357058937987
> ...
> Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'jemalloc': cannot open shared object file: No such file or directory
>         at com.sun.jna.NativeLibrary.loadLibrary(
>         at com.sun.jna.NativeLibrary.getInstance(
>         at com.sun.jna.Library$Handler.<init>(
>         at com.sun.jna.Native.loadLibrary(
>         at com.sun.jna.Native.loadLibrary(
>         at<init>(
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
>         at java.lang.reflect.Constructor.newInstance(
>         at java.lang.Class.newInstance(
>         at org.apache.cassandra.utils.FBUtilities.construct(
>         at org.apache.cassandra.utils.FBUtilities.newOffHeapAllocator(
>         at org.apache.cassandra.config.DatabaseDescriptor.applyConfig(
>         at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(
>         at
>         at
> {code}
> In my conf/ I have:
> {code}
> # Configure the following for JEMallocAllocator and if jemalloc is not available in the
> # 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

View raw message