# Elasticsearch does not work with network.host 0.0.0.0

**URL:** <https://discuss.elastic.co/t/elasticsearch-does-not-work-with-network-host-0-0-0-0/228162>\
**Category:** Elasticsearch\
**Created:** [April 15, 2020, 3:50pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-work-with-network-host-0-0-0-0/228162 "2020-04-15T15:50:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wiktort](https://avatars.discourse-cdn.com/v4/letter/w/a3d4f5/32.png) [@wiktort](https://discuss.elastic.co/u/wiktort)\
**Post date:** [April 15, 2020, 3:50pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-work-with-network-host-0-0-0-0/228162/1 "2020-04-15T15:50:01Z")

</div>

I have been trying to set up a test version of a website on a different server.  
The website uses React, Strapi, Postgres, Nginx and Elasticsearch.  
All of them are working, but the website is stuck on a loader.

I do not whether it is something with Elasticsearch or something else. However, I had a problem with network.host in yml file. When it was network.host 127.0.0.1 I could curl only for 127.0.0.1:9200 and it did not work with server-ip:9200. When I had changed it into 0.0.0.0, I could not restart elastic. So I have changed it into html.host 0.0.0.0. and it works for both 127.0.0.1:9200 and server-ip:9200.  
Can I leave it like that? I mean with html.host. Or it shouldn't be like that?

Thank you for your help in advance!

---

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [April 15, 2020, 4:20pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-work-with-network-host-0-0-0-0/228162/2 "2020-04-15T16:20:02Z")

</div>

Covered in [this post](https://discuss.elastic.co/t/network-host-vs-http-host-in-the-elasticsearch-yml/156242)

---

<div class="post-metadata">

**Author:** ![wiktort](https://avatars.discourse-cdn.com/v4/letter/w/a3d4f5/32.png) [@wiktort](https://discuss.elastic.co/u/wiktort)\
**Post date:** [April 15, 2020, 5:39pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-work-with-network-host-0-0-0-0/228162/3 "2020-04-15T17:39:22Z")

</div>

I had read it before, but I still was not sure.  
Maybe I can use both html.host and network.host in the same time. What do you think?

---

<div class="post-metadata">

**Author:** ![wiktort](https://avatars.discourse-cdn.com/v4/letter/w/a3d4f5/32.png) [@wiktort](https://discuss.elastic.co/u/wiktort)\
**Post date:** [April 15, 2020, 6:51pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-work-with-network-host-0-0-0-0/228162/4 "2020-04-15T18:51:10Z")

</div>

It has started to work with only network.host after I add a domain instead IP.

---

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [April 16, 2020, 12:50am UTC](https://discuss.elastic.co/t/elasticsearch-does-not-work-with-network-host-0-0-0-0/228162/5 "2020-04-16T00:50:17Z")

</div>

From what I remember, I think network.host signals more startup checks to be enforced.

---

<div class="post-metadata">

**Author:** ![wiktort](https://avatars.discourse-cdn.com/v4/letter/w/a3d4f5/32.png) [@wiktort](https://discuss.elastic.co/u/wiktort)\
**Post date:** [April 16, 2020, 12:27pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-work-with-network-host-0-0-0-0/228162/6 "2020-04-16T12:27:18Z")

</div>

It was a communication problem. I have added CORS settings and it works now.

---

<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:** [May 14, 2020, 12:27pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-work-with-network-host-0-0-0-0/228162/7 "2020-05-14T12:27:25Z")

</div>

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