# Elastic change ip

**URL:** <https://discuss.elastic.co/t/elastic-change-ip/156426>\
**Category:** Elasticsearch\
**Created:** [November 13, 2018, 9:34am UTC](https://discuss.elastic.co/t/elastic-change-ip/156426 "2018-11-13T09:34:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nandha\_88](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nandha\_88](https://discuss.elastic.co/u/nandha_88)\
**Post date:** [November 13, 2018, 9:34am UTC](https://discuss.elastic.co/t/elastic-change-ip/156426/1 "2018-11-13T09:34:58Z")

</div>

Hi Team,

The ELK setup running fine for past 1 years without any issue

I tried to change elasticsearch ip from localhost to the public IP XX:XX:XX:XX but it is unsuccessfull. The logstash is not taking up the new ip

Changes made in the file

kibana.yml #elasticsearch.url: "[http://localhost:9200](http://localhost:9200)"  
elasticsearch.yml #network.host: 192.168.0.1  
logstash-sample.yml #hosts =\> ["[http://localhost:9200](http://localhost:9200)"]

After changing and restarting the es , kibana started and listen without any issue.  
But logstash gives the below error. I am able to telnet and curl xx:xx:xx:xx 9200  
without any issue

][WARN][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>"[http://localhost:9200/](http://localhost:9200/)", :error\_type=\>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=\>"Elasticsearch Unreachable: [[http://localhost:9200/](http://localhost:9200/)][Manticore::SocketException] Connection refused (Connection refused)"}

---

<div class="post-metadata">

**Author:** ![Magnus\_Kessler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnus_kessler/32/42001_2.png) [@Magnus\_Kessler](https://discuss.elastic.co/u/Magnus_Kessler)\
**Post date:** [November 13, 2018, 10:48am UTC](https://discuss.elastic.co/t/elastic-change-ip/156426/2 "2018-11-13T10:48:14Z")

</div>

It appears you've simply commented out `elasticsearch.url`, `network.host` and `hosts` from the relevant config files. This causes the applications to use their defaults. Try putting the actual IP addresses or host names into the configuration.

---

<div class="post-metadata">

**Author:** ![nandha\_88](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nandha\_88](https://discuss.elastic.co/u/nandha_88)\
**Post date:** [November 13, 2018, 11:27am UTC](https://discuss.elastic.co/t/elastic-change-ip/156426/3 "2018-11-13T11:27:57Z")

</div>

Hi Magnus

hosts =\> ["[http://localhost:9200](http://localhost:9200)"] =\> hosts =\> ["[http://1XX.16x.xx.xx:9200](http://1XX.16x.xx.xx:9200)"]

#network.host: 192.168.0.1 =\> network.host: 1XX.16x.xx.xx

#elasticsearch.url: "[http://localhost:9200](http://localhost:9200)" =\> elasticsearch.url:"[http://1XX.16x.xx.xx:9200](http://1XX.16x.xx.xx:9200)"

I changed in the above format. IF the above settings is enough, I will do the changes again and restart . Please share if I miss anything ?

Along with the above error add the line

Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=localhost:9200, :path=\>"/"}

Xpack is not enabled in this system.

Regards  
Nandha

---

<div class="post-metadata">

**Author:** ![Magnus\_Kessler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnus_kessler/32/42001_2.png) [@Magnus\_Kessler](https://discuss.elastic.co/u/Magnus_Kessler)\
**Post date:** [November 20, 2018, 12:23pm UTC](https://discuss.elastic.co/t/elastic-change-ip/156426/4 "2018-11-20T12:23:40Z")

</div>

Hi Nandha,

make sure that the `#` sign is removed from any line that should take effect. I cannot quite tell from your message whether that is the case. The fact that `localhost:9200` still appears in the kibana logs, suggests that you still haven't configured the `elasticsearch.url` correctly.

---

<div class="post-metadata">

**Author:** ![nandha\_88](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nandha\_88](https://discuss.elastic.co/u/nandha_88)\
**Post date:** [November 21, 2018, 4:47pm UTC](https://discuss.elastic.co/t/elastic-change-ip/156426/5 "2018-11-21T16:47:27Z")

</div>

Hi Magnus,

Everything seems to set correctly.  
Please update where the logstash have the healthcheck url.

Regards  
Nandha

---

<div class="post-metadata">

**Author:** ![nandha\_88](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nandha\_88](https://discuss.elastic.co/u/nandha_88)\
**Post date:** [November 26, 2018, 4:49pm UTC](https://discuss.elastic.co/t/elastic-change-ip/156426/6 "2018-11-26T16:49:31Z")

</div>

Hi Magnus

logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[http://localhost:9200/](http://localhost:9200/), :path=\>"/"}  
[2018-11-26T22:13:10,761][WARN][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>"[http://localhost:9200/](http://localhost:9200/)",

Along the above we should change the elasticsearch url in the file /etc/logstash/conf.d/99-output.conf

This resolved the issue.

REgards  
Nandha

---

<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 24, 2018, 4:54pm UTC](https://discuss.elastic.co/t/elastic-change-ip/156426/7 "2018-12-24T16:54:28Z")

</div>

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