elasticsearchneo4jgraphaware

ElasticSearch Failed to create index


I am trying to integrate Neo4j and ElasticSearch using graphware neo4j-to-elastic plugin. Reference: https://github.com/graphaware/neo4j-to-elasticsearch

The current version on neo4j and elastic are 3.1.2 and 2.4.2 respectively. I have started the elasticsearch server and its running on port 9200 and 9300.

After following the above steps, I restarted neo4j and I get an error

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)

I am not able to understand why I am getting this error?


Solution

  • Port 9200 of elasticsearch is for ReST API and 9300 is for Java API. Hence it is required to use the 9200, and not the 9300.

    The configure it in neo4j.conf should be: com.graphaware.module.ES.port=9200