我有一个高可用性群集(Neo4j),其中在主服务器上我有gremlin服务器,在从服务器上有gremlin控制台。但是,当我在主服务器上启动gremlin服务器时,出现以下错误。我在不同版本的gremlin服务器和控制台上尝试了相同的过程,但是无法从gremlin控制台访问图形。当我在控制台中点击g.V()时,我收到了gremlin-groovy的错误,这不是在gremlin控制台中可用的GremlinScriptEngine。
ec2-user@ip-172-31-0-10 apache-tinkerpop-gremlin-server-3.4.2]$ sudo bin/greml in-server.sh ./conf/gremlin-server-neo4j.yaml
[INFO] GremlinServer - 3.4.2
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
[INFO] GremlinServer - Configuring Gremlin Server from ./conf/gremlin-server-neo 4j.yaml
[INFO] MetricManager - Configured Metrics ConsoleReporter configured with report interval=180000ms
[INFO] MetricManager - Configured Metrics CsvReporter configured with report int erval=180000ms to fileName=/tmp/gremlin-server-metrics.csv
[INFO] MetricManager - Configured Metrics JmxReporter configured with domain= an d agentId=
[INFO] MetricManager - Configured Metrics Slf4jReporter configured with interval =180000ms and loggerName=org.apache.tinkerpop.gremlin.server.Settings$Slf4jRepor terMetrics
[WARN] DefaultGraphManager - Graph [graph] configured at [conf/neo4j-ha.properti es] could not be instantiated and will not be available in Gremlin Server. Grap hFactory message: GraphFactory could not instantiate this Graph implementation [ class org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph]
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implem entation [class org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph]
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFa ctory.java:82)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFa ctory.java:70)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFa ctory.java:104)
at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.lambda$n ew$0(DefaultGraphManager.java:57)
at java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671 )
at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.<init>(D efaultGraphManager.java:55)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct orAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC onstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init> (ServerGremlinExecutor.java:80)
at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServe r.java:122)
at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServe r.java:86)
at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer. java:345)
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(DelegatingMethodAcces sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFa ctory.java:78)
... 13 more
Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to j ava.lang.String
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.setConfig(GraphDatabas eBuilder.java:126)
at org.neo4j.tinkerpop.api.impl.Neo4jFactoryImpl.newGraphDatabase(Neo4jF actoryImpl.java:45)
at org.neo4j.tinkerpop.api.Neo4jFactory$Builder.open(Neo4jFactory.java:3 2)
at org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph.<init>(Neo4jG raph.java:125)
at org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph.open(Neo4jGra ph.java:139)
... 18 more
[INFO] ServerGremlinExecutor - Initialized Gremlin thread pool. Threads in pool named with pattern gremlin-*
[INFO] ServerGremlinExecutor - Initialized GremlinExecutor and preparing Gremlin ScriptEngines instances.
[ERROR] DefaultGremlinScriptEngineManager - Could not create GremlinScriptEngine for gremlin-groovy
java.lang.IllegalStateException: javax.script.ScriptException: javax.script.Scri ptException: groovy.lang.MissingPropertyException: No such property: graph for c lass: Script1
at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager .lambda$createGremlinScriptEngine$16(DefaultGremlinScriptEngineManager.java:464)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:18 4)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java: 193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.j ava:1382)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.jav a:580)
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java: 270)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.j ava:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.ja va:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.j ava:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEac hOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418 )
at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager .createGremlinScriptEngine(DefaultGremlinScriptEngineManager.java:450)
at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager .getEngineByName(DefaultGremlinScriptEngineManager.java:219)
at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager. lambda$getEngineByName$0(CachedGremlinScriptEngineManager.java:57)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHash Map.java:1660)
at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager. getEngineByName(CachedGremlinScriptEngineManager.java:57)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eva l$0(GremlinExecutor.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51 1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.script.ScriptException: javax.script.ScriptException: groovy.la ng.MissingPropertyException: No such property: graph for class: Script1
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine. eval(GremlinGroovyScriptEngine.java:378)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager .lambda$createGremlinScriptEngine$16(DefaultGremlinScriptEngineManager.java:460)
... 24 more
Caused by: javax.script.ScriptException: groovy.lang.MissingPropertyException: N o such property: graph for class: Script1
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine. eval(GremlinGroovyScriptEngine.java:697)
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine. eval(GremlinGroovyScriptEngine.java:376)
... 26 more
Caused by: groovy.lang.MissingPropertyException: No such property: graph for cla ss: Script1
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptByteco deAdapter.java:65)
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty( PogoGetPropertySite.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjec tGetProperty(AbstractCallSite.java:309)
at Script1.run(Script1.groovy:45)
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine. eval(GremlinGroovyScriptEngine.java:674)
... 27 more
[WARN] ServerGremlinExecutor - Could not initialize gremlin-groovy GremlinScript Engine as init script could not be evaluated
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: gr emlin-groovy is not an available GremlinScriptEngine
at java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.j ava:375)
at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:19 34)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.lambda $new$4(ServerGremlinExecutor.java:141)
at java.util.LinkedHashMap$LinkedKeySet.forEach(LinkedHashMap.java:559)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init> (ServerGremlinExecutor.java:136)
at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServe r.java:122)
at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServe r.java:86)
at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer. java:345)
Caused by: java.lang.IllegalArgumentException: gremlin-groovy is not an availabl e GremlinScriptEngine
at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager. registerLookUpInfo(CachedGremlinScriptEngineManager.java:95)
at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager. getEngineByName(CachedGremlinScriptEngineManager.java:58)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eva l$0(GremlinExecutor.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51 1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:624)
at java.lang.Thread.run(Thread.java:748)
[INFO] OpLoader - Adding the standard OpProcessor.
[INFO] OpLoader - Adding the session OpProcessor.
[INFO] OpLoader - Adding the traversal OpProcessor.
[INFO] TraversalOpProcessor - Initialized cache for TraversalOpProcessor with si ze 1000 and expiration time of 600000 ms
[INFO] GremlinServer - idleConnectionTimeout was set to 0 which resolves to 0 se conds when configuring this value - this feature will be disabled
[INFO] GremlinServer - keepAliveInterval was set to 0 which resolves to 0 second s when configuring this value - this feature will be disabled
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v3.0+gryo with o rg.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v3.0+gryo-string d with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v3.0+json with o rg.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0
[INFO] AbstractChannelizer - Configured application/json with org.apache.tinkerp op.gremlin.driver.ser.GraphSONMessageSerializerV3d0
[INFO] AbstractChannelizer - Configured application/vnd.graphbinary-v1.0 with or g.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1
[INFO] GremlinServer$1 - Gremlin Server configured with worker thread pool of 1, gremlin pool of 1 and boss thread pool of 1.
[INFO] GremlinServer$1 - Channel started at port 8182.
答案 0 :(得分:0)
我不确定这是否是您的问题,但是您需要安装Gremlin Server Neo4j插件,以便此命令可以显示适当的类:
bin/gremlin-server.sh install org.apache.tinkerpop neo4j-gremlin 3.4.3
在启动服务器之前。如果那不是您的问题,那么您可能需要用更多详细信息更新您的问题,具体来说,(1)服务器输出的清理过后,因为当前输出中存在一定的间距,使其难以阅读;(2) ),Gremlin Server初始化脚本以及“ neo4j-ha.properties”文件。