rdkit/neo4j-rdkit

error with docker ne4j / community edition

pi-at-git opened this issue · 3 comments

I attempt the following commands to start neo4j 4.1.3 CE with latest rdkit & apoc plugin

rm -r ~/docker_vols_neo4j_4.1.3

mkdir ~/docker_vols_neo4j_4.1.3
mkdir ~/docker_vols_neo4j_4.1.3/plugins
mkdir ~/docker_vols_neo4j_4.1.3/deb
mkdir ~/docker_vols_neo4j_4.1.3/data

cp ~/Downloads/neo4j_rdkit_docker/plugins/apoc-4.1.0.2-all.jar ~/docker_vols_neo4j_4.1.3/plugins/
cp ~/Downloads/neo4j_rdkit_docker/plugins/rdkit-index-1.1.0-SNAPSHOT-4.1.jar ~/docker_vols_neo4j_4.1.3/plugins/
cp ~/Downloads/neo4j_rdkit_docker/deb/libpng16-16_1.6.36-6_amd64.deb ~/docker_vols_neo4j_4.1.3/deb/
cp ~/Downloads/neo4j_rdkit_docker/deb/libfreetype6_2.9.1-3+deb10u2_amd64.deb ~/docker_vols_neo4j_4.1.3/deb/
cp ~/Downloads/neo4j_rdkit_docker/deb/install_debs.sh ~/docker_vols_neo4j_4.1.3/deb/

