Connection error on localhost
Closed this issue · 2 comments
While trying to describe the #6 issue and re-familiarize myself with the example, I came across another issue while trying to set up on local machine.
When doing a docker compose up -d, the backend can not find the weaviate instance (all containers are local). This error surfaces,
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level)File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Backend/api.py", line 46, in
client = weaviate.Client(
File "/usr/local/lib/python3.8/site-packages/weaviate/client.py", line 150, in init
self._connection = Connection(
File "/usr/local/lib/python3.8/site-packages/weaviate/connect/connection.py", line 650, in init
super().init(
File "/usr/local/lib/python3.8/site-packages/weaviate/connect/connection.py", line 163, in init
self.wait_for_weaviate(startup_period)
File "/usr/local/lib/python3.8/site-packages/weaviate/connect/connection.py", line 631, in wait_for_weaviate
raise WeaviateStartUpError(
I verified all the containers were running and in the api.py file, tried in "weaviate.Client" to set the startup_period to wait 10 seconds, 20 seconds, 60 seconds but no help. I am not using API auth, trying anonymous first. Also verified the openai and server url in .env. I also pinned against weaviate-client==3.22.1 and tried to launch the containers manually, one-by-one.
I noticed the dockerfile builds on python3.8 but the lib packages use 3.10. Am I missing something fundamental? Tried to build using 3.10 but the error remains.
TIA for assistance.
V.
I went in to client.py and changed the default 5 seconds in "startup_period" to 60, and the error remains.
Addendum: made sure to re-build images against python3.10.12 and now get "Service is unavailable - sleeping"
Needed to get internal references and docker image names all correct since I am using Caddy.