-
Notifications
You must be signed in to change notification settings - Fork 186
Description
Description
When initializing a QdrantVectorStore from an existing collection, I’m running into an SSL error:
httpx.ConnectError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)
This happens specifically at:
self.qdrant_client_langchain = QdrantVectorStore.from_existing_collection(
embedding=self.embeddings,
collection_name=COLLECTION_NAME,
url=self.connection_url,
metadata_payload_key="metadata",
content_payload_key="text",
api_key=constant.qdrant_api_key,
https=True
)
Additionally, calling get_collection directly from QdrantClient throws the exact same error, so this seems to be an underlying client issue rather than just langchain-qdrant.
Environment
Python: 3.11
qdrant-client: 1.15.1
langchain-qdrant: 0.1.4
httpx: 0.28.1
OS: Windows 11
Additional Details
Qdrant is running and reachable — I can directly call the Qdrant API via Postman successfully (both collection listing and inserts work fine).
The same connection URL (qdrant-stage.zizinow.com) and API key work in Postman.
The error occurs when TLS is started (start_tls in httpcore).
Both QdrantVectorStore.from_existing_collection and QdrantClient.get_collection(collection_name) fail with the same SSL EOF error.
Code Snippet (constructor)
self.connection_url = f"http://{qdrant_connection_args['host']}:{qdrant_connection_args['port']}"
if constant.external and not constant.prod:
self.connection_url = f"https://{qdrant_connection_args['host']}"
self.qdrant_client = QdrantClient(url=self.connection_url, api_key=constant.qdrant_api_key)
# This also fails:
self.qdrant_client.get_collection(collection_name=COLLECTION_NAME)
self.embeddings = OpenAIEmbeddings(
openai_api_key=vector_embedding_api_key,
model=vector_embedding_model,
timeout=constant.embeddings_timeout,
)
self.qdrant_client_langchain = QdrantVectorStore.from_existing_collection(
embedding=self.embeddings,
collection_name=COLLECTION_NAME,
url=self.connection_url,
metadata_payload_key="metadata",
content_payload_key="text",
api_key=constant.qdrant_api_key,
https=True,
)
Expected Behavior
QdrantClient.get_collection() should return collection metadata.
QdrantVectorStore.from_existing_collection() should connect over HTTPS, validate the collection, and initialize without raising an SSL error.
Actual Behavior
Both fail with:
qdrant_client.http.exceptions.ResponseHandlingException: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)