Stardag Tinkerpop Gremlin-server setup fails

56 views
Skip to first unread message

bart....@gmail.com

unread,
Jun 23, 2016, 5:45:11 AM6/23/16
to Stardog
Hi All,
I am trying to implemente the gremlin-server for stardog graph traversal: http://docs.stardog.com/#_stardog_gremlin_server
Unfortunately I stumbled upon an error I can't seem to fix. When I start the gremlin-server I get:
[WARN] GraphManager - Graph [graph] configured at [conf/stardoggraph-imi1.properties] could not be instantiated and will not be available in Gremlin Server.  GraphFactory message: GraphFactory could not find [org.apache.tinkerpop.gremlin.stardog.structure.StardogGraph] - Ensure that the jar is in the classpath
java.lang.RuntimeException: GraphFactory could not find [org.apache.tinkerpop.gremlin.stardog.structure.StardogGraph] - Ensure that the jar is in the classpath
        at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:63)
        at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:104)
        at org.apache.tinkerpop.gremlin.server.GraphManager.lambda$new$28(GraphManager.java:50)
        at java.util.LinkedHashMap$LinkedEntrySet.forEach(Unknown Source)
        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:89)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:301)
I checked and I think all the jars are in the ext/stardog-gremlin/plugin folder.
Any help regarding the issue would be very appriciated!
Thx.

Zachary Whitley

unread,
Jun 23, 2016, 6:31:29 AM6/23/16
to sta...@clarkparsia.com
I checked and I think all the jars are in the ext/stardog-gremlin/plugin folderAny help regarding the issue would be very appriciated!
Thx-- 
-- --

What version of Stardog? Is ext/stardog-gremlin/plugin in the gremlin-server folder? What version of tinkerpop? SD 4.1.1 requires 3.0.2-incubating. (Check carefully because the latest TP release happens to be 3.2.0). Can the user read everything in ext? Did you check the plugins folder to make sure all the jars are there?

You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.

bart....@gmail.com

unread,
Jun 23, 2016, 7:09:28 AM6/23/16
to Stardog
The stardog version is 4.1.1 apache-gremlin-server version is 3.0.2-incubating.

Jars in the ext/stardog-gremlin/plugin folder are visible in the attached screenshot.

What do you mean with "can the user read everything in ext"? I start the server as root and all the jars are owned by root.

Do you know where the StardagGraph class should normally be located? I tried searching the stardog-gremlin-4.1.1.jar but I could only find com.complexible.stardog.gremlin.structure.StardogGraph
This is not the one mentioned in the manual and it also doesn't work. But if I set the path to com.complexible.... I get a different error. Which indicates that gremlin does find the jars I copied.

Op donderdag 23 juni 2016 12:31:29 UTC+2 schreef Zachary Whitley:

bart....@gmail.com

unread,
Jun 23, 2016, 7:10:25 AM6/23/16
to Stardog, bart....@gmail.com
Sorry forgot the screenshot...

Op donderdag 23 juni 2016 13:09:28 UTC+2 schreef bart....@gmail.com:
Capture.PNG

Zachary Whitley

unread,
Jun 23, 2016, 7:19:26 AM6/23/16
to sta...@clarkparsia.com
Can you send your conf/gremlin-server.yaml file?
--
-- --

You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.
<Capture.PNG>

bart....@gmail.com

unread,
Jun 23, 2016, 7:25:10 AM6/23/16
to Stardog
Also attahced is my stardoggraph-graphname.properties which configures my stardog named graph.

Op donderdag 23 juni 2016 13:19:26 UTC+2 schreef Zachary Whitley:
gremlin-server.yaml
stardoggraph-imi1.properties

Zachary Whitley

unread,
Jun 23, 2016, 9:27:20 AM6/23/16
to Stardog
It looks like there might be a problem with your stardoggraph-imi1.properties

You don't appear to have connection, user, password, or named_graph set. I would have assumed that you changed it because you didn't want to share your password but I'm not sure why you'd change named_graph or connection so I'm wondering what you have these values actually set to.

You also appear to have the stardog properties prefixed with gremlin.*

gremlin.graph=org.apache.tinkerpop.gremlin.stardog.structure.StardogGraph
gremlin.stardog.connection=URL
gremlin.stardog.user=USER
gremlin.stardog.password=PASSWORD
gremlin.stardog.named_graph=GRAPH_NAME
gremlin.stardog.reasoning_enabled=false


