2017-04-04 119 views
0

我正在嘗試使用Graphware neo4j-to-elastic插件來集成Neo4j和ElasticSearch。參考:https://github.com/graphaware/neo4j-to-elasticsearchElasticSearch無法創建索引

neo4j和elastic的當前版本分別是3.1.2和2.4.2。我已經開始了elasticsearch服務器及其運行在端口9200和9300

按照上述步驟後,我重新啓動Neo4j的,我得到一個錯誤

2017-04-04 18:57:13.453+0000 INFO [c.g.m.e.s.Searcher] Created Jest Client. 
2017-04-04 18:57:13.453+0000 ERROR [c.g.m.e.ElasticSearchWriter] Failed to create Elasticsearch index. org.apache.http.client.ClientProtocolException 
java.lang.RuntimeException: org.apache.http.client.ClientProtocolException 
    at com.graphaware.module.es.mapping.BaseMapping.lambda$createIndexAndMapping$13(BaseMapping.java:177) 
    at com.graphaware.module.es.mapping.BaseMapping$$Lambda$234/582360661.accept(Unknown Source) 
    at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) 
    at java.util.stream.DistinctOps$1$2.accept(Unknown Source) 
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source) 
    at java.util.stream.AbstractPipeline.copyInto(Unknown Source) 

我無法理解爲什麼我收到這個錯誤?

回答

0

elasticsearch的9200端口用於ReST API,9300用於Java API。因此,它需要使用9200,而不是9300

在neo4j.conf的配置應該是: com.graphaware.module.ES.port = 9200