fatal: [Neo4J1]: FAILED! => { "cmd": "/opt/netops-topology/neo4j/bin/neo4j-admin server license --accept-commercial", "stderr": "java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: /home/neo4j/.cache/JNA/temp/jna...tmp: ... failed to map segment from shared object\n\tat org.neo4j.internal.unsafe.UnsafeUtil.allocateByteBuffer(UnsafeUtil.java:638)\n...Caused by: java.lang.UnsatisfiedLinkError: /home/neo4j/.cache/JNA/temp/jna...tmp: /home/neo4j/.cache/JNA/temp/jna...tmp: failed to map segment from shared object" }
This java.lang.UnsatisfiedLinkError (specifically "failed to map segment from shared object") indicates that the Java Virtual Machine (JVM) running Neo4j, via its Java Native Access (JNA) library, cannot properly load or execute necessary temporary native libraries.
DX NetOps Topology 24.3.13 release
This error is due to one or a combination of the following issues on the Linux server where Neo4j is being installed:
To successfully install and run Neo4j with DX NetOps Topology, ensure the following configurations are in place for the user running the Neo4j process (e.g., neo4j user):
Log in as root or a user with sudo privileges to the server where Neo4j is being installed (Neo4J1 in the error).
Edit the /etc/security/limits.conf file.
Add or modify the following lines for the neo4j user (replace neo4j with your actual Neo4j OS user if different):
# Neo4j user limits for optimal performance and stability
neo4j soft nofile 65536
neo4j hard nofile 65536
neo4j soft nproc 65536
neo4j hard nproc 65536
neo4j soft memlock unlimited
neo4j hard memlock unlimited
neo4j soft as unlimited
neo4j hard as unlimited
Save the file.
Apply ulimit changes: For these changes to take effect, the neo4j user needs to log out and log back in, or the server can be rebooted. Ensure that the Ansible execution environment for the Neo4j tasks correctly inherits these new limits.
The JNA library often extracts temporary native code into a cache within the user's home directory (e.g., /home/neo4j/.cache/JNA/temp/). For these native libraries to be loaded and executed, the containing directory path must have execute permissions.
After implementing the above changes, re-run the DX NetOps Topology installation process (or the specific Ansible playbook task) that previously failed. The Neo4j license acceptance should now complete successfully.