# ElasticSearch in docker : NoNodeAvailableException

**URL:** <https://discuss.elastic.co/t/elasticsearch-in-docker-nonodeavailableexception/91302>\
**Category:** Elasticsearch\
**Created:** [June 29, 2017, 2:41pm UTC](https://discuss.elastic.co/t/elasticsearch-in-docker-nonodeavailableexception/91302 "2017-06-29T14:41:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RickSnz](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@RickSnz](https://discuss.elastic.co/u/RickSnz)\
**Post date:** [June 29, 2017, 2:41pm UTC](https://discuss.elastic.co/t/elasticsearch-in-docker-nonodeavailableexception/91302/1 "2017-06-29T14:41:23Z")

</div>

Hello, i'm trying to set up ElasticSearch using docker. I've followed this guide: [https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html) running it in development mode, so using:

```
`docker run -p 9200:9200 -p 9300:9300 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" docker.elastic.co/elasticsearch/elasticsearch:5.4.3`

```

The only thing i've changed is the port mapping, as i guess the 9300 is also necessary.The docker image seems to run fine, i can send queries to it using Sense and check /health and /nodes

My TransportClient.java looks like this:

```
@Bean
TransportClient transportClient() throws UnknownHostException {
	Settings settings = Settings.builder().put(TAG_CLUSTER_NAME, clusterName).put(TAG_TRANSPORT_SNIFF, false)
			.put(TAG_TRANSPORT_PING_TIMEOUT, 20, TimeUnit.SECONDS).build();
	TransportClient client = new PreBuiltTransportClient(settings);
	client.addTransportAddresses(new InetSocketTransportAddress(InetAddress.getByName(host), 9300));

	return client;
}

```

And my application.yml is:

```
elasticsearch.cluster.name: docker-cluster
elasticsearch.host: localhost

```

But i'm getting the following error:

ERROR org.springframework.data.elasticsearch.repository.support.AbstractElasticsearchRepository - failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{OH4x9CkPQyieRcmQjzbFWw}{localhost}{127.0.0.1:9300}]

I have tried changing many configuration parameters, like transport.host, network.host, changing the ports, the cluster name, etc, but i'm always getting the same error. I'm probably missing something very simple, but i cant see it, can you help me?

Thanks

---

<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 27, 2017, 2:41pm UTC](https://discuss.elastic.co/t/elasticsearch-in-docker-nonodeavailableexception/91302/2 "2017-07-27T14:41:44Z")

</div>

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