should be

gremlin.graph=org.apache.tinkerpop.gremlin.stardog.structure.StardogGraph
stardog.connection=snarl://localhost:5820/mygraph
stardog.user=admin
stardog.password=admin
stardog.named_graph=tag:stardog:api:graph:default
stardog.reasoning_enabled=false

Pavel Klinov

unread,
Jun 24, 2016, 7:20:56 AM6/24/16
to sta...@clarkparsia.com
Bart,

You're correct that the graph class name in the documentation is wrong; the right configuration line is gremlin.graph=com.complexible.stardog.gremlin.structure.StardogGraph. We'll fix the docs.

What error do you get if you change it to the above? It might be due to the issues in your property file which Zach identified.

I've just repeated the steps in the manual and the Gremlin server started as expected:

[INFO] GraphManager - Graph [graph] was successfully configured via [conf/stardog-graph.properties].

Best,
Pavel

--
-- --

bart....@gmail.com

unread,
Jun 27, 2016, 3:38:44 AM6/27/16
to Stardog
Hi,

With both changes (the StardogGraph class and the gremlin.* removed it works now.

Thanks!

Op vrijdag 24 juni 2016 13:20:56 UTC+2 schreef Pavel Klinov:

bart....@gmail.com

unread,
Jun 27, 2016, 5:45:22 AM6/27/16
to Stardog, bart....@gmail.com
I have just one more question:

If I now want to create a restful server, I would run ./bin/gremlin-server.sh ./conf/gremlin-server-rest-modern.yaml but this gives me an error:

[ERROR] GremlinServer - Gremlin Server Error
groovy.lang.MissingMethodException: No signature of method: static org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory.generateClassic() is applicable for argument types: (com.complexible.stardog.gremlin.structure.StardogGraph) values: [stardoggraph[http://ekol.jnj.com/IMI1]]
Possible solutions: generateClassic(org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph), createClassic()
        at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1495)
        at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1481)
        at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:50)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)
        at Script1$_run_closure1.doCall(Script1.groovy:28)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
        at groovy.lang.Closure.call(Closure.java:423)
        at org.codehaus.groovy.runtime.ConvertedMap.invokeCustom(ConvertedMap.java:50)
        at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:103)
        at com.sun.proxy.$Proxy10.onStartUp(Unknown Source)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.lambda$start$2(GremlinServer.java:136)
        at java.util.ArrayList.forEach(Unknown Source)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.start(GremlinServer.java:133)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:302)
[ERROR] GremlinServer - Gremlin Server was unable to start and will now begin shutdown: No signature of method: static org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory.generateClassic() is applicable for argument types: (com.complexible.stardog.gremlin.structure.StardogGraph) values: [stardoggraph[http://ekol.jnj.com/IMI1]]
Possible solutions: generateClassic(org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph), createClassic()

Any idea as to why this happens?

Kind regards,

Bart Praats

Op donderdag 23 juni 2016 11:45:11 UTC+2 schreef bart....@gmail.com:

Pavel Klinov

unread,
Jun 27, 2016, 6:48:25 AM6/27/16
to sta...@clarkparsia.com
I suspect the problem here is the clash between the Stardog TinkerPop plugin configuration and the TinkerGraph plugin which both bind the gramlin.graph variable (but to different class names). Note that the create-modern.groovy script, which is specified in conf/gremlin-server-rest-modern.yaml, explicitly calls the TinkerGraph factory.

Best,
Pavel

--

bart....@gmail.com

unread,
Jun 27, 2016, 7:08:22 AM6/27/16
to Stardog, bart....@gmail.com
I just disabled the - tinkerpop.tinkergraph plugin but I still get an exception (a different one now).

But maybe I should tell you what I want to achieve first. I want to run the GremlinServer on a Stardog instance on my server, in order to be able to connect with a Gremlin console.

The console I want to use is the one used on http://gremlinbin.com/site/index

I would like a similar UI and I found this library: https://github.com/PommeVerte/gremlin-console-js

But first I have to get the GrmlinServer working. I'm not sure if I need a rest server or a websocket for this, and I still need to figure out how to get the web UI working.

So back to the error:

[ERROR] GremlinServer - Gremlin Server Error
groovy.lang.MissingPropertyException: No such property: TinkerFactory for class: Script1
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:51)
        at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:304)
        at Script1$_run_closure1.doCall(Script1.groovy:28)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
        at groovy.lang.Closure.call(Closure.java:423)
        at org.codehaus.groovy.runtime.ConvertedMap.invokeCustom(ConvertedMap.java:50)
        at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:103)
        at com.sun.proxy.$Proxy10.onStartUp(Unknown Source)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.lambda$start$2(GremlinServer.java:136)
        at java.util.ArrayList.forEach(Unknown Source)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.start(GremlinServer.java:133)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:302)
