# Error: getaddrinfo failed

**URL:** <https://discuss.elastic.co/t/error-getaddrinfo-failed/194618>\
**Category:** Elasticsearch\
**Created:** [August 9, 2019, 1:08pm UTC](https://discuss.elastic.co/t/error-getaddrinfo-failed/194618 "2019-08-09T13:08:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ioana](https://avatars.discourse-cdn.com/v4/letter/i/f4b2a3/32.png) [@Ioana](https://discuss.elastic.co/u/Ioana)\
**Post date:** [August 9, 2019, 1:08pm UTC](https://discuss.elastic.co/t/error-getaddrinfo-failed/194618/1 "2019-08-09T13:08:39Z")

</div>

Hello!  
I am new on working with ELK and when I run my code I get the following error :

2019-08-09 15:43:04,526 CRITICAL: N/A\<urllib3.connection.HTTPConnection object at 0x000002916B9EC780\>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed\<urllib3.connection.HTTPConnection object at 0x000002916B9EC780\>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed

I have set up an environment with elasticsearch 7.3 and kibana 7.3 on my computer, locally , using as a connection: "hosts": "localhost:9200".  
Elasticsearch is up and running in the shell before starting to run the code.  
If I try to use as a connection one of the three nodes in my cluster, it works. But I need to make it work also locally.

Any ideas why I am getting this error? Thank you a lot!

---

<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 6, 2019, 1:08pm UTC](https://discuss.elastic.co/t/error-getaddrinfo-failed/194618/2 "2019-09-06T13:08:41Z")

</div>

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