# Connection refused to connect elastic through ip with same machine

**URL:** https://discuss.elastic.co/t/connection-refused-to-connect-elastic-through-ip-with-same-machine/169996
**Category:** Elasticsearch
**Created:** [February 26, 2019, 11:49am UTC](https://discuss.elastic.co/t/connection-refused-to-connect-elastic-through-ip-with-same-machine/169996 "2019-02-26T11:49:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mani6264](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mani6264](https://discuss.elastic.co/u/mani6264)
#### Post date: [February 26, 2019, 11:49am UTC](https://discuss.elastic.co/t/connection-refused-to-connect-elastic-through-ip-with-same-machine/169996/1 "2019-02-26T11:49:40Z")

</div>

Hi am new to elastic search,

i hitting loclhost:9200 it's working fine but when i hit IP:9200 that's not connected with same machine elastic installed? what should i do?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 26, 2019, 1:12pm UTC](https://discuss.elastic.co/t/connection-refused-to-connect-elastic-through-ip-with-same-machine/169996/2 "2019-02-26T13:12:34Z")

</div>

Change `network.host` in your configuration file. More on **important settings** in the documentation.

---

<div class="post-metadata">

### Author: ![mani6264](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mani6264](https://discuss.elastic.co/u/mani6264)
#### Post date: [February 26, 2019, 1:26pm UTC](https://discuss.elastic.co/t/connection-refused-to-connect-elastic-through-ip-with-same-machine/169996/3 "2019-02-26T13:26:34Z")

</div>

i changed sir but it's not working

i had elastic 6.6.1 while i running through command prompt its automatically stop the service

---

<div class="post-metadata">

### Author: ![mani6264](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mani6264](https://discuss.elastic.co/u/mani6264)
#### Post date: [February 26, 2019, 1:50pm UTC](https://discuss.elastic.co/t/connection-refused-to-connect-elastic-through-ip-with-same-machine/169996/4 "2019-02-26T13:50:31Z")

</div>

Error resolved mistake of not remove the # symbol at the network.host line in yml file

---

<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: [March 26, 2019, 2:03pm UTC](https://discuss.elastic.co/t/connection-refused-to-connect-elastic-through-ip-with-same-machine/169996/5 "2019-03-26T14:03:01Z")

</div>

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