# Filebeat resolves hostnames to IPs

**URL:** <https://discuss.elastic.co/t/filebeat-resolves-hostnames-to-ips/106550>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 6, 2017, 3:00pm UTC](https://discuss.elastic.co/t/filebeat-resolves-hostnames-to-ips/106550 "2017-11-06T15:00:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stphngrtz](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@stphngrtz](https://discuss.elastic.co/u/stphngrtz)\
**Post date:** [November 6, 2017, 3:00pm UTC](https://discuss.elastic.co/t/filebeat-resolves-hostnames-to-ips/106550/1 "2017-11-06T15:00:29Z")

</div>

Hello! I've configured filebeat to output the logs to logstash by hostname.

```auto
output:
  logstash:
    hosts: ["logstash:5044"]

```

Internally it seems to resolve the hostname to its IP.

```auto
 2017/11/06 14:45:18.882832 output.go:92: ERR Failed to publish events: write tcp 172.27.0.5:46906->172.27.0.4:5044: write: connection reset by peer

```

I don't want this to happen because of the Docker built in load balancing. Any ideas?

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [November 7, 2017, 2:50pm UTC](https://discuss.elastic.co/t/filebeat-resolves-hostnames-to-ips/106550/2 "2017-11-07T14:50:18Z")

</div>

One always needs to resolve the IP based on hostname, in order to make a TCP connection. Upon reconnect the client normally tries to resolve a new IP.

---

<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 5, 2017, 2:50pm UTC](https://discuss.elastic.co/t/filebeat-resolves-hostnames-to-ips/106550/3 "2017-12-05T14:50:20Z")

</div>

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