amazon-archives / dynamodb-janusgraph-storage-backend

The Amazon DynamoDB Storage Backend for JanusGraph
Apache License 2.0
446 stars 99 forks source link

GraphFactory could not instantiate this Graph #38

Closed joebernard closed 7 years ago

joebernard commented 8 years ago

When my instance boots, Titan is logging an error that it can't instantiate the graph. This is causing graph and g to not be available to my client (gremlin-javascript). If I stop/start Titan, the service starts normally (no errors) and gremlin-javascript can once again use graph and g.

I created my instance via the CloudFormation template, and this is the only instance I'm using. How can I resolve this startup issue? Here is the error log:

0    [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - 
         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----

266  [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Configuring Gremlin Server from /usr/local/packages/dynamodb-titan100-storage-backend-1.0.0-hadoop1/conf/gremlin-server/gremlin-server.yaml
2220 [main] INFO  com.amazon.titan.diskstorage.dynamodb.AbstractDynamoDBStore  - Entering ensureStore table:v100_system_properties
3075 [main] INFO  com.thinkaurelius.titan.core.util.ReflectiveConfigOptionLoader  - Loaded and initialized config classes: 12 OK out of 12 attempts in PT0.098S
4151 [main] INFO  com.amazon.titan.diskstorage.dynamodb.AbstractDynamoDBStore  - Closing table:v100_system_properties
4155 [main] INFO  com.amazon.titan.diskstorage.dynamodb.AbstractDynamoDBStore  - Closing table:v100_system_properties
4158 [main] INFO  com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration  - Generated unique-instance-id=ac1f316d2400-ip-172-31-49-1091
4197 [main] INFO  com.thinkaurelius.titan.diskstorage.Backend  - Configuring index [search]
4400 [main] INFO  org.elasticsearch.node  - [Atom Bob] version[1.5.1], pid[2400], build[5e38401/2015-04-09T13:41:35Z]
4400 [main] INFO  org.elasticsearch.node  - [Atom Bob] initializing ...
4416 [main] INFO  org.elasticsearch.plugins  - [Atom Bob] loaded [], sites []
7331 [main] INFO  org.elasticsearch.node  - [Atom Bob] initialized
7331 [main] INFO  org.elasticsearch.node  - [Atom Bob] starting ...
7336 [main] INFO  org.elasticsearch.transport  - [Atom Bob] bound_address {local[1]}, publish_address {local[1]}
7346 [main] INFO  org.elasticsearch.discovery  - [Atom Bob] elasticsearch/9K4-3iseRpSYqVExWE4J9A
7348 [elasticsearch[Atom Bob][clusterService#updateTask][T#1]] INFO  org.elasticsearch.cluster.service  - [Atom Bob] master {new [Atom Bob][9K4-3iseRpSYqVExWE4J9A][ip-172-31-49-109][local[1]]{local=true}}, removed {[Atom Bob][E0dnS2NRS7C3Jz-vb_dirA][ip-172-31-49-109][local[1]]{local=true},}, reason: local-disco-initial_connect(master)
7489 [main] INFO  org.elasticsearch.http  - [Atom Bob] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/172.31.49.109:9200]}
7490 [main] INFO  org.elasticsearch.node  - [Atom Bob] started
8045 [elasticsearch[Atom Bob][clusterService#updateTask][T#1]] INFO  org.elasticsearch.gateway  - [Atom Bob] recovered [1] indices into cluster_state
38049 [main] INFO  com.thinkaurelius.titan.diskstorage.Backend  - Initiated backend operations thread pool of size 2
38049 [main] INFO  com.amazon.titan.diskstorage.dynamodb.AbstractDynamoDBStore  - Entering ensureStore table:v100_titan_ids
38156 [main] INFO  com.amazon.titan.diskstorage.dynamodb.AbstractDynamoDBStore  - Entering ensureStore table:v100_edgestore
38169 [main] INFO  com.amazon.titan.diskstorage.dynamodb.AbstractDynamoDBStore  - Entering ensureStore table:v100_graphindex
38187 [main] INFO  com.amazon.titan.diskstorage.dynamodb.AbstractDynamoDBStore  - Entering ensureStore table:v100_txlog
38220 [main] INFO  com.amazon.titan.diskstorage.dynamodb.AbstractDynamoDBStore  - Entering ensureStore table:v100_systemlog
38246 [main] INFO  com.amazon.titan.diskstorage.dynamodb.AbstractDynamoDBStore  - Entering ensureStore table:v100_system_properties
38307 [main] WARN  org.apache.tinkerpop.gremlin.server.GremlinServer  - Graph [graph] configured at [conf/gremlin-server/dynamodb.properties] could not be instantiated and will not be available in Gremlin Server.  GraphFactory message: GraphFactory could not instantiate this Graph implementation [class com.thinkaurelius.titan.core.TitanFactory]
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class com.thinkaurelius.titan.core.TitanFactory]
    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 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:88)
    at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:290)
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:498)
    at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:78)
    ... 8 more
