<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-all</artifactId>
<version>0.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-driver</artifactId>
<version>3.3.3</version>
</dependency>
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkergraph-gremlin</artifactId>
<version>3.3.3</version>
</dependency>
```
I'm really stuck here. Any help is appreciated. Thanks!!
--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/aae648cf-32fd-4579-8f92-9e89f4e17d8a%40googlegroups.com.
connectionPool: { |
Connecting via Java
> Configuration
I am not able to understand how this value is making system unavailable even though my gremlin-server is in a working state. It's like the request doesn't even go to gremlin-server.
--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/04d4c0b3-a439-4bac-bd5e-322a28189e20%40googlegroups.com.
graphs: { |
graph1: conf/janusgraph-hbase.properties,graph2: conf/janusgraph-insights-hbase.properties |
scriptEngines: { |
gremlin-groovy: { |
scripts: [scripts/empty-sample.groovy], |
plugins: { org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {}, |
org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {}, |
org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {}, |
org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]}, |
org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}} |
// define the default TraversalSource to bind queries to - this one will be named "g". |
Ok. Got it. Thanks Stephen.
I just have another query. Maybe you can help.
So I have multiple graphs which I have defined them in my `gremlin-server.yaml`
```
graphs: {
graph1: conf/janusgraph-hbase.properties,graph2: conf/janusgraph-insights-hbase.properties
scriptEngines: {
gremlin-groovy: {
scripts: [scripts/empty-sample.groovy],
plugins: { org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {},
org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {},
org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]}, }
org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}
}
```
And to initialise them at run time, I have mentioned these graph in my empty-sample.groovy
```globals << [g2: graph2.traversal(),g1:graph1.traversal()]
// define the default TraversalSource to bind queries to - this one will be named "g".
```
The issue here is, sometimes this g2 doesn't get initialised at runtime.. and if I restart my server again.. it works.. The only difference between these properties file is storage.hbase.table
What could be the reason behind this random behaviour?
--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/efad350c-7d43-44a8-a3b7-39197f2577e3%40googlegroups.com.
globals << [g2:graph2.traversal(),g1:graph1.traversal()] took 894ms
08:14:59.098 [gremlin-server-exec-2] ERROR o.a.t.g.j.DefaultGremlinScriptEngineManager - Could not create GremlinScriptEngine for gremlin-groovy
java.lang.IllegalStateException: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: g2 for class: Script12902
at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.lambda$createGremlinScriptEngine$16(DefaultGremlinScriptEngineManager.java:464) ~[gremlin-core-3.3.3.jar:3.3.3]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[na:1.8.0_222]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_222]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_222]
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647) ~[na:1.8.0_222]
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272) ~[na:1.8.0_222]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_222]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_222]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[na:1.8.0_222]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[na:1.8.0_222]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[na:1.8.0_222]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_222]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[na:1.8.0_222]
at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.createGremlinScriptEngine(DefaultGremlinScriptEngineManager.java:450) ~[gremlin-core-3.3.3.jar:3.3.3]
at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.getEngineByName(DefaultGremlinScriptEngineManager.java:219) ~[gremlin-core-3.3.3.jar:3.3.3]
at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.lambda$getEngineByName$0(CachedGremlinScriptEngineManager.java:57) [gremlin-core-3.3.3.jar:3.3.3]
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[na:1.8.0_222]
at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.getEngineByName(CachedGremlinScriptEngineManager.java:57) [gremlin-core-3.3.3.jar:3.3.3]
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:263) ~[gremlin-groovy-3.3.3.jar:3.3.3]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_222]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_222]
Caused by: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: g2 for class: Script12902
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:397) ~[gremlin-groovy-3.3.3.jar:3.3.3]
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) ~[na:1.8.0_222]
at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.lambda$createGremlinScriptEngine$16(DefaultGremlinScriptEngineManager.java:460) ~[gremlin-core-3.3.3.jar:3.3.3]
... 24 common frames omitted
Caused by: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: g2 for class: Script12902
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:713) ~[gremlin-groovy-3.3.3.jar:3.3.3]
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:395) ~[gremlin-groovy-3.3.3.jar:3.3.3]
... 26 common frames omitted
Caused by: groovy.lang.MissingPropertyException: No such property: g2 for class: Script12902
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:66) ~[groovy-2.4.15-indy.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:51) ~[groovy-2.4.15-indy.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:310) ~[groovy-2.4.15-indy.jar:2.4.15]
at Script12902.run(Script12902.groovy:40) ~[na:na]
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:690) ~[gremlin-groovy-3.3.3.jar:3.3.3]
... 27 common frames omitted
08:14:59.099 [gremlin-server-exec-2] WARN o.a.t.g.s.h.HttpGremlinEndpointHandler - Invalid request - responding with 500 Internal Server Error and gremlin-groovy is not an available GremlinScriptEngine
java.lang.IllegalArgumentException: gremlin-groovy is not an available GremlinScriptEngine
at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.registerLookUpInfo(CachedGremlinScriptEngineManager.java:95) ~[gremlin-core-3.3.3.jar:3.3.3]
at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.getEngineByName(CachedGremlinScriptEngineManager.java:58) ~[gremlin-core-3.3.3.jar:3.3.3]
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:263) ~[gremlin-groovy-3.3.3.jar:3.3.3]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_222]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_222]
08:14:59.099 [gremlin-server-worker-1] DEBUG log-aggregator-encoder - [id: 0x2216578e, L:/127.0.0.1:8182 - R:/127.0.0.1:36244] WRITE: 70B
```
gremlin-server.yaml
```
graphs: {
graph1: conf/janusgraph-hbase.properties,graph2: conf/janusgraph-insights-hbase.properties
}
```
--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/4a9dd12d-22b3-46d8-b458-084266c3a493%40googlegroups.com.
That's all the log I have right now. The startup looks clean to me. And this isn't a failure of a request. At least no request from client (our) side. If gremlin or hbase is sending any request, like a ping to verify connection, then I'm not sure about that.
But what could be the reason of this random behaviour? If the properties were wrong, then it shouldn't start or configure at any point. But it is just random.
--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/2253b886-1487-484d-baf3-8686b224859b%40googlegroups.com.