# Failure to elect master, v7.17

**URL:** <https://discuss.elastic.co/t/failure-to-elect-master-v7-17/340149>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [August 4, 2023, 4:06pm UTC](https://discuss.elastic.co/t/failure-to-elect-master-v7-17/340149 "2023-08-04T16:06:40Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [August 4, 2023, 7:09pm UTC](https://discuss.elastic.co/t/failure-to-elect-master-v7-17/340149/4 "2023-08-04T19:09:53Z")

</div>

Now it seems that the nodes are able to talk with each other, but are returning the container IP.

It seems that you the `network.publish_host` is need indeed, but also the `network.host`.

Try to use this in the yaml files:

```auto
  - network.host=0.0.0.0
  - network.publish_host=host-ip-address

```

It seems to have worked on this [simular post](https://discuss.elastic.co/t/which-network-host-to-use-to-connect-nodes-running-inside-docker-containers-on-separate-machines/153204/3).

---

_[View the full topic](https://discuss.elastic.co/t/failure-to-elect-master-v7-17/340149)._
