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}{127.0.0.1:9300}]
]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:328)
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:226)
at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:59)
at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:345)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:403)
at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1226)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:80)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:54)
I have tried some parameters such as
-Des.network.host=0.0.0.0 and -Des.network.host=0.0.0.0 but without sucess.
p.s: I did the same test downloading and then run ES manually and the code works