# Socketappender hostName only accepts IP addresses in logging.yml

**URL:** https://discuss.elastic.co/t/socketappender-hostname-only-accepts-ip-addresses-in-logging-yml/2023
**Category:** Elasticsearch
**Created:** [June 5, 2015, 3:14pm UTC](https://discuss.elastic.co/t/socketappender-hostname-only-accepts-ip-addresses-in-logging-yml/2023 "2015-06-05T15:14:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gdeconto](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@gdeconto](https://discuss.elastic.co/u/gdeconto)
#### Post date: [June 5, 2015, 3:14pm UTC](https://discuss.elastic.co/t/socketappender-hostname-only-accepts-ip-addresses-in-logging-yml/2023/1 "2015-06-05T15:14:55Z")

</div>

hi all

I have a socketappender setup in the elasticsearch logging.yml so that my ES instance sends slow search and slow index logs to my logstash instance via socketappender on port 9500.

I noticed that when I use an IP address for the socketappender hostName that it works ok, but when I try to use a server name or DNS name (i.e. "[myserver.mydomain.com](http://myserver.mydomain.com)") , it doesnt work; ie socketappender only accepts IP addresses (tho I have seen examples where it accepts "localhost")

the setup is on CentOS 7, and I am using ES 1.5.0 and logstash 1.5.2

is this a bug or by design? is there a workaround for this?

thanks in advance

---

<div class="post-metadata">

### Author: ![gdeconto](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@gdeconto](https://discuss.elastic.co/u/gdeconto)
#### Post date: [June 5, 2015, 4:01pm UTC](https://discuss.elastic.co/t/socketappender-hostname-only-accepts-ip-addresses-in-logging-yml/2023/2 "2015-06-05T16:01:59Z")

</div>

note: reason I want to use DNS entries is that we are looking at hosting on AWS, and wanted to be able to set the hostName value to

1. a proper AWS DNS entry like "[logstash.mydomain.com](http://logstash.mydomain.com)" or
2. a load balancer name like "[internal-logstash-loadbalancer-xxxxxxxxxx.avzone.elb.amazonaws.com](http://internal-logstash-loadbalancer-xxxxxxxxxx.avzone.elb.amazonaws.com)"

so that we dont have to concern ourselves with changing IP addresses if/when the instance gets restarted or replaced

---

<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: [July 6, 2017, 12:09am UTC](https://discuss.elastic.co/t/socketappender-hostname-only-accepts-ip-addresses-in-logging-yml/2023/3 "2017-07-06T00:09:24Z")

</div>