[ERROR] GremlinServer - Gremlin Server was unable to start and will now begin shutdown: No such property: TinkerFactory for class: Script1


Thank you for all your help!

Op donderdag 23 juni 2016 11:45:11 UTC+2 schreef bart....@gmail.com:
Hi All,

Pavel Klinov

unread,
Jun 27, 2016, 7:55:07 AM6/27/16
to sta...@clarkparsia.com
Let me be a bit more precise: you got Gremlin Server working with Stardog. What doesn't work is loading a graph (the Modern example graph) in a particular TinkerGraph-specific way. As far as I can see at the moment this example is just not meant to work with arbitrary TinkerPop plugins.

First, you can't disable the TinkerGraph plugin and still use TinkerFactory in generate-modern.groovy. TinkerFactory is a part of TinkerGraph.

Second, even if you keep the TinkerGraph plugin enabled but don't bind gremlin.graph to TinkerGraph (i.e. remove the graph: conf/tinkergraph-empty.properties line), the script will still fail because TinkerFactory.generateClassic(..) method expects a TinkerGraph and not the generic TP Graph interface, which StardogGraph implements (see [1]).

Frankly, I don't really know why it's done like that you should just load your graph data in a generic way, then it should work with Stardog too.

Cheers,
Pavel


--

bart....@gmail.com

unread,
Jun 28, 2016, 3:45:00 AM6/28/16
to Stardog, bart....@gmail.com
Thank you for your response but I am still a little in the dark here...

What do you mean with loading the graph data in a generic way? Not use Tinkerpop?

The ultimate goal here is to be able to traverse the remote stardog graph with a user friendly UI. The first thing I stumbled upon was to use the tinkerpop gremlin server in combination with the web UI as shown on http://gremlinbin.com/site/index

Sorry for my limited knowledge about this topic, but I onky started working with stardog 2 week ago...


Op donderdag 23 juni 2016 11:45:11 UTC+2 schreef bart....@gmail.com:
Hi All,

Pavel Klinov

unread,
Jun 28, 2016, 4:34:55 AM6/28/16
to sta...@clarkparsia.com
On Tue, Jun 28, 2016 at 9:45 AM, <bart....@gmail.com> wrote:
Thank you for your response but I am still a little in the dark here...

What do you mean with loading the graph data in a generic way? Not use Tinkerpop?

I mean loading through the generic TinkerPop interfaces without referring to any particular implementations, like TinkerGraph.

Here're the steps:

1) create a copy of gremlin-rest-modern.yaml and get rid of the TinkerGraph plugin. It's of no use since we're going to use the Stardog plugin. The graphs and plugins sections should look like:

graphs: {
  graph: conf/stardog-graph.properties
}
plugins:
  - complexible.stardog

2)  copy and edit generate-modern.groovy to get rid of TinkerFactory.generateClassic(graph). Again, we can't load property graph data into Stardog using some other TinkerPop plugin. Instead a generic way, as indicated in our docs [1], would be this:

graph.io(graphml()).readGraph('data/tinkerpop-modern.xml')

Now save the files, start the Stardog server, and then start Gremlin Server with gremlin-rest-modern.yaml (or whatever you renamed it to). You should see the following:

