[英]Have both Gremlin-Server AND NEO4J Server running at the same time
Current it seems we cannot run both Neo4J Server and Gremlin Server at the same time.目前看来我们不能同时运行Neo4J 服务器和Gremlin 服务器。 Is there any way to have run both?
有没有办法同时运行两者?
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph].......................(truncated)
java.lang.RuntimeException: GraphFactory 无法实例化这个 Graph 实现 [class org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph]........................ ..(截断)
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.
引起:org.neo4j.kernel.StoreLockException:Store 及其锁文件已被另一个进程锁定:/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版本
I realize it has been a while, but I finally figured this out and thought others should know.我意识到已经有一段时间了,但我终于明白了这一点,并认为其他人应该知道。 As Stephen Mallette said, you can use the Bolt implementation.
正如 Stephen Mallette 所说,您可以使用 Bolt 实现。 To configure this for Gremlin Server, use the included
gremlin-server-neo4j.yaml
file and make the following change:要为 Gremlin Server 配置它,请使用包含的
gremlin-server-neo4j.yaml
文件并进行以下更改:
graphs: {
graph: conf/neo4j-bolt.properties}
Then create the neo4j-bolt.properties
file with this content:然后使用以下内容创建
neo4j-bolt.properties
文件:
gremlin.graph=com.steelbridgelabs.oss.neo4j.structure.Neo4JGraph
#neo4j.graph.name=graph.db
neo4j.identifier=dummy
neo4j.url=bolt://localhost:7687
neo4j.username=neo4j
neo4j.password=<password>
neo4j.readonly=false
neo4j.vertexIdProvider=com.steelbridgelabs.oss.neo4j.structure.providers.Neo4JNativeElementIdProvider
neo4j.edgeIdProvider=com.steelbridgelabs.oss.neo4j.structure.providers.Neo4JNativeElementIdProvider
Remember to replace the password, and any other property with the correct values.请记住用正确的值替换密码和任何其他属性。
You cannot run them together that way (ie embedded mode), but it should be possible to run them together, if you either:您不能以这种方式一起运行它们(即嵌入模式),但是如果您选择以下任一方式,则应该可以一起运行它们:
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 Server 打包的 Neo4j 配置文件,您可以编辑
conf/neo4j-empty.properties
以包括:
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
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.然后使用
bin/gremlin-server.sh conf/gremlin-server-neo4j.yaml
启动 Gremlin 服务器,此时您可以使用标准 TinkerPop 驱动程序以及针对同一图形实例的标准 Bolt 连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.