Refuse Connection using docker and Java Library

(Otávio Gonçalves De Santana) #1

On docker I ran the command: "docker run --name elasticsearch-instance -p 9300:9300 -p 9200:9200 -d elasticsearch"

And then I tried to connect using the Java Driver to do a small test.

But it returns an error for refused connection:

NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{ZMxWNaY-QPKf9YCkpnRRqw}{localhost}{}]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(
at org.elasticsearch.client.transport.TransportClientNodesService.execute(
at org.elasticsearch.client.transport.TransportProxyClient.execute(
at org.elasticsearch.client.transport.TransportClient.doExecute(
at org.elasticsearch.action.ActionRequestBuilder.execute(
at org.elasticsearch.action.ActionRequestBuilder.execute(

I have tried some parameters such as and but without sucess.

p.s: I did the same test downloading and then run ES manually and the code works

(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.