[INFO] Logger$info - Loading 'modern' graph data.
[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.

Finally, to verify that the graph has been loaded  successfully, you can post Gremlin queries to the Gremlin Server, which will ultimately be answered by Stardog:

> curl -X POST -d "{\"gremlin\":\"g.V().out().values('name')\", \"language\":\"gremlin-groovy\"}" http://localhost:8182

This should output something like:

{"requestId":"92c0cdbe-64fe-4e23-a71a-f178aeac9451","status":{"message":"","code":200,"attributes":{}},"result":{"data":["vadas","josh","lop","lop","lop","ripple"],"meta":{}}}

If this works, any UI which just posts Gremlin queries must work too. 


The ultimate goal here is to be able to traverse the remote stardog graph with a user friendly UI. The first thing I stumbled upon was to use the tinkerpop gremlin server in combination with the web UI as shown on http://gremlinbin.com/site/index

Sorry for my limited knowledge about this topic, but I onky started working with stardog 2 week ago...

No worries, we'll improve our documentation on Gremlin Server to clarify this sort of things.

Cheers,
Pavel

 


Op donderdag 23 juni 2016 11:45:11 UTC+2 schreef bart....@gmail.com:
Hi All,
I am trying to implemente the gremlin-server for stardog graph traversal: http://docs.stardog.com/#_stardog_gremlin_server
Unfortunately I stumbled upon an error I can't seem to fix. When I start the gremlin-server I get:
[WARN] GraphManager - Graph [graph] configured at [conf/stardoggraph-imi1.properties] could not be instantiated and will not be available in Gremlin Server.  GraphFactory message: GraphFactory could not find [org.apache.tinkerpop.gremlin.stardog.structure.StardogGraph] - Ensure that the jar is in the classpath
java.lang.RuntimeException: GraphFactory could not find [org.apache.tinkerpop.gremlin.stardog.structure.StardogGraph] - Ensure that the jar is in the classpath
        at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:63)
        at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:104)
        at org.apache.tinkerpop.gremlin.server.GraphManager.lambda$new$28(GraphManager.java:50)
        at java.util.LinkedHashMap$LinkedEntrySet.forEach(Unknown Source)
        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:89)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:301)
I checked and I think all the jars are in the ext/stardog-gremlin/plugin folder.
Any help regarding the issue would be very appriciated!
Thx.

--

bart....@gmail.com

unread,
Jun 28, 2016, 5:16:47 AM6/28/16
to Stardog, bart....@gmail.com
Thank you! This is very clear.

Now I did what you said:

I start the server with the following command: ./bin/gremlin-server.sh ./conf/stardog-gremlin-rest-modern.yaml

My conf file is attached as well as my stardog-graph file and my .groovy script. I am trying all of this on a RedHat Linux server.

I get the following error now:

[INFO] Logger$info - Loading 'modern' graph data.
[ERROR] AbstractStardogTransaction - Error opening a Stardog connection
com.complexible.stardog.server.StardogConnectionException: Channel closed before response from server
        at com.complexible.stardog.protocols.client.SPECClientUtil.toStardogException(SPECClientUtil.java:66)
        at com.complexible.stardog.protocols.client.SPECClientUtil.toStardogException(SPECClientUtil.java:34)
        at com.complexible.stardog.protocols.snarl.client.SNARLDriver.connect(SNARLDriver.java:130)
        at com.complexible.stardog.api.DriverManager.getConnection(DriverManager.java:74)
        at com.complexible.stardog.api.ConnectionConfiguration.connect(ConnectionConfiguration.java:126)
        at com.complexible.stardog.gremlin.structure.tx.AbstractStardogTransaction.connection(AbstractStardogTransaction.java:73)
        at com.complexible.stardog.gremlin.structure.tx.DefaultStardogTransaction.connection(DefaultStardogTransaction.java:22)
        at com.complexible.stardog.gremlin.structure.tx.DefaultStardogTransaction.doOpen(DefaultStardogTransaction.java:35)
        at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.open(AbstractTransaction.java:87)
        at org.apache.tinkerpop.gremlin.structure.Transaction$READ_WRITE_BEHAVIOR$1.accept(Transaction.java:209)
        at org.apache.tinkerpop.gremlin.structure.Transaction$READ_WRITE_BEHAVIOR$1.accept(Transaction.java:206)
        at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.readWrite(AbstractTransaction.java:126)
        at com.complexible.stardog.gremlin.structure.StardogGraph.addVertexWithProperties(StardogGraph.java:572)
        at com.complexible.stardog.gremlin.structure.StardogGraph.addVertex(StardogGraph.java:558)
        at org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLReader.findOrCreate(GraphMLReader.java:298)
        at org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLReader.readGraph(GraphMLReader.java:166)
        at org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLIo.readGraph(GraphMLIo.java:86)
        at org.apache.tinkerpop.gremlin.structure.io.Io$readGraph.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)
        at Script1$_run_closure1.doCall(Script1.groovy:28)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
        at groovy.lang.Closure.call(Closure.java:423)
        at org.codehaus.groovy.runtime.ConvertedMap.invokeCustom(ConvertedMap.java:50)
        at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:103)
        at com.sun.proxy.$Proxy10.onStartUp(Unknown Source)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.lambda$start$2(GremlinServer.java:136)
        at java.util.ArrayList.forEach(Unknown Source)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.start(GremlinServer.java:133)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:302)
