kilocode icon indicating copy to clipboard operation
kilocode copied to clipboard

Indexing gives certificate error with qdrant

Open Tetramatrix opened this issue 6 months ago • 6 comments

Description

After installation of v7 and migration (import) of all v5 settings, indexing gives certificate error with qdrant but it worked before with v5 with the identical settings. qdrant is started directly ( no docker file ) and it's even working with mcp-memory installed in v7 but native indexing v7 is broken! There certifcate error only appears after a very long time when the indexing icon in Kilo is yellow and reading "Indexing is initializing" for a very long time. Then after a very, very long time it reads "error certification issues" and the icon turns red.

Plugins

No response

Kilo version

7.2.40

Steps to reproduce

  1. start qdrant.exe
  2. start vscode with kilo extension
  3. enable indexing in kilo ( qdrant default parameters: http://localhost:6333/ )
Image Image Image Image

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

powershell, mingw bash

Tetramatrix avatar May 06 '26 16:05 Tetramatrix

Thanks @Tetramatrix , this is useful. 7.2.40 predates a backend certificate trust fix we added for the spawned Kilo backend.

Can you try the next Kilo version and check whether indexing still fails with the same setup? If it still fails, please paste the exact TLS error from the Kilo / Extension Host output. The code matters, for example SELF_SIGNED_CERT_IN_CHAIN, UNABLE_TO_VERIFY_LEAF_SIGNATURE, UNABLE_TO_GET_ISSUER_CERT_LOCALLY, or ERR_TLS_CERT_ALTNAME_INVALID.

From the screenshots, Qdrant is http://localhost:6333, so the certificate error is more likely coming from the OpenAI-compatible embedding endpoint at https://127.0.0.1:8020/....

marius-kilocode avatar May 07 '26 07:05 marius-kilocode

Maintainer context for the next pass:

This repro is on 7.2.40, which predates the backend certificate trust fix added later for the spawned Kilo backend. In v7, native indexing runs inside the bundled kilo serve backend, not directly in the VS Code extension host like legacy v5 did. That changed which runtime/trust store handles HTTPS requests.

The screenshots point away from Qdrant as the TLS source:

  • Qdrant is configured as http://localhost:6333, so that request is plain HTTP and should not involve certificates.
  • The HTTPS URL in the indexing config is the OpenAI-compatible embedding endpoint, https://127.0.0.1:8020/....
  • Native indexing validates/calls the embedding endpoint before/during indexing, so a certificate failure there can surface as a generic indexing failure and look like Qdrant is broken.
  • mcp-memory working only proves Qdrant is reachable. It does not prove the native indexing embedder can reach the configured HTTPS embedding endpoint.

Relevant implementation points:

  • Current indexing initialization publishes Indexing is initializing while services are being validated.
  • OpenAI-compatible embedder validation sends a test embedding request to the configured base URL.
  • Qdrant initialization happens later in the scan path.
  • Current newer builds include backend TLS trust handling for the spawned CLI backend, including OS CA trust and kilo-code.new.extraCaCerts support.

Next checks if this still reproduces on latest:

  1. Get the exact TLS error code from Kilo / Extension Host output, for example SELF_SIGNED_CERT_IN_CHAIN, UNABLE_TO_VERIFY_LEAF_SIGNATURE, UNABLE_TO_GET_ISSUER_CERT_LOCALLY, or ERR_TLS_CERT_ALTNAME_INVALID.
  2. Confirm what is running on 127.0.0.1:8020 and whether it uses a self-signed or locally issued cert.
  3. Try the same embedding endpoint over http://127.0.0.1:8020/... if that local server supports HTTP. If that fixes it, the issue is the embedding endpoint TLS path, not Qdrant.
  4. If the local embedding server uses a custom CA, try setting kilo-code.new.extraCaCerts to a PEM file containing that CA.

I would avoid globally disabling TLS or silently accepting self-signed certs by default. If we still need a compatibility path after testing latest, it should either be better error attribution for the embedding endpoint certificate failure, or an explicit opt-in setting scoped to local HTTPS embedding endpoints only.

marius-kilocode avatar May 07 '26 08:05 marius-kilocode

Thanks @marius-kilocode : Awesome, you were right. I tried http://127.0.0.1:8020/api/v1/embeddings, and it’s working! So it turned out to be just a migration issue. The migration wizard didn’t import the indexing settings (or the custom backends) from v5, and on top of that I entered the wrong protocol.

Thank you for your time; sometimes the issue is the user, not the code 😄

That said, could I request a feature? It would be really helpful if the migration process also included indexing settings and custom backend configurations.

I also have a quick question: it seems we can’t find the “Kilo Host” debug log in VS Code. Under the “Output” panel, we only see:

  • Kilo Agent Manager
  • Kilo Diff Virtual
  • Kilo Diff Viewer

Is the “Kilo Host” log located somewhere else now?

Image

Tetramatrix avatar May 07 '26 08:05 Tetramatrix

Great, closing!

marius-kilocode avatar May 07 '26 09:05 marius-kilocode

@Tetramatrix I think it's now Extension Host

marius-kilocode avatar May 07 '26 09:05 marius-kilocode

I am not sure if the feature is worth it for now, as most users already migrated.

marius-kilocode avatar May 07 '26 09:05 marius-kilocode