Re: [TinkerPop] TP3 - gremlin server cannot open neo4j database

931 views
Skip to first unread message

Stephen Mallette

unread,
Jan 19, 2016, 6:24:36 AM1/19/16
to Gremlin-users
Are you able to open that graph with the Gremlin Console?  That would be something worth trying.  Also, I'm not sure that it matters, but you seem to have a version conflict there - you're using 2.3.1, but TinkerPop is bound to 2.3.0:


Not sure if that could also be your issue.

On Thu, Jan 14, 2016 at 10:35 AM, Lee Mitchell <mr.lee....@gmail.com> wrote:
All, Thank you in advance for any advice or direction on how I might go about resolving this issue.

I am able to start gremlin server with an empty Neo4j database directory; however, when trying to connect to a pre-existing neo4j db, the gremlin-server fails to open the database, giving this message :

Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UpgradingStoreVersionNotFoundException: 'neostore.nodestore.db' does not contain a store version, please ensure that the original database was shut down in a clean st\
ate.

I believe my pre-existing database was shutdown in a clean state for two reasons:
  1) The console messages from the neo4j server indicate a clean shutdown
     when I shut it down (initiated by keystroke ctrl-C, shown as ^C at the start of the 4th to last line below )
        $ bin/neo4j console
        WARNING: Max 2048 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
        Starting Neo4j Server console-mode...
        2016-01-14 00:57:18.934-0500 INFO  Successfully started database
        2016-01-14 00:57:18.971-0500 INFO  Starting HTTP on port 7474 (8 threads available)
        2016-01-14 00:57:19.215-0500 INFO  Enabling HTTPS on port 7473
        2016-01-14 00:57:19.320-0500 INFO  Mounting static content at /webadmin
        2016-01-14 00:57:19.393-0500 INFO  Mounting static content at /browser
        2016-01-14 00:57:21.194-0500 INFO  Remote interface ready and available at http://0.0.0.0:7474/
        ^C2016-01-14 01:21:53.367-0500 INFO  Neo4j Server shutdown initiated by request
        2016-01-14 01:21:53.404-0500 INFO  Successfully shutdown Neo4j Server
        2016-01-14 01:21:53.913-0500 INFO  Successfully stopped database
        2016-01-14 01:21:53.913-0500 INFO  Successfully shutdown database

  2) I can restart the neo4j database and browse it via the neo4j web interface without problems.


--------------------
some version info on what I am using:
        apache-gremlin-server-3.1.0-incubating
        bin/gremlin-server.sh -i org.apache.tinkerpop neo4j-gremlin 3.1.0-incubating

        server-neo4j-community-2.3.1

        java version "1.8.0_51"
        Java(TM) SE Runtime Environment (build 1.8.0_51-b31)
        Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

        apache-gremlin-server-3.1.0-incubating/conf/gremlin-server-neo4j.yaml unchanged from the downloaded distrubtion

        apache-gremlin-server-3.1.0-incubating/conf/neo4j-empty.properties has one line changed to point to my db
          gremlin.neo4j.directory=/var/or/n4/server-neo4j-community-2.3.1/data/graph.db
--------------------
Here is the full set of message I see from gremlin-server failing to open the pre-existing neo4j db:

$  bin/gremlin-server.sh conf/gremlin-server-neo4j.yaml
[INFO] GremlinServer -
         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----

[INFO] GremlinServer - Configuring Gremlin Server from conf/gremlin-server-neo4j.yaml
[INFO] MetricManager - Configured Metrics ConsoleReporter configured with report interval=180000ms
[INFO] MetricManager - Configured Metrics CsvReporter configured with report interval=180000ms to fileName=/tmp/gremlin-server-metrics.csv
[INFO] MetricManager - Configured Metrics JmxReporter configured with domain= and agentId=
[INFO] MetricManager - Configured Metrics Slf4jReporter configured with interval=180000ms and loggerName=org.apache.tinkerpop.gremlin.server.Settings$Slf4jReporterMetrics
[WARN] GraphManager - Graph [graph] configured at [conf/neo4j-empty.properties] could not be instantiated and will not be available in Gremlin Server.  GraphFactory message: GraphFactory could not instantiate this Graph implemen\
tation [class org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph]
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph]
        at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:82)
        at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:70)
        at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:104)
        at org.apache.tinkerpop.gremlin.server.GraphManager.lambda$new$27(GraphManager.java:50)
        at org.apache.tinkerpop.gremlin.server.GraphManager$$Lambda$9/238157928.accept(Unknown Source)
        at java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:663)
        at org.apache.tinkerpop.gremlin.server.GraphManager.<init>(GraphManager.java:48)
        at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:94)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:108)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:332)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:78)
        ... 9 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, /var/or/n4/server-neo4j-community-2.3.1/data/graph.db
        at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:334)
        at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59)
        at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:108)
        at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:95)
        at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:176)
        at org.neo4j.tinkerpop.api.impl.Neo4jFactoryImpl.newGraphDatabase(Neo4jFactoryImpl.java:44)
        at org.neo4j.tinkerpop.api.Neo4jFactory$Builder.open(Neo4jFactory.java:32)
        at org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph.<init>(Neo4jGraph.java:131)
        at org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph.open(Neo4jGraph.java:145)
        ... 14 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.state.DataSourceManager@1a174529' was successfully initialized, but failed to start. Please see attached cause exception.
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513)
        at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115)
        at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:330)
        ... 22 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource@f24d9ac' was successfully initialized, but failed to start. Please see attached cause exception.
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513)
        at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115)
        at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:117)
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507)
        ... 24 more
Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UpgradingStoreVersionNotFoundException: 'neostore.nodestore.db' does not contain a store version, please ensure that the original database was shut down in a clean st\
ate.
        at org.neo4j.kernel.impl.storemigration.UpgradableDatabase.checkUpgradeable(UpgradableDatabase.java:86)
        at org.neo4j.kernel.impl.storemigration.StoreMigrator.needsMigration(StoreMigrator.java:158)
        at org.neo4j.kernel.impl.storemigration.StoreUpgrader.getParticipantsEagerToMigrate(StoreUpgrader.java:259)
        at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:134)
        at org.neo4j.kernel.NeoStoreDataSource.upgradeStore(NeoStoreDataSource.java:560)
        at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:461)
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507)
        ... 27 more