Caused by: java.net.ConnectException: Channel closed before response from server
        at com.complexible.common.protocols.client.rpc.DefaultRPCClient.get(DefaultRPCClient.java:284)
        at com.complexible.common.protocols.client.rpc.DefaultRPCClient.execute(DefaultRPCClient.java:254)
        at com.complexible.stardog.protocols.snarl.client.AbstractSNARLClient.connect(AbstractSNARLClient.java:98)
        at com.complexible.stardog.protocols.snarl.client.AbstractSNARLClient.connect(AbstractSNARLClient.java:60)
        at com.complexible.stardog.protocols.snarl.client.SNARLDriver.connect(SNARLDriver.java:114)
        ... 35 more
[ERROR] GremlinServer - Gremlin Server Error
com.complexible.stardog.gremlin.structure.RuntimeStardogException: Error trying to begin Transaction
        at com.complexible.stardog.gremlin.structure.tx.AbstractStardogTransaction.connection(AbstractStardogTransaction.java:81)
        at com.complexible.stardog.gremlin.structure.tx.DefaultStardogTransaction.connection(DefaultStardogTransaction.java:22)
        at com.complexible.stardog.gremlin.structure.tx.DefaultStardogTransaction.doOpen(DefaultStardogTransaction.java:35)
        at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.open(AbstractTransaction.java:87)
        at org.apache.tinkerpop.gremlin.structure.Transaction$READ_WRITE_BEHAVIOR$1.accept(Transaction.java:209)
        at org.apache.tinkerpop.gremlin.structure.Transaction$READ_WRITE_BEHAVIOR$1.accept(Transaction.java:206)
        at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.readWrite(AbstractTransaction.java:126)
        at com.complexible.stardog.gremlin.structure.StardogGraph.addVertexWithProperties(StardogGraph.java:572)
        at com.complexible.stardog.gremlin.structure.StardogGraph.addVertex(StardogGraph.java:558)
        at org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLReader.findOrCreate(GraphMLReader.java:298)
        at org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLReader.readGraph(GraphMLReader.java:166)
        at org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLIo.readGraph(GraphMLIo.java:86)
        at org.apache.tinkerpop.gremlin.structure.io.Io$readGraph.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)
        at Script1$_run_closure1.doCall(Script1.groovy:28)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
        at groovy.lang.Closure.call(Closure.java:423)
        at org.codehaus.groovy.runtime.ConvertedMap.invokeCustom(ConvertedMap.java:50)
        at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:103)
        at com.sun.proxy.$Proxy10.onStartUp(Unknown Source)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.lambda$start$2(GremlinServer.java:136)
        at java.util.ArrayList.forEach(Unknown Source)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.start(GremlinServer.java:133)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:302)
Caused by: com.complexible.stardog.server.StardogConnectionException: Channel closed before response from server
        at com.complexible.stardog.protocols.client.SPECClientUtil.toStardogException(SPECClientUtil.java:66)
        at com.complexible.stardog.protocols.client.SPECClientUtil.toStardogException(SPECClientUtil.java:34)
        at com.complexible.stardog.protocols.snarl.client.SNARLDriver.connect(SNARLDriver.java:130)
        at com.complexible.stardog.api.DriverManager.getConnection(DriverManager.java:74)
        at com.complexible.stardog.api.ConnectionConfiguration.connect(ConnectionConfiguration.java:126)
        at com.complexible.stardog.gremlin.structure.tx.AbstractStardogTransaction.connection(AbstractStardogTransaction.java:73)
        ... 32 more
