# Logstash connecting to ES instance on localhost instead of physical IP

**URL:** <https://discuss.elastic.co/t/logstash-connecting-to-es-instance-on-localhost-instead-of-physical-ip/229232>\
**Category:** Logstash\
**Created:** [April 22, 2020, 10:41am UTC](https://discuss.elastic.co/t/logstash-connecting-to-es-instance-on-localhost-instead-of-physical-ip/229232 "2020-04-22T10:41:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cnvramana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cnvramana/32/66853_2.png) [@cnvramana](https://discuss.elastic.co/u/cnvramana)\
**Post date:** [April 22, 2020, 10:41am UTC](https://discuss.elastic.co/t/logstash-connecting-to-es-instance-on-localhost-instead-of-physical-ip/229232/1 "2020-04-22T10:41:30Z")

</div>

I have installed ELK stack 7.6 on a single server. This is on a trial run

I set up ElasticSearch, Logstash, and Kibana to run on physical IP instead of locahost.

I am able to reach all three components with the IP address on respective ports from browser and curl

ES --\>Curl "[http://x.x.x.x/:9200](http://x.x.x.x/:9200)"  
Logstash --\> curl "[http://x.x.x.x:9600](http://x.x.x.x:9600)"  
Kibana --\> curl "[http://x.x.x.x:5601](http://x.x.x.x:5601)"

However, Logstash by default is trying to reach elasticsearch instance on localhost:9200 instead of IP address ("[http://x.x.x.x/:9200](http://x.x.x.x/:9200)").

Where should i change in logstash so that it looks to check on the physical IP("[http://x.x.x.x/:9200](http://x.x.x.x/:9200)") for ES instance instead of localhost:9200

---

<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:** [April 22, 2020, 11:01am UTC](https://discuss.elastic.co/t/logstash-connecting-to-es-instance-on-localhost-instead-of-physical-ip/229232/2 "2020-04-22T11:01:03Z")

</div>

What does your Logstash config look like?

---

<div class="post-metadata">

**Author:** ![cnvramana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cnvramana/32/66853_2.png) [@cnvramana](https://discuss.elastic.co/u/cnvramana)\
**Post date:** [April 22, 2020, 12:44pm UTC](https://discuss.elastic.co/t/logstash-connecting-to-es-instance-on-localhost-instead-of-physical-ip/229232/3 "2020-04-22T12:44:19Z")

</div>

Strange. Connecting to IP address after server reboot with following message in logstash logs.

[INFO][logstash.outputs.elasticsearch][main] Elasticsearch pool URLs updated {:changes=\>{:removed=\>, :added=\>[[http://x.x.x.x:9200/](http://x.x.x.x:9200/)]}}  
[2020-04-22T07:22:57,697][WARN][logstash.outputs.elasticsearch][main] Restored connection to ES instance {:url=\>"[http://x.x.x.x:9200/](http://x.x.x.x:9200/)"}

Any reason as to why it could not recognize the change before reboot

---

<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 20, 2020, 12:44pm UTC](https://discuss.elastic.co/t/logstash-connecting-to-es-instance-on-localhost-instead-of-physical-ip/229232/4 "2020-05-20T12:44:32Z")

</div>

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