[INFO] ServerGremlinExecutor - Initialized Gremlin thread pool.  Threads in pool named with pattern gremlin-*
[INFO] ScriptEngines - Loaded nashorn ScriptEngine
[INFO] ScriptEngines - Loaded gremlin-groovy ScriptEngine
[WARN] GremlinExecutor - Could not initialize gremlin-groovy ScriptEngine with scripts/empty-sample.groovy as script could not be evaluated - javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: \
graph for class: Script1
[INFO] ServerGremlinExecutor - Initialized GremlinExecutor and configured ScriptEngines.
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v1.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v1.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0
[INFO] AbstractChannelizer - Configured application/json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0
[INFO] GremlinServer$1 - Gremlin Server configured with worker thread pool of 1, gremlin pool of 8 and boss thread pool of 1.
[INFO] GremlinServer$1 - Channel started at port 8182.

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/53958254-f1dd-49c1-9c2a-36d42c3ad678%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lee Mitchell

unread,
Jan 19, 2016, 4:31:40 PM1/19/16
to Gremlin-users
Stephen, thank you for your reply.   I am not able to open from gremlin console either.   I did not expect your reply b/c I thought I had deleted my original post; therefore I did not see your reply but instead posted [here] again about an hour ago with more details.   
I will try it with Neo4j 2.3.0
Message has been deleted

Lee Mitchell

unread,
Jan 21, 2016, 2:10:30 PM1/21/16
to Gremlin-users
Thank you again, Stephen.   Yes, Gremlin-server starts up fine with Neo4j 2.3.0.

Btw, Neo4j 2.3.0 is no longer listed for download at Neo4j.com, but I was able to pull it down by modifying the text in a "2.3.1" link to point to "2.3.0".    Is there any idea on when the official tinkerpop / gremlin version will be upgraded ?  The Latest Neo4j release is 2.3.2

Stephen Mallette

unread,
Jan 22, 2016, 7:53:45 AM1/22/16
to Gremlin-users
I don't think we have a date/release set for that. I presume it is a non-breaking change to bump that version. Please feel free to create an issue in JIRA for that and we can figure out how to coordinate making it happen:

https://issues.apache.org/jira/browse/TINKERPOP

On Thu, Jan 21, 2016 at 2:07 PM, Lee Mitchell <mr.lee....@gmail.com> wrote:
Yes, Stephen, gremlin-server  seems to work fine with Neo4j 2.3.0

Btw, Neo4j 2.3.0 is no longer listed for download at Neo4j.com, but I was able to pull it down by modifying the text in a "2.3.1" link to point to "2.3.0".    Is there any idea on when the official tinkerpop / gremlin version will be upgraded ?  The Latest Neo4j release is 2.3.2

On Tuesday, January 19, 2016 at 4:31:40 PM UTC-5, Lee Mitchell wrote:
Message has been deleted

Lee Mitchell

unread,
Jan 26, 2016, 9:13:39 AM1/26/16
to Gremlin-users
Where would I find the pom.xml for Tinkerpop 3.1.1-incubating to check the neo4j version used? 


I was going to submit an issue; however, I see here that Tinkerpop 3.1.1-incubating is scheduled for release on 01-Feb-2016.  I think my issue would be resolved if TP 3.1.1-incubating will use neo4j 2.3.1 or 2.3.2; that would be good enough for my purposes at the moment.  I prefer to use Neo4j 2.3.1 or later due to the better memory/page  management. 

Lee Mitchell

unread,
Jan 26, 2016, 1:53:06 PM1/26/16
to Gremlin-users

Marko Rodriguez

unread,
Jan 26, 2016, 2:42:22 PM1/26/16
to gremli...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages