database = QdrantClient(host=settings().HOST, port=6333, api_key=settings().QDRANT_API)
uvicorn main:app --reload
2023-02-21T05:19:03Z [info]httpx.ConnectError: [Errno -2] Name or service not known
2023-02-21T05:19:03Z [info]During handling of the above exception, another exception occurred:
2023-02-21T05:19:03Z [info]Traceback (most recent call last):
2023-02-21T05:19:03Z [info] File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 671, in lifespan
2023-02-21T05:19:03Z [info] async with self.lifespan_context(app):
2023-02-21T05:19:03Z [info] File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 566, in __aenter__
2023-02-21T05:19:03Z [info] await self._router.startup()
2023-02-21T05:19:03Z [info] File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 648, in startup
2023-02-21T05:19:03Z [info] await handler()
2023-02-21T05:19:03Z [info] File "/code/./app/main.py", line 120, in startup_event
2023-02-21T05:19:03Z [info] database.recreate_collection(
2023-02-21T05:19:03Z [info] File "/usr/local/lib/python3.9/site-packages/qdrant_client/qdrant_client.py", line 1609, in recreate_collection
2023-02-21T05:19:03Z [info] self.delete_collection(collection_name)
2023-02-21T05:19:03Z [info] File "/usr/local/lib/python3.9/site-packages/qdrant_client/qdrant_client.py", line 1543, in delete_collection
2023-02-21T05:19:03Z [info] result: Optional[bool] = self.http.collections_api.delete_collection(
2023-02-21T05:19:03Z [info] File "/usr/local/lib/python3.9/site-packages/qdrant_client/http/api/collections_api.py", line 788, in delete_collection
2023-02-21T05:19:03Z [info] return self._build_for_delete_collection(
2023-02-21T05:19:03Z [info] File "/usr/local/lib/python3.9/site-packages/qdrant_client/http/api/collections_api.py", line 268, in _build_for_delete_collection
2023-02-21T05:19:03Z [info] return self.api_client.request(
2023-02-21T05:19:03Z [info] File "/usr/local/lib/python3.9/site-packages/qdrant_client/http/api_client.py", line 68, in request
2023-02-21T05:19:03Z [info] return self.send(request, type_)
2023-02-21T05:19:03Z [info] File "/usr/local/lib/python3.9/site-packages/qdrant_client/http/api_client.py", line 85, in send
2023-02-21T05:19:03Z [info] response = self.middleware(request, self.send_inner)
2023-02-21T05:19:03Z [info] File "/usr/local/lib/python3.9/site-packages/qdrant_client/http/api_client.py", line 188, in __call__
2023-02-21T05:19:03Z [info] return call_next(request)
2023-02-21T05:19:03Z [info] File "/usr/local/lib/python3.9/site-packages/qdrant_client/http/api_client.py", line 97, in send_inner
2023-02-21T05:19:03Z [info] raise ResponseHandlingException(e)
2023-02-21T05:19:03Z [info]qdrant_client.http.exceptions.ResponseHandlingException: [Errno -2] Name or service not known
2023-02-21T05:19:03Z [info]ERROR: Application startup failed. Exiting.
2023-02-21T05:19:04Z [info]Starting clean up.
Hello,
I have a local setup as follows:
where
HOSTandQDRANTare defined in adotenvfile where HOST points to a QDRANT cloud instance 'https://.*.aws.cloud.qdrant.io'. This works great when initializing the db locally using fastAPI with:As soon as I try deploying on fly.io I get the following error:
Any help would be greatly appreciated!