Search code examples
janusgraph

Could not invoke JanusGraphManager


Server was working and after some time(Im not sure what was changed, so i cant tell), i got error that tell

711  [main] ERROR org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Could not invoke 
constructor on class org.janusgraph.graphdb.management.JanusGraphManager 
(defined by the 'graphManager' setting) with one argument of class Settings

Here's part of my yaml

host: 0.0.0.0
port: 8182
evaluationTimeout: 30000
channelizer: org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer
graphManager: org.janusgraph.graphdb.management.JanusGraphManager
graphs: {
  graph: conf/gremlin-server/http-janusgraph-inmemory-server.properties
}
scriptEngines: {
  gremlin-groovy: {
    #scripts: [databases/load_vertexs_and_edges.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]}}}}

I tried remove row with graphManager, but instead got another error

674  [main] WARN  org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager  - Graph [graph] configured at [conf/gremlin-server/http-janusgraph-inmemory-server.properties] could not be instantiated and will not be available in Gremlin Server.  GraphFactory message: The location configuration must resolve to a file and [conf/gremlin-server/http-janusgraph-inmemory-server.properties] does not
java.lang.IllegalArgumentException: The location configuration must resolve to a file and [conf/gremlin-server/http-janusgraph-inmemory-server.properties] does not

What am I doing wrong? Maybe I broke environment variable? I use janusgraph-0.6.2

UPDATE: So I change properties file to built-in janusgraph-inmemory and write full path, and its load graph but server didnt load, I think. I copy entire log, because I think I dont understand where is problem. <FULL_PATH> is just my path

161  [main] INFO  org.janusgraph.graphdb.server.JanusGraphServer  - JanusGraph Version: 0.6.2
161  [main] INFO  org.janusgraph.graphdb.server.JanusGraphServer  - TinkerPop Version: 3.5.3
164  [main] INFO  org.janusgraph.graphdb.server.JanusGraphServer  - Configuring JanusGraph Server from /home/<FULL_PATH>/janusgraph-0.6.2/conf/gremlin-server/http-gremlin-server.yaml
500  [main] INFO  org.apache.tinkerpop.gremlin.server.util.MetricManager  - Configured Metrics ConsoleReporter configured with report interval=180000ms
504  [main] INFO  org.apache.tinkerpop.gremlin.server.util.MetricManager  - Configured Metrics CsvReporter configured with report interval=180000ms to fileName=/tmp/gremlin-server-metrics.csv
589  [main] INFO  org.apache.tinkerpop.gremlin.server.util.MetricManager  - Configured Metrics JmxReporter configured with domain= and agentId=
596  [main] INFO  org.apache.tinkerpop.gremlin.server.util.MetricManager  - Configured Metrics Slf4jReporter configured with interval=180000ms and loggerName=org.apache.tinkerpop.gremlin.server.Settings$Slf4jReporterMetrics
1284 [main] INFO  org.janusgraph.diskstorage.configuration.builder.ReadConfigurationBuilder  - Set default timestamp provider MICRO
1303 [main] INFO  org.janusgraph.graphdb.idmanagement.UniqueInstanceIdRetriever  - Generated unique-instance-id=7f00010124010-mds-pc1
1341 [main] INFO  org.janusgraph.diskstorage.configuration.ExecutorServiceBuilder  - Initiated fixed thread pool of size 8
1432 [main] INFO  org.janusgraph.diskstorage.log.kcvs.KCVSLog  - Loaded unidentified ReadMarker start time 2022-08-06T15:29:06.480Z into org.janusgraph.diskstorage.log.kcvs.KCVSLog$MessagePuller@51df223b
1436 [main] INFO  org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager  - Graph [graph] was successfully configured via [/home/<FULL_PATH>/janusgraph-0.6.2/conf/janusgraph-inmemory.properties].
1436 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized Gremlin thread pool.  Threads in pool named with pattern gremlin-*
1506 [main] ERROR org.janusgraph.graphdb.server.JanusGraphServer  - JanusGraph Server was unable to start and will now begin shutdown
java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
    at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.initializeGremlinScriptEngineManager(GremlinExecutor.java:454)
    at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.<init>(GremlinExecutor.java:110)
    at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.<init>(GremlinExecutor.java:79)
    at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor$Builder.create(GremlinExecutor.java:596)
    at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:137)
    at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:127)
    at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:90)
    at org.janusgraph.graphdb.server.JanusGraphServer.start(JanusGraphServer.java:85)
    at org.janusgraph.graphdb.server.JanusGraphServer.main(JanusGraphServer.java:53)
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.groovy.engine.GremlinExecutor.initializeGremlinScriptEngineManager(GremlinExecutor.java:440)
    ... 8 more
Caused by: java.lang.IllegalArgumentException: java.io.FileNotFoundException: scripts/empty-sample.groovy
    at org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin$Builder.files(ScriptFileGremlinPlugin.java:68)
    ... 13 more
Caused by: java.io.FileNotFoundException: scripts/empty-sample.groovy
    ... 14 more

Solution

  • Okey, after some careful reading i understand its just cant file empty-sample.groovy in yaml file, so I just delete org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin