# Elastic 8.0 refuses connections using hostname instead of localhost

**URL:** <https://discuss.elastic.co/t/elastic-8-0-refuses-connections-using-hostname-instead-of-localhost/319416>\
**Category:** Elasticsearch\
**Created:** [November 21, 2022, 9:59am UTC](https://discuss.elastic.co/t/elastic-8-0-refuses-connections-using-hostname-instead-of-localhost/319416 "2022-11-21T09:59:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rudolf\_Reddy\_Macejka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rudolf_reddy_macejka/32/12875_2.png) [@Rudolf\_Reddy\_Macejka](https://discuss.elastic.co/u/Rudolf_Reddy_Macejka)\
**Post date:** [November 21, 2022, 9:59am UTC](https://discuss.elastic.co/t/elastic-8-0-refuses-connections-using-hostname-instead-of-localhost/319416/1 "2022-11-21T09:59:08Z")

</div>

Hello team,

I would like to ask you for your expertized advice.

After an one of Elastic restart WITHOUT TOUCHING CONFIG 🙂 it started refuse connections using  
hostname:9200.

I have tried variations found on this forum even on others.  
Nothing working.

This is snipped from my config including commented attempts.

```auto
#network.host: 192.168.0.1
network:
  host: 0.0.0.0
#network.host: czchown5029751.blabla.com
#network.host: [_site_ , _local_ , _global_ , czchown5029751.blabla.com]
#network.bind_host: [_site_ , _local_ , _global_]
#network.publish_host: czchown5029751.blabla.com
  bind_host: [_site_ , _local_ , _global_]
  publish_host: czchown5029751.blabla.com

```

In log I can see:

```auto
[2022-11-21T10:50:18,406][INFO][o.e.x.d.l.DeprecationIndexingComponent] [CZCHOWN5029751] deprecation component started
[2022-11-21T10:50:18,593][INFO][o.e.t.TransportService] [CZCHOWN5029751] publish_address {czchown5029751.blabla.com/2.252.208.139:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}, {172.18.128.1:9300}, {2.252.208.139:9300}
[2022-11-21T10:50:19,360][INFO][o.e.b.BootstrapChecks] [CZCHOWN5029751] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2022-11-21T10:50:19,368][INFO][o.e.c.c.Coordinator] [CZCHOWN5029751] cluster UUID [XY3O-wkiTDuP6SKqe47LHA]
[2022-11-21T10:50:19,511][INFO][o.e.c.s.MasterService] [CZCHOWN5029751] elected-as-master ([1] nodes joined)[{CZCHOWN5029751}{NmAi12d5SFS_E8BNDyEqFA}{Y1hIgzKEQ_SNrU_EtYZdnQ}{czchown5029751.blabla.com}{2.252.208.139:9300}{cdfhilmrstw} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 29, version: 1213, delta: master node changed {previous [], current [{CZCHOWN5029751}{NmAi12d5SFS_E8BNDyEqFA}{Y1hIgzKEQ_SNrU_EtYZdnQ}{czchown5029751.blabla.com}{2.252.208.139:9300}{cdfhilmrstw}]}
[2022-11-21T10:50:19,637][INFO][o.e.c.s.ClusterApplierService] [CZCHOWN5029751] master node changed {previous [], current [{CZCHOWN5029751}{NmAi12d5SFS_E8BNDyEqFA}{Y1hIgzKEQ_SNrU_EtYZdnQ}{czchown5029751.blabla.com}{2.252.208.139:9300}{cdfhilmrstw}]}, term: 29, version: 1213, reason: Publication{term=29, version=1213}
[2022-11-21T10:50:20,197][INFO][o.e.h.AbstractHttpServerTransport] [CZCHOWN5029751] publish_address {172.18.128.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}, {172.18.128.1:9200}
[2022-11-21T10:50:20,200][INFO][o.e.n.Node] [CZCHOWN5029751] started

```

As you can see, it will publish the hostname on port 9300 which I didn't defined but not for port 9200.

Is it a problem between chair and keyboard or really there is a bug?

Thank you for help.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 21, 2022, 10:51pm UTC](https://discuss.elastic.co/t/elastic-8-0-refuses-connections-using-hostname-instead-of-localhost/319416/2 "2022-11-21T22:51:59Z")

</div>

What are you trying to achieve with the differences between `bind_host` and `publish_host`?

---

<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:** [December 19, 2022, 10:52pm UTC](https://discuss.elastic.co/t/elastic-8-0-refuses-connections-using-hostname-instead-of-localhost/319416/3 "2022-12-19T22:52:07Z")

</div>

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