GeezerVison is showing github.com — Cannot restart gremlin-server enabled database with preexisting database. · Issue #213 · ArcadeData/arcadedb
Cannot restart gremlin-server enabled database with preexisting database. #213DescriptionArcadeDB Version: ArcadeDB Server v21.11.1-SNAPSHOT (build 494adfa/1637138916067/main)
JDK Version: ?? What ever is on the docker image
OS: Whatever is on the docker image
Expected behavior
Server to start up normally
Actual behavior
First run

second run or with defaults server startup logs
[main] WARN org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager - Graph [graph] configured at [../config/gremlin-server.properties] could not be instantiated and will not be available in Gremlin Server. GraphFactory message: GraphFactory could not instantiate this Graph implementation [class org.apache.tinkerpop.gremlin.arcadedb.structure.ArcadeGraph]
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class org.apache.tinkerpop.gremlin.arcadedb.structure.ArcadeGraph]
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:84)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:72)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:106)
at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.addGraph(DefaultGraphManager.java:63)
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.<init>(DefaultGraphManager.java:58)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:84)
at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:124)
at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:87)
at com.arcadedb.server.gremlin.GremlinServerPlugin.startService(GremlinServerPlugin.java:77)
at com.arcadedb.server.ArcadeDBServer.registerPlugins(ArcadeDBServer.java:187)
at com.arcadedb.server.ArcadeDBServer.start(ArcadeDBServer.java:132)
at com.arcadedb.server.ArcadeDBServer.main(ArcadeDBServer.java:89)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:80)
... 16 more
Caused by: com.arcadedb.exception.DatabaseOperationException: Error on creating new database instance
at com.arcadedb.database.EmbeddedDatabase.openInternal(EmbeddedDatabase.java:1647)
at com.arcadedb.database.EmbeddedDatabase.open(EmbeddedDatabase.java:184)
at com.arcadedb.database.DatabaseFactory.open(DatabaseFactory.java:73)
at com.arcadedb.database.DatabaseFactory.open(DatabaseFactory.java:65)
at org.apache.tinkerpop.gremlin.arcadedb.structure.ArcadeGraph.<init>(ArcadeGraph.java:91)
at org.apache.tinkerpop.gremlin.arcadedb.structure.ArcadeGraph.open(ArcadeGraph.java:118)
... 21 more
Caused by: com.arcadedb.utility.LockException: Database 'graph' is locked by another process (path=/home/arcadedb/databases/graph)
at com.arcadedb.database.EmbeddedDatabase.lockDatabase(EmbeddedDatabase.java:1493)
at com.arcadedb.database.EmbeddedDatabase.checkForRecovery(EmbeddedDatabase.java:1586)
at com.arcadedb.database.EmbeddedDatabase.openInternal(EmbeddedDatabase.java:1625)
... 26 more
Caused by: java.nio.channels.OverlappingFileLockException
at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229)
at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123)
at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154)
at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165)
at com.arcadedb.database.EmbeddedDatabase.lockDatabase(EmbeddedDatabase.java:1474)
... 28 more
Steps to reproduce
- Run the
docker command without default first time things will start up and be queryable via gremlin api. But not the arcade db UI. (http://localhost:2480/#)
- run
docker rm -f graphdb and then the docker command below. Stack trace mentioned above will show. The database graph will be available via the UI but not gremlin api.
if ran with -e "arcadedb.server.defaultDatabases=graph[root]" the graph will return the above stacktrace but the database graph will be available in the ui.
docker command without default
# powershell
docker run -d --name graphdb `
-p 2424:2424 -p 2480:2480 -p 8182:8182 `
-v $PWD/config:/home/arcadedb/config `
-v $PWD/data:/home/arcadedb/databases `
-e "arcadedb.server.rootPassword=playwithdata" `
-e arcadedb.server.plugins=GremlinServer:com.arcadedb.server.gremlin.GremlinServerPlugin `
arcadedata/arcadedb:latest
docker logs
docker logs --tail 1000 -f graphdb
gremlin-server.groovy
import org.apache.tinkerpop.gremlin.server.util.LifeCycleHook
def globals = [:]
// defines a sample LifeCycleHook that prints some output to the Gremlin Server console.
// note that the name of the key in the "global" map is unimportant.
globals << [hook : [
onStartUp: { ctx ->
ctx.logger.info("Executed once at startup of Gremlin Server.")
},
onShutDown: { ctx ->
ctx.logger.info("Executed once at shutdown of Gremlin Server.")
}
] as LifeCycleHook]
// define the default TraversalSource to bind queries to - this one will be named "g".
globals << [graph : graph.traversal()]
gremlin-server.properties
gremlin.graph=org.apache.tinkerpop.gremlin.arcadedb.structure.ArcadeGraph
gremlin.arcadedb.directory=/home/arcadedb/databases/graph
Activitylvca commented on Nov 18, 2021 Thanks for opening this issue. First of all, I just realized the new gremlin-server.* files are not included in the distribution (and therefore docker), but they should provide a basic standard cfg, so I've just added them as b45821f. About the database I guess the issue with the server is that it demands to have the database under the server's databases directory, but I'm not sure the graph is created there from the Gremlin Server. I'm gonna test this more. michaelawarren commented on Dec 1, 2021 Is there any update on this? lvca commented on Dec 1, 2021 Hi @michaelawarren, I had lost track of this issue, but I pushed a bunch of fixes for the Gremlin Server that should have resolved the problem. Please let me know if you can find further issues with the Gremlin Server. michaelawarren commented on Dec 1, 2021 This problem still persists as described. lvca commented on Dec 2, 2021 lvca commented on Dec 2, 2021 lvca commented on Dec 3, 2021 Hi,
The default path of server-gremlin.yaml contained the wrong path for both groovy and properties file.
Please use the latest docker image and start it with:
docker run -d --name graphdb -p 2424:2424 -p 2480:2480 -p 8182:8182 -e "arcadedb.server.rootPassword=playwithdata" -e arcadedb.server.plugins=GremlinServer:com.arcadedb.server.gremlin.GremlinServerPlugin -e "arcadedb.server.defaultDatabases=graph[root]" arcadedata/arcadedb:latest
█████╗ ██████╗ ██████╗ █████╗ ██████╗ ███████╗██████╗ ██████╗
██╔══██╗██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔════╝██╔══██╗██╔══██╗
███████║██████╔╝██║ ███████║██║ ██║█████╗ ██║ ██║██████╔╝
██╔══██║██╔══██╗██║ ██╔══██║██║ ██║██╔══╝ ██║ ██║██╔══██╗
██║ ██║██║ ██║╚██████╗██║ ██║██████╔╝███████╗██████╔╝██████╔╝
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚═════╝ ╚═════╝
PLAY WITH DATA arcadedb.com
2021-12-02 22:06:23.818 INFO [ArcadeDBServer] <ArcadeDB_0> ArcadeDB Server v21.12.1-SNAPSHOT (build e0e07a703f25725694d18b55d8387444d18e4e1b/1638482697263/main) is starting up...
2021-12-02 22:06:23.821 INFO [ArcadeDBServer] <ArcadeDB_0> Starting ArcadeDB Server with plugins [GremlinServer] ...
2021-12-02 22:06:23.884 INFO [ArcadeDBServer] <ArcadeDB_0> - JMX Metrics Started...
2021-12-02 22:06:24.031 INFO [ServerSecurity] <ArcadeDB_0> Creating root user with the provided password
2021-12-02 22:06:24.449 INFO [ArcadeDBServer] <ArcadeDB_0> Creating default database 'graph'...[main] INFO org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager - Graph [graph] was successfully configured via [../config/gremlin-server.properties].
[main] INFO org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor - Initialized Gremlin thread pool. Threads in pool named with pattern gremlin-*
[main] INFO org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor - Initialized GremlinExecutor and preparing GremlinScriptEngines instances.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/home/arcadedb/lib/groovy-2.5.14-indy.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[main] INFO org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor - Initialized gremlin-groovy GremlinScriptEngine and registered metrics
[main] INFO org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor - A GraphTraversalSource is now bound to [graph] with graphtraversalsource[arcadegraph[graph], standard]
[main] INFO org.apache.tinkerpop.gremlin.server.op.OpLoader - Adding the standard OpProcessor.
[main] INFO org.apache.tinkerpop.gremlin.server.op.OpLoader - Adding the session OpProcessor.
[main] INFO org.apache.tinkerpop.gremlin.server.op.OpLoader - Adding the traversal OpProcessor.
[main] INFO org.apache.tinkerpop.gremlin.server.GremlinServer - Executing start up LifeCycleHook
[main] INFO org.apache.tinkerpop.gremlin.server.GremlinServer - Executed once at startup of Gremlin Server.
[main] INFO org.apache.tinkerpop.gremlin.server.GremlinServer - idleConnectionTimeout was set to 0 which resolves to 0 seconds when configuring this value - this feature will be disabled
[main] INFO org.apache.tinkerpop.gremlin.server.GremlinServer - keepAliveInterval was set to 0 which resolves to 0 seconds when configuring this value - this feature will be disabled
[main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/vnd.graphbinary-v1.0 with org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1
2021-12-02 22:06:31.187 INFO [ArcadeDBServer] <ArcadeDB_0> - GremlinServer plugin started
2021-12-02 22:06:31.188 INFO [HttpServer] <ArcadeDB_0> - Starting HTTP Server (host=0.0.0.0 port=2480-2489)...[gremlin-server-boss-1] INFO org.apache.tinkerpop.gremlin.server.GremlinServer - Gremlin Server configured with worker thread pool of 1, gremlin pool of 4 and boss thread pool of 1.
[gremlin-server-boss-1] INFO org.apache.tinkerpop.gremlin.server.GremlinServer - Channel started at port 8182.
2021-12-02 22:06:31.300 INFO [undertow] starting server: Undertow - 2.2.13.Final
2021-12-02 22:06:31.330 INFO [xnio] XNIO version 3.8.4.Final
2021-12-02 22:06:31.361 INFO [nio] XNIO NIO Implementation Version 3.8.4.Final
2021-12-02 22:06:31.432 INFO [threads] JBoss Threads version 3.1.0.Final
2021-12-02 22:06:31.554 INFO [HttpServer] <ArcadeDB_0> - HTTP Server started (host=0.0.0.0 port=2480)
2021-12-02 22:06:31.565 INFO [ArcadeDBServer] <ArcadeDB_0> Available query languages: [mongo, gremlin, cypher, sql]
2021-12-02 22:06:31.567 INFO [ArcadeDBServer] <ArcadeDB_0> ArcadeDB Server started (CPUs=4 MAXRAM=2.00GB)
michaelawarren commented on Dec 7, 2021 @lvca looks like the gremlin server is now working without errors with the instructions you have given me using the latest docker image. I'm still seeing some odd behavior though.
- When I create data using the gremlin-server interface it doesn't show up in the UI.
- Start up docker as instructed
- Using java application execute command to create vertex
var cluster = Cluster.build().enableSsl(false).addContactPoint("localhost").port(8182).credentials("root", "playwithdata").serializer(createSerializer()).create()
var g = AnonymousTraversalSource.traversal().withRemote(DriverRemoteConnection.using(createCluster(), "graph"));
g.addV().property("myProp", "some value").next(); // creates the vertex
g = AnonymousTraversalSource.traversal().withRemote(DriverRemoteConnection.using(createCluster(), "graph"));
g.V().valueMap().with(WithOptions.tokens).toList(); // verifies that the vertex created with properties is returned
- Login into ui at http://localhost:2480/
- Use ui to run command to select all vertex
g.V()

- Result of ui is no vertex to be shown
- Also looks like there are no vertex or edge schemas create

- When I try to restart the server using -v /data:/home/arcadedb/databases data i created is not preserved even through the gremlin-server interface.
- start up docker with volumn for databases
docker run -d --name arcadedb `
-p 2424:2424 -p 2480:2480 -p 8182:8182 `
-v $PWD/data:/home/arcadedb/databases `
-e arcadedb.server.rootPassword=rootpwd123 `
-e arcadedb.server.plugins=GremlinServer:com.arcadedb.server.gremlin.GremlinServerPlugin `
-e "arcadedb.server.defaultDatabases=graph[root]" `
arcadedata/arcadedb:latest
- create data using same pattern as step 1 - ii
- results will be returned
- restart database
- query for vertex like last line in step 1 - ii
- no results are returned
lvca commented on Dec 14, 2021 Reproduced. The Gremlin API creates a graph database under the directory bin/databases of the container. Working on a fix. lvca commented on Dec 14, 2021 The issue was with the default gremlin-server.properties. I replaced
gremlin.arcadedb.directory=databases/graph
with
gremlin.arcadedb.directory=../databases/graph
Pushed the changes, please wait for the docker image to be regenerated. lvca commented on Dec 14, 2021 The image is public on Docker Hub. Please fetch the latest and let us know. I tested and now work in all the cases.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|