# Following docs, cannot connect to Dockerized ES via TransportClient

**URL:** <https://discuss.elastic.co/t/following-docs-cannot-connect-to-dockerized-es-via-transportclient/90543>\
**Category:** Elasticsearch\
**Created:** [June 22, 2017, 9:27pm UTC](https://discuss.elastic.co/t/following-docs-cannot-connect-to-dockerized-es-via-transportclient/90543 "2017-06-22T21:27:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ljnelson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ljnelson/32/19449_2.png) [@ljnelson](https://discuss.elastic.co/u/ljnelson)\
**Post date:** [June 22, 2017, 9:27pm UTC](https://discuss.elastic.co/t/following-docs-cannot-connect-to-dockerized-es-via-transportclient/90543/1 "2017-06-22T21:27:03Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![ljnelson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ljnelson/32/19449_2.png) [@ljnelson](https://discuss.elastic.co/u/ljnelson)\
**Post date:** [June 22, 2017, 10:09pm UTC](https://discuss.elastic.co/t/following-docs-cannot-connect-to-dockerized-es-via-transportclient/90543/2 "2017-06-22T22:09:00Z")

</div>

I've discovered the documentation flaws and have [documented them in my answer on StackOverflow](https://stackoverflow.com/a/44710078/208288). I hope this helps others.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 20, 2017, 10:09pm UTC](https://discuss.elastic.co/t/following-docs-cannot-connect-to-dockerized-es-via-transportclient/90543/3 "2017-07-20T22:09:02Z")

</div>

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