无法按照文档启动 JanusGraph
Cannot Start JanusGraph as per documentation
我正在使用 Janus Graph doc 并按照提到的方式提取它。
./gremlin.sh
工作正常,它会启动 Gremlin 提示符。
此代码也可以正常工作
graph = JanusGraphFactory.open('inmemory')
g = graph.traversal()
问题
当我这样做时,我得到了一个巨大的堆栈跟踪
graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje-es.properties')
gremlin> graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje-es.properties')
12:15:49 WARN org.janusgraph.diskstorage.es.rest.RestElasticSearchClient - Unable to determine Elasticsearch server version. Default to FIVE.
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171)
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348)
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192)
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.run(CloseableHttpAsyncClientBase.java:64)
at java.lang.Thread.run(Thread.java:748)
Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex
Type ':help' or ':h' for help.
Display stack trace? [yN]
从 JanusGraph 0.2.0 开始,您不能 运行 Elasticsearch 作为嵌入式节点,因此您需要启动一个 Elasticsearch 节点。您可以下载并部署自己的 Elasticsearch node, or you could take advantage of the JanusGraph pre-packaged distribution:
bin/janusgraph.sh start
此命令将启动一个 Cassandra 节点、一个 Elasticsearch 节点和一个 Gremlin 服务器。请注意,您需要 Java 开发工具包 (JDK) 才能 运行 此命令。
或者,您可以从 JanusGraph pre-packaged 分布启动唯一的 Elasticsearch 节点:
elasticsearch/bin/elasticsearch
这将在前台启动 Elasticsearch。
我正在使用 Janus Graph doc 并按照提到的方式提取它。
./gremlin.sh
工作正常,它会启动 Gremlin 提示符。
此代码也可以正常工作
graph = JanusGraphFactory.open('inmemory')
g = graph.traversal()
问题
当我这样做时,我得到了一个巨大的堆栈跟踪
graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje-es.properties')
gremlin> graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje-es.properties')
12:15:49 WARN org.janusgraph.diskstorage.es.rest.RestElasticSearchClient - Unable to determine Elasticsearch server version. Default to FIVE.
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171)
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348)
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192)
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.run(CloseableHttpAsyncClientBase.java:64)
at java.lang.Thread.run(Thread.java:748)
Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex
Type ':help' or ':h' for help.
Display stack trace? [yN]
从 JanusGraph 0.2.0 开始,您不能 运行 Elasticsearch 作为嵌入式节点,因此您需要启动一个 Elasticsearch 节点。您可以下载并部署自己的 Elasticsearch node, or you could take advantage of the JanusGraph pre-packaged distribution:
bin/janusgraph.sh start
此命令将启动一个 Cassandra 节点、一个 Elasticsearch 节点和一个 Gremlin 服务器。请注意,您需要 Java 开发工具包 (JDK) 才能 运行 此命令。
或者,您可以从 JanusGraph pre-packaged 分布启动唯一的 Elasticsearch 节点:
elasticsearch/bin/elasticsearch
这将在前台启动 Elasticsearch。