Caused by: java.net.ConnectException: Channel closed before response from server
        at com.complexible.common.protocols.client.rpc.DefaultRPCClient.get(DefaultRPCClient.java:284)
        at com.complexible.common.protocols.client.rpc.DefaultRPCClient.execute(DefaultRPCClient.java:254)
        at com.complexible.stardog.protocols.snarl.client.AbstractSNARLClient.connect(AbstractSNARLClient.java:98)
        at com.complexible.stardog.protocols.snarl.client.AbstractSNARLClient.connect(AbstractSNARLClient.java:60)
        at com.complexible.stardog.protocols.snarl.client.SNARLDriver.connect(SNARLDriver.java:114)
        ... 35 more
[ERROR] GremlinServer - Gremlin Server was unable to start and will now begin shutdown: Error trying to begin Transaction


Op donderdag 23 juni 2016 11:45:11 UTC+2 schreef bart....@gmail.com:
Hi All,
generate-modern-stardog.groovy
stardog-graph-imi1.properties
stardog-gremlin-rest-modern.yaml

Pavel Klinov

unread,
Jun 28, 2016, 5:50:20 AM6/28/16
to sta...@clarkparsia.com
This suggests the client wasn't able to connect to Stardog. Are you sure you started Stardog server before running gremlin-server?

Cheers,
Pavel

--

bart....@gmail.com

unread,
Jun 29, 2016, 10:20:33 AM6/29/16
to Stardog
Yes I'm sure because I can reach the Stardog web interface. But apparently i used a wrong Stardog version. Now the server starts!

Just one more question:

Why do I need this line:

graph.io(graphml()).readGraph('data/tinkerpop-modern.xml')

It looks like it loads some test graph, while I want to load my stardog graph, not the test data that is in the data/tinkerpop-modern.xml.

Or am I missing something?

Thanks!

Op dinsdag 28 juni 2016 11:50:20 UTC+2 schreef Pavel Klinov:

Pavel Klinov

unread,
Jun 29, 2016, 10:32:47 AM6/29/16
to sta...@clarkparsia.com
Well, I thought our discussion started when you attempted to run Gremlin server with conf/gremlin-server-rest-modern.yaml -- which refers to a sample script to load the Modern graph (thus the "modern" suffix in the yaml file). All I did was to modify that script so that the same graph could be loaded. But the script is just an example, you can edit it to load whatever you want.

Cheers,
Pavel

bart....@gmail.com

unread,
Jun 30, 2016, 2:49:00 AM6/30/16
to Stardog
Ah ok. Well I actually wanted to start a rest server which would make my already running Stardog intance available for Gremlin rest based graph traversal. The stardog already contains my graph data, and since this was the only yaml file containing "rest" in it's name I assumed this was the one I should use.

So if I understand correctly, I could now just change this line:

graph.io(graphml()).readGraph('data/tinkerpop-modern.xml')

into something that loads my Stardog graph?

Or maybe running the server simply with the command bin/gremlin-server.sh is sufficient but I thought this would not be a rest service.

Op woensdag 29 juni 2016 16:32:47 UTC+2 schreef Pavel Klinov:

Pavel Klinov

unread,
Jun 30, 2016, 3:04:20 AM6/30/16
to sta...@clarkparsia.com
You can edit the same yaml configuration file to remove the Groovy script which loads data. All HTTP config can stay as is.

Best,
Pavel

bart....@gmail.com

unread,
Jul 11, 2016, 9:41:53 AM7/11/16
to Stardog
Hi,

Sorry for my late response, but the server starts now!

The only problem I have now is that I can't connect to it from outside the server.
If I run "curl localhost:5830" on the server, it gives me back {"message":"no gremlin script supplied"} which is a good thing I guess?

But when I try to do the same on a client (in this case my laptop) I can't seem to reach the server. If I use the port for any other program (I tested stardog on it) I seem to be able to reach it. Only the gremlin server doesn't work. I tried both "./bin/gremlin-server.sh" and "./bin/gremlin-server.sh ./conf/stardog-gremlin-rest-modern.yaml" with the correct ports set in the config files but it doesn't work. It starts up but I can't connect to it other than from the server itself.

Op donderdag 30 juni 2016 09:04:20 UTC+2 schreef Pavel Klinov:
Reply all
Reply to author
Forward
0 new messages