DataStax Help Center

Graph loader throws "failed to map segment from shared object" warning


When using the DataStax Graph Loader it will default to executing some code from /tmp. In some systems with noexec used as a mount option on the /tmp partition this can cause a warning message to be observed


The following message may be seen when running the graph loader:

java.lang.UnsatisfiedLinkError: /tmp/ /tmp/ failed to map segment from shared object: Operation not permitted 
at java.lang.ClassLoader$NativeLibrary.load(Native Method) 
at java.lang.ClassLoader.loadLibrary0( 
at java.lang.ClassLoader.loadLibrary( 
at java.lang.Runtime.load0( 
at java.lang.System.load( 
at io.netty.util.internal.NativeLibraryLoader.load( 
at java.lang.Class.forName0(Native Method) 
at java.lang.Class.forName( 
at com.datastax.driver.core.NettyUtil.<clinit>( 
at com.datastax.driver.core.NettyOptions.eventLoopGroup( 
at com.datastax.driver.core.Connection$Factory.<init>( 
at com.datastax.driver.core.Cluster$Manager.init( 
at com.datastax.driver.core.Cluster.getMetadata( 
at com.datastax.driver.core.DelegatingCluster.getMetadata( 
at com.datastax.dsegraphloader.api.DataLoader.connect( 
at com.datastax.dsegraphloader.cli.Executable.execute( 
at com.datastax.dsegraphloader.cli.Executable.main( 


Often for security reasons the /tmp directory will be mounted with the noexec flag. It may also have other flags too like nosuid and nodev. In such cases this will affect the graph loader as it typically executes some code from/tmp


The graphloader script can be edited to add the following parameter, for example:

# Uncomment to enable debugging
#JVM_OPTS="$JVM_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=1414"
export JVM_OPTS="$JVM_OPTS <-- inserted here
echo "$JAVA" $JVM_OPTS com.datastax.dsegraphloader.cli.Executable $VARS
exec "$JAVA" $JVM_OPTS com.datastax.dsegraphloader.cli.Executable $VARS 


At the time of writing this article the workaround above is the only way to change the temporary directory location for the graph loader. The following internal jira tracks the need to add a parameter to the loader

DGL-167 - Make explicit parameter for setting tmp dir

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk