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 "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:5.4.2
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("cluster.name", "docker-cluster")
.put("client.transport.sniff", true)
.build())
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("127.0.0.1"), 9300));
...and an attempt to get something results in the dreaded:
NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{q00tH2RKTlCkXut03lYHOg}{127.0.0.1}{127.0.0.1:9300}]]
Which part of the official documentation explains why this doesn't work? Thanks in advance for help.
Best,
Laird