同时运行Gremlin-Server和NEO4J Server [英] Have both Gremlin-Server AND NEO4J Server running at the same time
问题描述
当前看来,我们不能同时运行 Neo4J Server 和 Gremlin Server .有什么办法可以同时运行两者吗?
Current it seems we cannot run both Neo4J Server and Gremlin Server at the same time. Is there any way to have run both?
- NEO4J正在运行,我尝试启动Gremlin Server,然后出现以下错误
java.lang.RuntimeException:GraphFactory无法实例化它 图的实现[类 org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph] .......................(被截短)
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph].......................(truncated)
- Gremlin Server正在运行,我尝试启动NEO4J Server,然后出现以下错误
由以下原因引起:org.neo4j.kernel.StoreLockException:存储及其锁 文件已被另一个进程锁定: /home/galaxia/Documents/neo4j-gremlin/data/databases/graph.db/store_lock. 请确保没有其他进程正在使用该数据库,并且请确保 目录是可写的(甚至对于只读访问也是必需的)
Caused by: org.neo4j.kernel.StoreLockException: Store and its lock file has been locked by another process: /home/galaxia/Documents/neo4j-gremlin/data/databases/graph.db/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)
版本
Versions
- Neo4J 3.3.1
- 克里姆林宫3.3.1
推荐答案
您不能以这种方式(即嵌入式模式)一起运行它们,但如果可以,则可以一起运行它们:
You cannot run them together that way (i.e. embedded mode), but it should be possible to run them together, if you either:
- Configure the Neo4j graph in Gremlin Server to use HA mode as described here
- Configure the Neo4j graph in Gremlin Server to use the Bolt implementation found here
- Enable the Bolt protocol in the Neo4j properties file provided to Gremlin Server.
作为第三个选项的示例,给定Neo4j的默认Gremlin Server打包配置文件,您可以编辑conf/neo4j-empty.properties
以包括:
As an example of the third option, given the default Gremlin Server packaged configuration files for Neo4j, you can edit conf/neo4j-empty.properties
to include:
gremlin.graph=org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph
gremlin.neo4j.directory=/tmp/neo4j
gremlin.neo4j.conf.dbms.connector.0.type=BOLT
gremlin.neo4j.conf.dbms.connector.0.enabled=true
gremlin.neo4j.conf.dbms.connector.0.address=localhost:7687
,然后使用bin/gremlin-server.sh conf/gremlin-server-neo4j.yaml
启动Gremlin Server,此时您可以针对同一图形实例使用标准的TinkerPop驱动程序以及标准的Bolt连接.
and then start Gremlin Server with bin/gremlin-server.sh conf/gremlin-server-neo4j.yaml
at which point you can use standard TinkerPop drivers as well as standard Bolt connectivity against the same graph instance.
这篇关于同时运行Gremlin-Server和NEO4J Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!