DozerDB / dozerdb-plugin

Free and Open Source Plugin that adds enterprise features to Neo4j Community Distributions
GNU General Public License v3.0
44 stars 3 forks source link

Neo4j+dozerdb wont start with GDS #6

Closed Praniyendeev closed 8 months ago

Praniyendeev commented 8 months ago

Hi all,

I am unable to start my neo4j instance with dozerdb plugin, with the GDS 2.6.0 plugin. Is this behavior expected? Some relevant info:

  1. neo4j version: neo4j-community-5.12.0
  2. dozerdb version: dozerdb-plugin-5.12.0.0-alpha.1.jar

When running the ./neo4j console command i get the following error:

Directories in use:                                                                                                                    
home:         /mnt/nvme/node02/pranav/neo4j-community-5.12.0                                                                           
config:       /mnt/nvme/node02/pranav/neo4j-community-5.12.0/conf                                                                      
logs:         /mnt/nvme/node02/pranav/neo4j-community-5.12.0/logs                                                                      
plugins:      /mnt/nvme/node02/pranav/neo4j-community-5.12.0/plugins                                                                   
import:       /mnt/nvme/node02/pranav/neo4j-community-5.12.0/import                                                                    
data:         /mnt/nvme/node02/pranav/neo4j-community-5.12.0/data                                                                      
certificates: /mnt/nvme/node02/pranav/neo4j-community-5.12.0/certificates                                                              
licenses:     /mnt/nvme/node02/pranav/neo4j-community-5.12.0/licenses                                                                  
run:          /mnt/nvme/node02/pranav/neo4j-community-5.12.0/run                                                                       
Starting Neo4j.                                                                                                                        
2024-02-06 23:29:51.447+0000 INFO  Logging config in use: File '/mnt/nvme/node02/pranav/neo4j-community-5.12.0/conf/user-logs.xml'     
2024-02-06 23:29:51.466+0000 INFO  Starting...                                                                                         
2024-02-06 23:29:51.466+0000 INFO                                                                                                      

*****************************************************************************                                                          
 *********************** Enhanced By DozerDB Plugin ***********************                                                            
*****************************************************************************                                                          

2024-02-06 23:29:52.591+0000 INFO  This instance is ServerId{f5496e96} (f5496e96-32cf-4a1e-b3ef-ee78aa7fc82e)                          
2024-02-06 23:29:53.396+0000 INFO  ======== Neo4j 5.12.0 ========                                                                      
2024-02-06 23:29:53.490+0000 INFO  Progress tracking: enabled                                                                          
2024-02-06 23:29:53.491+0000 INFO  Memory usage guard: minimum estimate                                                                
2024-02-06 23:29:53.495+0000 INFO  GDS license file: null                                                                              
2024-02-06 23:29:53.496+0000 INFO  GDS license state: unlicensed                                                                       
2024-02-06 23:29:53.503+0000 INFO  Register GraphDataScience...                                                                        
2024-02-06 23:29:53.520+0000 INFO  GraphDataScience registered.                                                                        
2024-02-06 23:29:53.521+0000 INFO  Register GraphDataScienceExtras...                                                                  
2024-02-06 23:29:53.521+0000 INFO  GraphDataScienceExtras registered.                                                                  
2024-02-06 23:29:53.521+0000 INFO  Register MetricsFacade...                                                                           
2024-02-06 23:29:53.522+0000 INFO  MetricsFacade registered.                                                                           
2024-02-06 23:29:53.523+0000 INFO  Register legacy Task Store/ Registry...                                                             
2024-02-06 23:29:53.524+0000 INFO  Task Store/ Registry registered.                                                                    
2024-02-06 23:29:53.524+0000 INFO  Register legacy User Log Registry...                                                                
2024-02-06 23:29:53.525+0000 INFO  User Log Registry registered.                                                                       
2024-02-06 23:29:53.539+0000 ERROR Failed to start Neo4j on localhost:7474.                                                            
java.lang.RuntimeException: Error starting Neo4j database server at /mnt/nvme/node02/pranav/neo4j-community-5.12.0/data/databases      
        at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:272) ~[n
eo4j-5.12.0.jar:5.12.0]
        at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:208) ~[neo4j-5.12.0.ja
r:5.12.0]
        at org.neo4j.server.DozerDbBootstrapper.createNeo(DozerDbBootstrapper.java:46) ~[dozerdb-plugin-5.12.0.0-alpha.1.jar:?]
        at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:187) [neo4j-5.12.0.jar:?]
        at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:99) [neo4j-5.12.0.jar:?]
        at org.neo4j.server.DozerDbEntryPoint.main(DozerDbEntryPoint.java:48) [dozerdb-plugin-5.12.0.0-alpha.1.jar:?]
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.GlobalExtensions@31e32ea2' failed to in
itialize. Please see the attached cause exception "io.prometheus.client.Collector".
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:335) ~[neo4j-common-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:57) ~[neo4j-common-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:86) ~[neo4j-common-5.12.0.jar:5.12.0]
        at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:263) ~[n
eo4j-5.12.0.jar:5.12.0]
        ... 5 more
