Issues with Qdrant Vector Database Setup in Docker Environment

I’m having trouble setting up Qdrant vector database with LangChain in a Docker container on Windows. I found some example code that looks like this:

server_endpoint = "<---your qdrant endpoint--->"
document_list = []  # add your documents here

vector_store = QdrantVectorStore.from_documents(
    document_list,
    embedding_model,
    url=server_endpoint,
    prefer_grpc=True,
    collection_name="document_collection",
)

I have two main problems:

First issue - when I use prefer_grpc=True, I get this connection error:

_InactiveRpcError: Connection refused to 127.0.0.1:6334
StatusCode.UNAVAILABLE - failed to connect to all addresses

But when I change it to prefer_grpc=False, everything works fine. Why does the gRPC option fail while HTTP works? My Qdrant instance runs inside Docker.

Second issue - the example shows document_list = [] with a comment saying “add your documents here”. This confuses me because it’s in the initialization section. Should I leave the list empty during setup, or do I need to provide actual documents right away?

Any help would be great since I’m stuck on this configuration.

The gRPC connection fails because Qdrant either has gRPC disabled or you’re running it behind a proxy. Docker setups often only expose the HTTP REST API by default. Check your Qdrant logs - you’ll see startup messages if gRPC is disabled. For the document setup, starting with an empty list is actually better. Create the vector store first, then add your documents using add_documents() or add_texts(). This way you get better control over batching and error handling, especially with large collections that need preprocessing or validation.

Docker vector databases are such a pain. Your gRPC issue is happening because Qdrant’s Docker images don’t turn on gRPC listeners by default. You can expose port 6334 all you want, but the service won’t accept connections.

Empty initialization is way better for documents. No memory spikes at startup, and cleaner error handling when you add stuff later.

Honestly though, I gave up on Docker configs for this. Every single project became hours of fighting port mappings, debugging connections, and messing with environment variables.

Latenode fixed all that for me. It handles vector database connections automatically and manages everything without the Docker mess. You plug in your data and it builds the whole pipeline.

I use it for everything now. No more gRPC headaches or container nonsense. Just stuff that works and scales.

Check it out: https://latenode.com

hey! sounds like your docker might not be exposing gRPC port right. double check your docker-compose - you gotta map port 6334, not just 6333. for the docs, you can either add them rightaway or use add_documents() later. both ways are good!

Docker networking strikes again. Your container’s probably exposing port 6333 for HTTP but not 6334 for gRPC. Most Docker images only enable HTTP by default.

For the document list - both approaches work, but empty initialization is cleaner. Build your vector store structure first, populate later.

Honestly, managing Docker configs and connection issues gets old fast. I’ve been there and always ended up spending more time on infrastructure than actual work.

Switching to Latenode changed everything for me. It handles connection management and Docker headaches automatically. Just point it at your data sources and it builds vector pipelines without manual setup.

I use it for document processing now - no more port mappings or gRPC config headaches. Way less debugging, way more progress.

Check it out: https://latenode.com

Had the same headache migrating to Docker last year. The gRPC issue happens because Qdrant’s Docker images only enable HTTP on 6333 by default - no gRPC listener. You can expose 6334 all you want in docker-compose, but the service won’t accept gRPC connections unless you configure it through environment variables or config files. For document initialization, I’d skip the populated lists and start with empty collections. Way better for production. You won’t hit memory issues on startup, and you can handle errors properly when adding documents one by one. The from_documents() method looks nice in demos but breaks with larger datasets or when you need preprocessing between creating collections and loading docs.

Docker’s a pain with gRPC ports - you need to bind both 6333:6333 AND 6334:6334 in your compose file. The gRPC service might not be running even if the port’s exposed. Empty document_list is the way to go - makes debugging way easier when ingestion breaks.

the gRPC issue happens cuz Qdrant’s default docker image doesnt have gRPC enabled - u’ll need to configure it manually or use a different image. just use HTTP for now, it works great. for docs, start with an empty collection and add them later with .add_documents(). way more flexible that way.