PC 15.04 Installation Error: " WARN 13:49:05,621 Cannot initialize native Snappy library. Compression on new tables will be disabled."

Not applicable

I am receiving the "snappy" library error below while attempting Private Cloud installations. As the end of the error is:

" WARN 13:49:05,621 Cannot initialize native Snappy library. Compression on new tables will be disabled."

is this error critical? Or will C* run properly with "un-"compressed tables?

Thank you.

java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.xerial.snappy.SnappyLoader.loadNativeLibrary(SnappyLoader.java:322)

at org.xerial.snappy.SnappyLoader.load(SnappyLoader.java:229)

at org.xerial.snappy.Snappy.<clinit>(Snappy.java:48)

at org.apache.cassandra.io.compress.SnappyCompressor.create(SnappyCompressor.java:45)

at org.apache.cassandra.io.compress.SnappyCompressor.isAvailable(SnappyCompressor.java:55)

at org.apache.cassandra.io.compress.SnappyCompressor.<clinit>(SnappyCompressor.java:37)

at org.apache.cassandra.config.CFMetaData.<clinit>(CFMetaData.java:82)

at org.apache.cassandra.config.KSMetaData.systemKeyspace(KSMetaData.java:81)

at org.apache.cassandra.config.DatabaseDescriptor.loadYaml(DatabaseDescriptor.java:496)

at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:132)

at org.apache.cassandra.tools.NodeCmd.printRing(NodeCmd.java:280)

at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:1187)

Caused by: java.lang.UnsatisfiedLinkError: /tmp/snappy-1.0.5-libsnappyjava.so: /tmp/snappy-1.0.5-libsnappyjava.so: failed to map segment from shared object: Operation not permitted

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)

at java.lang.Runtime.load0(Runtime.java:795)

at java.lang.System.load(System.java:1062)

at org.xerial.snappy.SnappyNativeLoader.load(SnappyNativeLoader.java:39)

... 16 more

WARN 13:49:05,621 Cannot initialize native Snappy library. Compression on new tables will be disabled.

Solved Solved
0 2 993
1 ACCEPTED SOLUTION

Not applicable

While the execute bit is set on the tmp directory for root & group, this installation was done as a normal user. In this case the issue was indeed that the library could not execute from the /tmp directory. The solution was to create a "local" ~/tmp directory for the user, and run the lib from there.

View solution in original post

2 REPLIES 2

Not applicable

Additional Info: it was suggested the "/tmp" dir did not allow "execute", but it looks like the bit is set:

[ apigee]$ ls -al /tmp

total 527080

drwxrwxrwt. 7 root root 4096 Jul 15 14:22 .

dr-xr-xr-x. 25 root root 4096 Jun 29 14:16 ..

-rwxr-xr-x. 1 mwadmin mwadmin 48432 Jul 15 13:48 snappy-1.0.5-libsnappyjava.so

[ apigee]$

Not applicable

While the execute bit is set on the tmp directory for root & group, this installation was done as a normal user. In this case the issue was indeed that the library could not execute from the /tmp directory. The solution was to create a "local" ~/tmp directory for the user, and run the lib from there.