# Failed to establish a new connection: \[Errno 11004\] getaddrinfo failed

**URL:** <https://discuss.elastic.co/t/failed-to-establish-a-new-connection-errno-11004-getaddrinfo-failed/195413>\
**Category:** Elasticsearch\
**Created:** [August 16, 2019, 2:00am UTC](https://discuss.elastic.co/t/failed-to-establish-a-new-connection-errno-11004-getaddrinfo-failed/195413 "2019-08-16T02:00:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wenchaodu](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wenchaodu](https://discuss.elastic.co/u/wenchaodu)\
**Post date:** [August 16, 2019, 2:00am UTC](https://discuss.elastic.co/t/failed-to-establish-a-new-connection-errno-11004-getaddrinfo-failed/195413/1 "2019-08-16T02:00:16Z")

</div>

When I enable xpack security, I need to use basic authorization to access elasticsearch api to fetch data or update data.

I use python API, when I use server id address, I could fetch data successful, but when i use aws elk link, it's reutrn below error

`ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x0000000008897630>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x0000000008897630>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed)`

aws elb link:  
http:// awselb\*\*\*\*\*\*\*\*\*:9200

aws elb setting: port 9200 transform to 9200

ipaddress  
http://\*\*\*.\*\*\*.\*\*\*.\*\*\*:9200

if disable security setting, the aws elb is working.

Please advise whether anything configuration missing/incorrect ?

thanks  
Wayne

---

<div class="post-metadata">

**Author:** ![wenchaodu](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wenchaodu](https://discuss.elastic.co/u/wenchaodu)\
**Post date:** [August 16, 2019, 2:01am UTC](https://discuss.elastic.co/t/failed-to-establish-a-new-connection-errno-11004-getaddrinfo-failed/195413/2 "2019-08-16T02:01:44Z")

</div>

```
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true

```

above is the security related configuration

---

<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:** [September 13, 2019, 2:01am UTC](https://discuss.elastic.co/t/failed-to-establish-a-new-connection-errno-11004-getaddrinfo-failed/195413/3 "2019-09-13T02:01:46Z")

</div>

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