Hi, I have the problem with connecting weaviate container
I tried to solve it with many topics in here, but it is not solved
the error is this:
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py”, line 69, in map_httpcore_exceptions
yield
File “/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py”, line 233, in handle_request
resp = self._pool.handle_request(req)
File “/usr/local/lib/python3.9/site-packages/httpcore/_sync/connection_pool.py”, line 216, in handle_request
raise exc from None
File “/usr/local/lib/python3.9/site-packages/httpcore/_sync/connection_pool.py”, line 196, in handle_request
response = connection.handle_request(
File “/usr/local/lib/python3.9/site-packages/httpcore/_sync/connection.py”, line 99, in handle_request
raise exc
File “/usr/local/lib/python3.9/site-packages/httpcore/_sync/connection.py”, line 76, in handle_request
stream = self._connect(request)
File “/usr/local/lib/python3.9/site-packages/httpcore/_sync/connection.py”, line 122, in _connect
stream = self._network_backend.connect_tcp(**kwargs)
File “/usr/local/lib/python3.9/site-packages/httpcore/_backends/sync.py”, line 213, in connect_tcp
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
File “/usr/lib64/python3.9/contextlib.py”, line 137, in exit
self.gen.throw(typ, value, traceback)
File “/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py”, line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/weaviate/connect/v4.py”, line 258, in _create_clients
response = client.get(oidc_url)
File “/usr/local/lib/python3.9/site-packages/httpx/_client.py”, line 1054, in get
return self.request(
File “/usr/local/lib/python3.9/site-packages/httpx/_client.py”, line 827, in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
File “/usr/local/lib/python3.9/site-packages/httpx/_client.py”, line 914, in send
response = self._send_handling_auth(
File “/usr/local/lib/python3.9/site-packages/httpx/_client.py”, line 942, in _send_handling_auth
response = self._send_handling_redirects(
File “/usr/local/lib/python3.9/site-packages/httpx/_client.py”, line 979, in _send_handling_redirects
response = self._send_single_request(request)
File “/usr/local/lib/python3.9/site-packages/httpx/_client.py”, line 1015, in _send_single_request
response = transport.handle_request(request)
File “/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py”, line 233, in handle_request
resp = self._pool.handle_request(req)
File “/usr/lib64/python3.9/contextlib.py”, line 137, in exit
self.gen.throw(typ, value, traceback)
File “/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py”, line 86, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: [Errno 111] Connection refusedDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python3.9/site-packages/weaviate/connect/helpers.py”, line 213, in connect_to_local
return __connect(client)
File “/usr/local/lib/python3.9/site-packages/weaviate/connect/helpers.py”, line 401, in __connect
raise e
File “/usr/local/lib/python3.9/site-packages/weaviate/connect/helpers.py”, line 397, in __connect
client.connect()
File “/usr/local/lib/python3.9/site-packages/weaviate/client.py”, line 287, in connect
self._connection.connect(self.__skip_init_checks)
File “/usr/local/lib/python3.9/site-packages/weaviate/connect/v4.py”, line 711, in connect
super().connect(skip_init_checks)
File “/usr/local/lib/python3.9/site-packages/weaviate/connect/v4.py”, line 138, in connect
self._create_clients(self._auth, skip_init_checks)
File “/usr/local/lib/python3.9/site-packages/weaviate/connect/v4.py”, line 260, in _create_clients
raise WeaviateConnectionError(
weaviate.exceptions.WeaviateConnectionError: Connection to Weaviate failed. Error: [Errno 111] Connection refused.
Is Weaviate running and reachable at http://localhost:8080?
And then, I checked the container logs:
{“action”:“startup”,“error”:“init bolt_db: open "/var/lib/weaviate/schema.db": open /var/lib/weaviate/schema.db: permission denied”,“level”:“fatal”,“msg”:“could not initialize schema repo”,“time”:“2024-06-10T00:48:06Z”}
so, I tried to remove /var/lib/weaviate folder but it can’t
How can I solve this connecting error?
Please, help
my code is simple:
import weaviate
client = weaviate.connect_to_local()
print(“Connecting success”)
client.close()
- weaviate docker image: cr.weaviate.io/semitechnologies/weaviate:1.25.2
- weaviate-client version: 4.6.4
- python version: 3.9.18
- podman version: 4.9.4
- podman-compose version: 1.0.6