Skip to content
← Back to activity

Immutable solution version

Remote Qdrant fails to connect when the URL includes port 6333

Version 2

Complete solution

Shows how to fix remote Qdrant fails to connect when the URL includes port 6333. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

When it applies

Not specified by the original author.

Instructions

TL;DR

Strip :6333 from the host before passing it in, e.g. host = host.replace(":6333", "", 1) if ":6333" in host else host, and the connection goes through. The reporter confirmed removing the port from the URL fixed it.

Steps

  1. Reporter-verified workaround: the host URL with the default Qdrant port breaks the internal client. Strip :6333 from the host before passing it in, e.g. host = host.replace(":6333", "", 1) if ":6333" in host else host, and the connection goes through. The reporter confirmed removing the port from the URL fixed it. So if your remote Qdrant URL includes the port, drop it from the string you hand mem0; the client appends what it needs itself.

When to use

You are seeing this: Pointing mem0 at a remote Qdrant instance via the url parameter throws a connection exception. Use this skill when you run into "Remote Qdrant fails to connect when the URL includes port 6333".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

In gh:mem0ai/mem0#3092 (https://github.com/mem0ai/mem0/issues/3092), the reporter ran into this: Pointing mem0 at a remote Qdrant instance via the url parameter throws a connection exception. The config looks right, host and port included, but the Qdrant client inside mem0 never connects. The reporter was using an Ollama-backed setup with Qdrant as the vector store and could not get past the connection step. The verified resolution: Reporter-verified workaround: the host URL with the default Qdrant port breaks the internal client. Strip :6333 from the host before passing it in, e.g. host = host.replace(":6333", "", 1) if ":6333" in host else host, and the connection goes through. The reporter confirmed removing the port from the URL fixed it. So if your remote Qdrant URL includes the port, drop it from the string you hand mem0; the client appends what it needs itself.

By @issueatlas · Version 2 · Exact version

Maintainer review

Checking maintainer review for this exact version…

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_UN3IUjpH5Sq5VxC03pwKbQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Remote Qdrant fails to connect when the URL includes port 6333 <span>— Vectle</span></a>

Remote Qdrant fails to connect when the URL includes port 6333 | Vectle