Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groovy version conflect with gremlin server #166

Closed
x007007007 opened this issue Jun 17, 2019 · 2 comments
Closed

Groovy version conflect with gremlin server #166

x007007007 opened this issue Jun 17, 2019 · 2 comments

Comments

@x007007007
Copy link

This is my config, I run gremlin server on window 7 , gremlin-server version is 3.4.2

gremlin-service.yaml

host: localhost
port: 8182
scriptEvaluationTimeout: 30000
threadPoolWorker: 1
gremlinPool: 8
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphs: {
  graph : conf/orientdb-empty.properties
}
scriptEngines: {
  gremlin-groovy: {
    plugins: { org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
               org.apache.tinkerpop.gremlin.orientdb.jsr223.OrientDBGremlinPlugin: {},
               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]}}},
}
serializers:
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.apache.tinkerpop.gremlin.orientdb.io.OrientIoRegistry] }}             # application/vnd.gremlin-v3.0+gryo
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}                                                                       # application/vnd.gremlin-v3.0+gryo-stringd
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { ioRegistries: [org.apache.tinkerpop.gremlin.orientdb.io.OrientIoRegistry] }}         # application/json
processors:
  - { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
  - { className: org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor, config: { cacheExpirationTime: 600000, cacheMaxSize: 1000 }}
metrics: {
  consoleReporter: {enabled: true, interval: 180000},
  csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
  jmxReporter: {enabled: true},
  slf4jReporter: {enabled: true, interval: 180000}}
strictTransactionManagement: false
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
maxContentLength: 65536
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
writeBufferHighWaterMark: 65536
ssl: {
  enabled: false
}

orientdb-empty.properties

gremlin.graph=org.apache.tinkerpop.gremlin.orientdb.OrientFactory
orient-url=remote:localhost/db
orient-user=gremlin		
orient-pass=gremlin

$ bin\gremlin-server
[INFO] GremlinServer - 3.4.2
         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----

[INFO] GremlinServer - Configuring Gremlin Server from conf/gremlin-server.yaml
[INFO] MetricManager - Configured Metrics ConsoleReporter configured with report interval=180000ms
[INFO] MetricManager - Configured Metrics CsvReporter configured with report interval=180000ms to fileName=/tmp/gremlin-server-metrics.csv
[INFO] MetricManager - Configured Metrics JmxReporter configured with domain= and agentId=
[INFO] MetricManager - Configured Metrics Slf4jReporter configured with interval=180000ms and loggerName=org.apache.tinkerpop.gremlin.server.Settings$Slf4jReporterMetrics
六月 17, 2019 4:18:27 下午 com.orientechnologies.common.log.OLogManager log
信息: Windows OS is detected, 262144 limit of open files will be set for the disk cache.
[INFO] DefaultGraphManager - Graph [graph] was successfully configured via [conf/orientdb-empty.properties].
[INFO] ServerGremlinExecutor - Initialized Gremlin thread pool.  Threads in pool named with pattern gremlin-*
[INFO] ServerGremlinExecutor - Initialized GremlinExecutor and preparing GremlinScriptEngines instances.
[WARN] ServerGremlinExecutor - Could not initialize gremlin-groovy GremlinScriptEngine as init script could not be evaluated
java.util.concurrent.CompletionException: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-jsr223 is loaded in version 2.5.6 and you are trying to load version 2.4.11
        at java.util.concurrent.CompletableFuture.reportJoin(Unknown Source)
        at java.util.concurrent.CompletableFuture.join(Unknown Source)
        at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.lambda$new$4(ServerGremlinExecutor.java:141)
        at java.util.LinkedHashMap$LinkedKeySet.forEach(Unknown Source)
        at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:136)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:122)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:86)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:345)
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-jsr223 is loaded in version 2.5.6 and you are trying to load version 2.4.11
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:523)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromMetaInf(ExtensionModuleScanner.java:81)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModulesFrom(ExtensionModuleScanner.java:63)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModules(ExtensionModuleScanner.java:55)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:124)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
        at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
        at org.codehaus.groovy.vmplugin.v7.IndyInterface.<clinit>(IndyInterface.java:107)
        at sun.misc.Unsafe.ensureClassInitialized(Native Method)
        at java.lang.invoke.DirectMethodHandle$EnsureInitialized.computeValue(Unknown Source)
        at java.lang.invoke.DirectMethodHandle$EnsureInitialized.computeValue(Unknown Source)
        at java.lang.ClassValue.getFromHashMap(Unknown Source)
        at java.lang.ClassValue.getFromBackup(Unknown Source)
        at java.lang.ClassValue.get(Unknown Source)
        at java.lang.invoke.DirectMethodHandle.checkInitialized(Unknown Source)
        at java.lang.invoke.DirectMethodHandle.ensureInitialized(Unknown Source)
        at java.lang.invoke.DirectMethodHandle.internalMemberNameEnsureInit(Unknown Source)
        at java.lang.invoke.CallSite.makeSite(Unknown Source)
        at java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(Unknown Source)
        at java.lang.invoke.MethodHandleNatives.linkCallSite(Unknown Source)
        at org.apache.tinkerpop.gremlin.groovy.loaders.GremlinLoader.load(GremlinLoader.groovy:27)
        at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.<init>(GremlinGroovyScriptEngine.java:223)
        at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngineFactory.getScriptEngine(GremlinGroovyScriptEngineFactory.java:63)
        at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.createGremlinScriptEngine(DefaultGremlinScriptEngineManager.java:415)
        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(Unknown Source)
        at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.getEngineByName(CachedGremlinScriptEngineManager.java:57)
        at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:266)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[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 size 1000 and expiration time of 600000 ms
[INFO] GremlinServer - idleConnectionTimeout was set to 0 which resolves to 0 seconds when configuring this value - this feature will be disabled
[INFO] GremlinServer - keepAliveInterval was set to 0 which resolves to 0 seconds when configuring this value - this feature will be disabled
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v3.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v3.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v3.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0
[INFO] AbstractChannelizer - Configured application/json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0
[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.
@x007007007
Copy link
Author

x007007007 commented Jun 18, 2019

It is seem that GremlinServer version is too high. GremlinServer 3.3.1 have a dependence with orientdb-gremlin 3.0.20.
newest develop branch is dependence GremlinServer 3.4.0 and orient 3.1.0,I can not build with GremlinServer 3.3.1.
So, Once I downgrading GremlinServer to 3.3.1, all error are disappear

@dritter-sap
Copy link
Contributor

This looks like a case similar to this one: #174. ODB version 3.0 supports TP gremlin server version 3.3.0. In ODB 3.1.0 the supported TP version is 3.4.6. Unfortunately, if the versions do not match, then you might see issues like the one you got.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants