I would appreciate some guidance on configuring gremlin-server to accept requests from python.
I've installed gremlin-console-3.4.7 and gremlin-server-3.4.7 on my Windows 10 machine.
I can initialize gremlin-server-3.4.7 with gremlin-server-modern.yaml and use gremlin-console-3.4.7 to traverse the graph.
I am not able to initialize gremlin-server-3.4.7 with gremlin-server-modern-py.yaml.
==================================Some Data ========================================
The gremlin-server-modern-py.yaml file has the following comments...
# Note that TinkerPop does not include gremlin-python dependencies in
# its distributions. This file cannot be used as a configuration file
# to Gremlin Server unless those dependencies are installed on the
# Gremlin Server path with:
#
# bin/gremlin-server.sh -i org.apache.tinkerpop gremlin-python x.y.z
#
# The primary change in this file to enable the GremlinJythonScriptEngine
# is the addition of "gremlin-jython" to the "scriptEngines" field.
=======================================================================================
I followed the instruction to install, adapting the shell script to the bat file format for Windows... with an unexpected result.
PS C:\TinkerPop\gremlin\server-3.4.7> ./bin/gremlin-server.bat install org.apache.tinkerpop gremlin-python 3.4.7
Could not install the dependency: a module with the name gremlin-python is already installed
java.lang.IllegalStateException: a module with the name gremlin-python is already installed
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:234)
at org.apache.tinkerpop.gremlin.groovy.util.DependencyGrabber.copyDependenciesToPath(DependencyGrabber.groovy:73)
at org.apache.tinkerpop.gremlin.server.util.GremlinServerInstall.main(GremlinServerInstall.java:42)
=======================================================================================
I tried to initialize gremlin-server with gremlin-server-modern-py.yaml file, with an unexpected result...
C:\TinkerPop\gremlin\server-3.4.7>bin\gremlin-server.bat conf/gremlin-server-modern-py.yaml
[INFO] GremlinServer - 3.4.7
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
[INFO] GremlinServer - Configuring Gremlin Server from conf/gremlin-server-modern-py.yaml
[INFO] MetricManager - Configured Metrics Slf4jReporter configured with interval=180000ms and loggerName=org.apache.tinkerpop.gremlin.server.Settings$Slf4jReporterMetrics
[INFO] DefaultGraphManager - Graph [graph] was successfully configured via [conf/tinkergraph-empty.properties].
[INFO] ServerGremlinExecutor - Initialized Gremlin thread pool. Threads in pool named with pattern gremlin-*
[INFO] ServerGremlinExecutor - Initialized GremlinExecutor and preparing GremlinScriptEngines instances.
[INFO] ServerGremlinExecutor - Initialized gremlin-groovy GremlinScriptEngine and registered metrics
[WARN] ServerGremlinExecutor - Could not initialize gremlin-jython GremlinScriptEngine as init script could not be evaluated
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: gremlin-jython is not an available GremlinScriptEngine
...
Caused by: java.lang.IllegalArgumentException: gremlin-jython is not an available GremlinScriptEngine
...
[WARN] ServerGremlinExecutor - Could not initialize gremlin-python GremlinScriptEngine as init script could not be evaluated
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: gremlin-python is not an available GremlinScriptEngine
...
Caused by: java.lang.IllegalArgumentException: gremlin-python is not an available GremlinScriptEngine
...
[INFO] ServerGremlinExecutor - A GraphTraversalSource is now bound to [g] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
[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 - Executing start up LifeCycleHook
[INFO] Logger$info - Loading 'modern' graph data.
[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
[WARN] AbstractChannelizer - The org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0 serialization class is deprecated.
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v3.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0
[WARN] AbstractChannelizer - The org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0 serialization class is deprecated.
[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] AbstractChannelizer - Configured application/vnd.graphbinary-v1.0 with org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1
[INFO] AbstractChannelizer - Configured application/vnd.graphbinary-v1.0-stringd with org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1
[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.
===================================================================================
I see the following parameters in the gremlin-server-modern-py.yaml file ...
host: localhost
port: 8182
threadPoolWorker: 1
gremlinPool: 8
evaluationTimeout: 30000
graphs: {
graph: conf/tinkergraph-empty.properties}
scriptEngines: {
gremlin-groovy: {
plugins: { 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/generate-modern.groovy]}}},
gremlin-jython: {},
gremlin-python: {}
}
===================================================================================
At this point, I am looking for suggestions...
1. Is the install command not complete as shown in the yaml comments, or do I need to point to a package?
2. I'm thinking that I need to alter the .yaml file in some way..... I see references in the yaml, and startup error messages for both gremlin-python and gremlin-jython.
a. do I need both? I don't plan to use jython,
b. do I need to provide a module reference for either ?
3. Other ?
Thanks.