Caused by: org.neo4j.kernel.extension.FailedToBuildExtensionException: Failed to build kernel extension Extension:GdsMetricsExtension[g
ds.metrics] because it is compiled with a reference to a class, method, or field, that is not in the class path: 'io/prometheus/client/
Collector'. The most common cause of this problem, is that Neo4j has been upgraded without also upgrading all installed extensions, suc
h as APOC. Make sure that all of your extensions are build against your specific version of Neo4j.
        at org.neo4j.kernel.extension.ExtensionFailureStrategies.wrap(ExtensionFailureStrategies.java:56) ~[neo4j-kernel-5.12.0.jar:5.1
2.0]
        at org.neo4j.kernel.extension.ExtensionFailureStrategies$1.handle(ExtensionFailureStrategies.java:68) ~[neo4j-kernel-5.12.0.jar
:5.12.0]
        at org.neo4j.kernel.extension.AbstractExtensions.init(AbstractExtensions.java:69) ~[neo4j-kernel-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:318) ~[neo4j-common-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:57) ~[neo4j-common-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:86) ~[neo4j-common-5.12.0.jar:5.12.0]
        at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:263) ~[n
eo4j-5.12.0.jar:5.12.0]
        ... 5 more
Caused by: java.lang.NoClassDefFoundError: io/prometheus/client/Collector
        at com.neo4j.gds.metrics.GdsMetricsExtension.newInstance(GdsMetricsExtension.java:42) ~[neo4j-graph-data-science-2.6.0.jar:?]
        at com.neo4j.gds.metrics.GdsMetricsExtension.newInstance(GdsMetricsExtension.java:30) ~[neo4j-graph-data-science-2.6.0.jar:?]
        at org.neo4j.kernel.extension.AbstractExtensions.newInstance(AbstractExtensions.java:125) ~[neo4j-kernel-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.extension.AbstractExtensions.init(AbstractExtensions.java:63) ~[neo4j-kernel-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:318) ~[neo4j-common-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:57) ~[neo4j-common-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:86) ~[neo4j-common-5.12.0.jar:5.12.0]
        at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:263) ~[n
eo4j-5.12.0.jar:5.12.0]
        ... 5 more
Caused by: java.lang.ClassNotFoundException: io.prometheus.client.Collector
        at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?]
        at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
        at com.neo4j.gds.metrics.GdsMetricsExtension.newInstance(GdsMetricsExtension.java:42) ~[neo4j-graph-data-science-2.6.0.jar:?]
        at com.neo4j.gds.metrics.GdsMetricsExtension.newInstance(GdsMetricsExtension.java:30) ~[neo4j-graph-data-science-2.6.0.jar:?]
        at org.neo4j.kernel.extension.AbstractExtensions.newInstance(AbstractExtensions.java:125) ~[neo4j-kernel-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.extension.AbstractExtensions.init(AbstractExtensions.java:63) ~[neo4j-kernel-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:318) ~[neo4j-common-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:57) ~[neo4j-common-5.12.0.jar:5.12.0]
        at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:86) ~[neo4j-common-5.12.0.jar:5.12.0]
        at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:263) ~[n
eo4j-5.12.0.jar:5.12.0]
        ... 5 more
2024-02-06 23:29:53.545+0000 INFO  Neo4j Server shutdown initiated by request
2024-02-06 23:29:53.545+0000 INFO  Stopped.
Neo4j web server failed to start. See log for more info.
Run with '--verbose' for a more detailed error message.

Thank you!

jmsuhy commented 8 months ago

The error indicates the Prometheus client library dependency is not present,

(java.lang.ClassNotFoundException: io.prometheus.client.Collector).

I suspect that the gds library you are using was for enterprise which probably has the Prometheus jar packaged or shaded.

You can try by getting the most current prometheus jar from mavencentral for example: https://repo1.maven.org/maven2/io/prometheus/simpleclient/0.16.0/

And dropping it into your lib directory and restarting.

If that works - you can see if you can move it to your plugins directory and if it still starts.

Let me know if that fixes your issue.

Praniyendeev commented 8 months ago

Thank you for the reply! I added simpleclient-0.16.0-javadoc.jar to the lib folder..this worked fine. But it still throws the same error when neo4j-graph-data-science-2.6.0.jar is in the plugins folder.

jmsuhy commented 8 months ago

You added the simpleclient javadoc jar , you want to add the main simpleclient jar.

https://repo1.maven.org/maven2/io/prometheus/simpleclient/0.16.0/simpleclient-0.16.0.jar

Try that and let me know how it goes.

Praniyendeev commented 8 months ago

That worked perfectly! Thank you so much.