# Local client connection with localhost:8080 failed

**URL:** <https://forum.weaviate.io/t/local-client-connection-with-localhost-8080-failed/875>\
**Category:** Support\
**Tags:** developer-experience\
**Created:** [October 27, 2023, 8:22pm UTC](https://forum.weaviate.io/t/local-client-connection-with-localhost-8080-failed/875 "2023-10-27T20:22:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![htbit1990](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/htbit1990/32/603_2.png) [@htbit1990](https://forum.weaviate.io/u/htbit1990)\
**Post date:** [October 27, 2023, 8:22pm UTC](https://forum.weaviate.io/t/local-client-connection-with-localhost-8080-failed/875/1 "2023-10-27T20:22:39Z")

</div>

Hi All,

## I am new to weaviate and try to do RAG with langchain and using Huggingface embeddings. I have downloaded the yaml file and got it running in a docker container. I am using windows10 and have wsl installed. I can see that localhost:8080/v1 displaying the links. I have a windows conda environment py10.

## import weaviate client = weaviate.Client(‘[http://weaviate:8080](http://weaviate:8080)’) print(‘after client connection’) then i get the following error.. I do NOT see the print statement. What I am doing wrong?

## error

(py10) E:\llmchat\>python weaviate\_langch.py  
Traceback (most recent call last):  
File “E:\Anaconda3\envs\py10\lib\site-packages\urllib3\connection.py”, line 174, in \_new\_conn  
conn = connection.create\_connection(  
File “E:\Anaconda3\envs\py10\lib\site-packages\urllib3\util\connection.py”, line 72, in create\_connection  
for res in socket.getaddrinfo(host, port, family, socket.SOCK\_STREAM):  
File “E:\Anaconda3\envs\py10\lib\socket.py”, line 955, in getaddrinfo  
for res in \_socket.getaddrinfo(host, port, family, type, proto, flags):  
socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “E:\Anaconda3\envs\py10\lib\site-packages\weaviate\connect\connection.py”, line 647, in wait\_for\_weaviate  
requests.get(ready\_url, headers=self.\_get\_request\_header()).raise\_for\_status()  
File “E:\Anaconda3\envs\py10\lib\site-packages\requests\api.py”, line 73, in get  
return request(“get”, url, params=params, \*\*kwargs)  
File “E:\Anaconda3\envs\py10\lib\site-packages\requests\api.py”, line 59, in request  
return session.request(method=method, url=url, \*\*kwargs)  
File “E:\Anaconda3\envs\py10\lib\site-packages\requests\sessions.py”, line 587, in request  
resp = self.send(prep, \*\*send\_kwargs)  
File “E:\Anaconda3\envs\py10\lib\site-packages\requests\sessions.py”, line 701, in send  
r = adapter.send(request, \*\*kwargs)  
File “E:\Anaconda3\envs\py10\lib\site-packages\requests\adapters.py”, line 520, in send  
raise ConnectionError(e, request=request)  
requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘weaviate’, port=8080): Max retries exceeded with (Caused by NewConnectionError(‘\<urllib3.connection.HTTPConnection object at 0x0000017E44D34DF0\>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed’))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):  
File “E:\llmchat\weaviate\_langch.py”, line 25, in   
client = weaviate.Client(‘[http://weaviate:8080](http://weaviate:8080)’)  
File “E:\Anaconda3\envs\py10\lib\site-packages\weaviate\client.py”, line 150, in **init**  
self.\_connection = Connection(  
File “E:\Anaconda3\envs\py10\lib\site-packages\weaviate\connect\connection.py”, line 163, in **init**  
self.wait\_for\_weaviate(startup\_period)  
File “E:\Anaconda3\envs\py10\lib\site-packages\weaviate\connect\connection.py”, line 650, in wait\_for\_weaviate  
raise WeaviateStartUpError(  
weaviate.exceptions.WeaviateStartUpError: Weaviate did not start up in 5 seconds. Either the Weaviate URL wrong or Weaviate did not start up in the interval given in ‘startup\_period’.

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [October 29, 2023, 2:56pm UTC](https://forum.weaviate.io/t/local-client-connection-with-localhost-8080-failed/875/2 "2023-10-29T14:56:13Z")

</div>

Hi @htbit1990 !! Welcome to our community 🤗

If both Weaviate and your App are running from the same docker-compose file, they should reference each other by it’s service name.

In that scenario,

```auto
import weaviate
client = weaviate.Client("http://weaviate:8080")
client.is_ready()

```

should work

However, if you are running Weaviate inside a container, and you app is running locally (which I believe is your scenario), like a script you are executing, you will need to point to

```auto
client = weaviate.Client("http://weaviate:8080")

```

Let me know if that helps!

Thanks!

---

<div class="post-metadata">

**Author:** ![Jacck](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jacck/32/1170_2.png) [@Jacck](https://forum.weaviate.io/u/Jacck)\
**Post date:** [March 21, 2024, 1:29pm UTC](https://forum.weaviate.io/t/local-client-connection-with-localhost-8080-failed/875/3 "2024-03-21T13:29:11Z")

</div>

I’ve just installed Weaviate using pip (so, its up to date) and try to connect locally using your code above. I get the errors:

```auto
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/.well-known/openid-configuration (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x0000015DD90683D0>: Failed to resolve 'weaviate' ([Errno 11001] getaddrinfo failed)")). 

```

Well,. its my first experientce with Weaviate. I also got deprecation warning, so I have installed update of the client to v4. but I just installed Weaviate. I am so confused.

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [March 25, 2024, 12:59pm UTC](https://forum.weaviate.io/t/local-client-connection-with-localhost-8080-failed/875/4 "2024-03-25T12:59:46Z")

</div>

hi @Jacck ! Welcome to our community 🤗

We need more information to be able to help you here.

1 - How are you running Weaviate? Locally? Using our WCS?  
2 - Can you share the code you are using?

Thanks!

---

<div class="post-metadata">

**Author:** ![Jacck](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jacck/32/1170_2.png) [@Jacck](https://forum.weaviate.io/u/Jacck)\
**Post date:** [March 26, 2024, 11:05am UTC](https://forum.weaviate.io/t/local-client-connection-with-localhost-8080-failed/875/5 "2024-03-26T11:05:58Z")

</div>

I would like to try DSPy with Weaviate. Just simple set up. I use latest version of Weaviate on my laptop: 4.5.4. I get DeprecationWarning: Dep016: You are using the Weaviate v3 client, which is deprecated.  
Consider upgrading to the new and improved v4 client instead!  
See here for usage: [Python | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/client-libraries/python) and errors. I do not get it what should I do just to make simple use case. After line: client = weaviate.Client(“[http://weaviate:8080](http://weaviate:8080)”), i got raise ConnectionError(e, request=request)  
requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘weaviate’, port=8080): Max retries exceeded with url: /v1/.well-known/openid-configuration (Caused by NameResolutionError(“\<urllib3.connection.HTTPConnection object at 0x000001C56ED996C0\>: Failed to resolve ‘weaviate’ ([Errno 11001] getaddrinfo failed)”))

---

<div class="post-metadata">

**Author:** ![Jacck](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jacck/32/1170_2.png) [@Jacck](https://forum.weaviate.io/u/Jacck)\
**Post date:** [March 26, 2024, 6:46pm UTC](https://forum.weaviate.io/t/local-client-connection-with-localhost-8080-failed/875/6 "2024-03-26T18:46:38Z")

</div>

finally i figured out the solution

---

<div class="post-metadata">

**Author:** ![sj7272](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/sj7272/32/1227_2.png) [@sj7272](https://forum.weaviate.io/u/sj7272)\
**Post date:** [April 2, 2024, 9:03am UTC](https://forum.weaviate.io/t/local-client-connection-with-localhost-8080-failed/875/7 "2024-04-02T09:03:35Z")

</div>

Good news! What was it Jacck?

---

<div class="post-metadata">

**Author:** ![jimmy\_6](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jimmy_6/32/1608_2.png) [@jimmy\_6](https://forum.weaviate.io/u/jimmy_6)\
**Post date:** [May 28, 2024, 5:26am UTC](https://forum.weaviate.io/t/local-client-connection-with-localhost-8080-failed/875/8 "2024-05-28T05:26:38Z")

</div>

Hi Jacck

I want to know how solve the problem about local client connection refused.  
Can I have some help?

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [May 29, 2024, 7:55pm UTC](https://forum.weaviate.io/t/local-client-connection-with-localhost-8080-failed/875/9 "2024-05-29T19:55:29Z")

</div>

hi @jimmy_6 !

Are you having issues on that? Please, open a new thread and provide more infos. thanks!