chmod 644 ~/docker_vols_neo4j_4.1.3/plugins/.jar
chmod 644 ~/docker_vols_neo4j_4.1.3/deb/
.deb
chmod 755 ~/docker_vols_neo4j_4.1.3/deb/*.sh

docker run --rm
-p 127.0.0.1:7474:7474
-p 127.0.0.1:7687:7687
-v ~/docker_vols_neo4j_4.1.3/plugins:/var/lib/neo4j/plugins
-v ~/docker_vols_neo4j_4.1.3/data:/var/lib/neo4j/data
-e NEO4J_AUTH=none
-e NEO4J_dbms_memory_pagecache_size=8G
-e NEO4J_dbms_memory_heap_max__size=16G
-e NEO4J_dbms_security_procedures_unrestricted=\*
-e EXTENSION_SCRIPT=/deb/install_debs.sh
-e NEO4J_rdkit_index_sanitize=true
--user=$(id -u):$(id -g)
neo4j:4.1.3

and receive the following error:

Directories in use:
home: /var/lib/neo4j
config: /var/lib/neo4j/conf
logs: /logs
plugins: /var/lib/neo4j/plugins
import: /var/lib/neo4j/import
data: /var/lib/neo4j/data
certificates: /var/lib/neo4j/certificates
run: /var/lib/neo4j/run
Starting Neo4j.
APOC couln't set a URLStreamHandlerFactory since some other tool already did this (e.g. tomcat). This means you cannot use s3:// or hdfs:// style URLs in APOC. This is caused by a limitation of the JVM which we cannot fix.
2020-11-03 20:12:48.858+0000 INFO Starting...
2020-11-03 20:12:51.198+0000 INFO ======== Neo4j 4.1.3 ========
2020-11-03 20:12:51.641+0000 INFO Loading libraries from JAR
2020-11-03 20:12:51.775+0000 INFO trying to load native library /tmp/rdkit-5402050139939947324/libGraphMolWrap.so
2020-11-03 20:12:51.788+0000 ERROR Failed to start Neo4j on dbms.connector.http.listen_address, a socket address. If missing port or hostname it is acquired from dbms.default_listen_address. Error starting Neo4j database server at /data/databases
java.lang.RuntimeException: Error starting Neo4j database server at /data/databases
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:198)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:158)
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:117)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:87)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:35)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.rdkit.neo4j.bin.LibraryLoaderLifecycle@4c361f63' failed to initialize. Please see the attached cause exception "/tmp/rdkit-5402050139939947324/libGraphMolWrap.so: libfreetype.so.6: cannot open shared object file: No such file or directory".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:424)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:65)
at org.neo4j.kernel.extension.AbstractExtensions.init(AbstractExtensions.java:76)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:403)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:65)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:101)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:189)
... 5 more
Caused by: java.lang.UnsatisfiedLinkError: /tmp/rdkit-5402050139939947324/libGraphMolWrap.so: libfreetype.so.6: cannot open shared object file: No such file or directory
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1837)
at org.rdkit.neo4j.bin.LibraryLoaderLifecycle.lambda$loadNativeLibraries$0(LibraryLoaderLifecycle.java:78)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.rdkit.neo4j.bin.LibraryLoaderLifecycle.loadNativeLibraries(LibraryLoaderLifecycle.java:76)
at org.rdkit.neo4j.bin.LibraryLoaderLifecycle.init(LibraryLoaderLifecycle.java:58)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:403)
... 11 more
2020-11-03 20:12:51.789+0000 INFO Neo4j Server shutdown initiated by request

Neo4j successfully starts after removal of the rdkit-plugin from the plugins folder

Directories in use:
home: /var/lib/neo4j
config: /var/lib/neo4j/conf
logs: /logs
plugins: /var/lib/neo4j/plugins
import: /var/lib/neo4j/import
data: /var/lib/neo4j/data
certificates: /var/lib/neo4j/certificates
run: /var/lib/neo4j/run
Starting Neo4j.
APOC couln't set a URLStreamHandlerFactory since some other tool already did this (e.g. tomcat). This means you cannot use s3:// or hdfs:// style URLs in APOC. This is caused by a limitation of the JVM which we cannot fix.
2020-11-03 20:20:09.130+0000 WARN Unrecognized setting. No declared setting with name: rdkit.index.sanitize
2020-11-03 20:20:09.134+0000 INFO Starting...
2020-11-03 20:20:11.389+0000 INFO ======== Neo4j 4.1.3 ========
2020-11-03 20:20:20.729+0000 INFO Initializing system graph model for component 'security-users' with version -1 and status UNINITIALIZED
2020-11-03 20:20:20.739+0000 INFO Setting up initial user from defaults: neo4j
2020-11-03 20:20:20.739+0000 INFO Creating new user 'neo4j' (passwordChangeRequired=true, suspended=false)
2020-11-03 20:20:20.758+0000 INFO Setting version for 'security-users' to 2
2020-11-03 20:20:20.770+0000 INFO After initialization of system graph model component 'security-users' have version 2 and status CURRENT
2020-11-03 20:20:20.778+0000 INFO Performing postInitialization step for component 'security-users' with version 2 and status CURRENT
2020-11-03 20:20:23.143+0000 INFO Called db.clearQueryCaches(): Query cache already empty.
2020-11-03 20:20:23.210+0000 INFO Bolt enabled on 0.0.0.0:7687.
2020-11-03 20:20:24.259+0000 INFO Remote interface available at http://localhost:7474/
2020-11-03 20:20:24.261+0000 INFO Started.

Can you please try to add a volume mount for /deb and remove the user mapping:

docker run --rm
-p 127.0.0.1:7474:7474
-p 127.0.0.1:7687:7687
-v ~/docker_vols_neo4j_4.1.3/plugins:/var/lib/neo4j/plugins
-v ~/docker_vols_neo4j_4.1.3/data:/var/lib/neo4j/data
-v ~/docker_vols_neo4j_4.1.3/deb:/deb
-e NEO4J_AUTH=none
-e NEO4J_dbms_memory_pagecache_size=8G
-e NEO4J_dbms_memory_heap_max__size=16G
-e NEO4J_dbms_security_procedures_unrestricted=\*
-e EXTENSION_SCRIPT=/deb/install_debs.sh
-e NEO4J_rdkit_index_sanitize=true
neo4j:4.1.3

works now! thanks for the quick response