2
votes

I want to create elastic search indexes on neo4j data. I reffered https://github.com/neo4j-contrib/neo4j-elasticsearch and https://www.youtube.com/watch?v=SJLSFsXgOvA&ab_channel=AnmolAgrawal to create elasticsearch index from neo4j.

But after that, im getting below error in neo4j.log file.

    2016-11-08 12:20:09.825+0000 WARN  Error updating ElasticSearch  No Server is assigned to client to connect
io.searchbox.client.config.exception.NoServerConfiguredException: No Server is assigned to client to connect
    at io.searchbox.client.AbstractJestClient$ServerPool.getNextServer(AbstractJestClient.java:132)
    at io.searchbox.client.AbstractJestClient.getNextServer(AbstractJestClient.java:81)
    at io.searchbox.client.http.JestHttpClient.prepareRequest(JestHttpClient.java:80)
    at io.searchbox.client.http.JestHttpClient.executeAsync(JestHttpClient.java:60)
    at org.neo4j.elasticsearch.ElasticSearchEventHandler.afterCommit(ElasticSearchEventHandler.java:81)
    at org.neo4j.elasticsearch.ElasticSearchEventHandler.afterCommit(ElasticSearchEventHandler.java:27)
    at org.neo4j.kernel.internal.TransactionEventHandlers.afterCommit(TransactionEventHandlers.java:149)
    at org.neo4j.kernel.internal.TransactionEventHandlers.afterCommit(TransactionEventHandlers.java:47)
    at org.neo4j.kernel.impl.api.TransactionHooks.afterCommit(TransactionHooks.java:75)
    at org.neo4j.kernel.impl.api.KernelTransactionImplementation.afterCommit(KernelTransactionImplementation.java:541)
    at org.neo4j.kernel.impl.api.KernelTransactionImplementation.commit(KernelTransactionImplementation.java:482)
    at org.neo4j.kernel.impl.api.KernelTransactionImplementation.close(KernelTransactionImplementation.java:380)
    at org.neo4j.server.rest.transactional.TransitionalTxManagementKernelTransaction.commit(TransitionalTxManagementKernelTransaction.java:92)
    at org.neo4j.server.rest.transactional.TransactionHandle.closeContextAndCollectErrors(TransactionHandle.java:243)
    at org.neo4j.server.rest.transactional.TransactionHandle.commit(TransactionHandle.java:151)
    at org.neo4j.server.rest.web.TransactionalService.lambda$executeStatementsAndCommit$29(TransactionalService.java:202)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
    at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:302)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1510)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

How to fix this error or is there any other way to update index if neo4j node's property value changes?

2
I am guessing some credentials error.Mihai Raulea

2 Answers

1
votes

As this is one of the very few page that appears when you search Google for this string, I wanted to post a clear (one that J. Dimeo's answer above alludes to, but is far from specific).

In your graylog config (/etc/graylog/server/server.conf for me), set elasticsearch_discovery_enabled to false, and resart the service.

That's it :)

0
votes

Are you using AWS ElasticSearch? They do not allow connecting to individual nodes. I read elsewhere (from the AWS team): "Looking over the logs, it seems that 'i.s.c.config.discovery.NodeChecker' is trying to auto discover and connect to the individual nodes of the cluster. Amazon is continuously working hard on improving the service features but unfortunately, at this moment AWS doesn't allow clients to connect to the individual nodes of the cluster. Instead, you can connect using the URL"

You need to turn off node discovery in the Jest client somehow: ClientConfig clientConfig = new ClientConfig.Builder("http://localhost:9200").discoveryEnabled(false)

See https://github.com/searchbox-io/Jest/blob/master/jest/README.md#node-discovery-through-nodes-api