Caused by: com.thinkaurelius.titan.core.TitanException: A Titan graph with the same instance id [ac1f316d2400-ip-172-31-49-1091] is already open. Might required forced shutdown.
    at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:146)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:74)
    ... 13 more
38312 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized Gremlin thread pool.  Threads in pool named with pattern gremlin-*
38908 [main] INFO  org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines  - Loaded nashorn ScriptEngine
39606 [main] INFO  org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines  - Loaded gremlin-groovy ScriptEngine
40778 [main] WARN  org.apache.tinkerpop.gremlin.groovy.engine.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
40778 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized GremlinExecutor and configured ScriptEngines.
40878 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
40880 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
40923 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
40924 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
41026 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server configured with worker thread pool of 1, gremlin pool of 8 and boss thread pool of 1.
41026 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Channel started at port 8182.
joebernard commented 8 years ago

I've tried stopping Titan via /bin/titan.sh stop prior to rebooting the instance, but graph still fails to instantiate with the same error.

It indicates there is an instance with the same id open, but I don't know where that would be coming from. Again stopping and starting Titan after a reboot is a workaround but I'd like to understand how to fix this.

joebernard commented 8 years ago

Adding that I've tried upgrading my EC2 instance to a t2.medium but still see the same issue on startup.

arthurstockler commented 7 years ago

I'm going through the same problem.

bkhamitov commented 7 years ago

its kind of amazing that this is even a feature

sara-02 commented 7 years ago

Is this issue resolved? I am also facing the same issue on my local system. On my EC2 this works, but fails at step 13,14 of this documentation

sara-02 commented 7 years ago

It finally worked on my local machine, after redoing from 2nd onward.

manjunath-s commented 7 years ago

facing this issue when i am trying to set up the dynamodb with gremlin locally.

rg.apache.tinkerpop.gremlin.server.GremlinServer - Configuring Gremlin Server from /Users/manjunathsindagi/Documents/redhat/softwares/dynamodb/dynamodb-titan-storage-backend/server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/conf/gremlin-server/gremlin-server-local.yaml 429 [main] WARN org.apache.tinkerpop.gremlin.server.GremlinServer - Graph [graph] configured at [conf/gremlin-server/dynamodb-local.properties] could not be instantiated and will not be available in Gremlin Server. GraphFactory message: GraphFactory could not instantiate this Graph implementation [class com.thinkaurelius.titan.core.TitanFactory] java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class com.thinkaurelius.titan.core.TitanFactory] 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 java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671) at org.apache.tinkerpop.gremlin.server.GraphManager.(GraphManager.java:48) at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.(ServerGremlinExecutor.java:94) at org.apache.tinkerpop.gremlin.server.GremlinServer.(GremlinServer.java:88) at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:290) 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:498) at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:78) ... 8 more Caused by: java.lang.IllegalArgumentException: Could not find implementation class: com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:47) at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:473) at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:407) at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.(GraphDatabaseConfiguration.java:1320) at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94) at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:74) ... 13 more Caused by: java.lang.ClassNotFoundException: com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:42) ... 18 more

ainze commented 7 years ago

@nlpml-developer had same issue and added the solution in below ticket https://github.com/awslabs/dynamodb-titan-storage-backend/issues/74

amcp commented 7 years ago

This issue is fixed (duplicate of #74 )