Following docs, cannot connect to Dockerized ES via TransportClient

Hello; I'm new to ElasticSearch. I've followed the official documentation on how to kick the tires using Docker.

Specifically, I've run the Docker image like so:

$ docker run -p 9200:9200 -p 9300:9300 -e "" -e "" -e ""

If I point my browser at http://localhost:9200/_cat/health, I get:

1498166019 21:13:39 docker-cluster yellow 1 1 3 3 0 0 3 0 - 50.0%

...which of course worries me, but fine, I don't really have any control over this.

Then I build my Java Client like so:

this.client = new PreBuiltTransportClient(Settings.builder()
                                      .put("", "docker-cluster")
                                      .put("client.transport.sniff", true)
  .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(""), 9300));

...and an attempt to get something results in the dreaded:

NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{q00tH2RKTlCkXut03lYHOg}{}{}]]

Which part of the official documentation explains why this doesn't work? Thanks in advance for help.


I've discovered the documentation flaws and have documented them in my answer on StackOverflow. I hope this helps others.

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