jpwarren
jpwarren

Reputation: 31

Error starting neo4j 2.2.3 on Ubuntu 14.04

I've installed neo4j version 2.2.3 from the PPA (as per instructions here: http://debian.neo4j.org/) and made changes to system limits on open files (as per instructions here: neo4j and max open files among other places).

Alas, it fails to start. I've turned on FINEST logging and get the following error in /var/lib/neo4j/data/graph.db/messages.log

2015-08-09 08:44:56.954+0000 ERROR [org.neo4j]: Failed to start Neo Server on port [7474] Starting Neo4j Server failed: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
        at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:258)
        at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:117)
        at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:69)
Caused by: java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
        at org.eclipse.jetty.util.log.JettyAwareLogger.log(JettyAwareLogger.java:619)
        at org.eclipse.jetty.util.log.JettyAwareLogger.info(JettyAwareLogger.java:314)
        at org.eclipse.jetty.util.log.Slf4jLog.info(Slf4jLog.java:74)
        at org.eclipse.jetty.util.log.Log.initialized(Log.java:188)
        at org.eclipse.jetty.util.log.Log.getLogger(Log.java:290)
        at org.eclipse.jetty.util.log.Log.getLogger(Log.java:280)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.(AbstractLifeCycle.java:35)
        at org.neo4j.server.web.Jetty9WebServer.createQueuedThreadPool(Jetty9WebServer.java:191)
        at org.neo4j.server.web.Jetty9WebServer.start(Jetty9WebServer.java:152)
        at org.neo4j.server.AbstractNeoServer.startWebServer(AbstractNeoServer.java:474)
        at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:230)
        ... 2 more

It appears something is missing?

Upvotes: 2

Views: 90

Answers (1)

jpwarren
jpwarren

Reputation: 31

The problem was another slf4j library lying around in /usr/java/packages/lib/ext. Found it thanks to @stefan-ambruster suggestion.

2015-08-09 23:39:46.655+0000 ERROR [org.neo4j]: Failed to start Neo Server on port [7474] Starting Neo4j Server failed: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
Caused by: java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
     [loader.1] file:/usr/java/packages/lib/ext/slf4j-api-1.5.8.jar
     [classpath + loader.0] file:/usr/share/neo4j/system/lib/slf4j-api-1.7.7.jar
     [loader.1] file:/usr/java/packages/lib/ext/slf4j-log4j12-1.5.8.jar
     [classpath + loader.0] file:/usr/share/neo4j/system/lib/jcl-over-slf4j-1.7.7.jar
2015-08-09 23:41:20.075+0000 ERROR [org.neo4j]: Failed to start Neo Server on port [7474] Starting Neo4j Server failed: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
Caused by: java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;

It seems slf4j is extremely version sensitive, so beware of having a main system version that's not the same version as that wanted by neo4j.

I removed the old slf4j library from /usr/java/packages/lib/ext and neo4j is now starting as expected.

Huzzah!

Upvotes: 1

Related Questions