Skip to content

checkVersionsCompatibility doesn't support credentials #96

@jmeyer-accso

Description

@jmeyer-accso

When constructing my Qdrant client to connect to Qdrant Cloud, it always spits out the warning:

Failed to obtain server version. Unable to check client-server compatibility. Set checkCompatibility=false to skip version check.

Looking at the source, checkVersionsCompatibility is called immediately in the Builder constructor:

    Builder(String host, int port, boolean useTransportLayerSecurity, boolean checkCompatibility) {
      String clientVersion = Builder.class.getPackage().getImplementationVersion();
      String javaVersion = System.getProperty("java.version");
      String userAgent = "java-client/" + clientVersion + " java/" + javaVersion;
      this.channel = createChannel(host, port, useTransportLayerSecurity, userAgent);
      this.shutdownChannelOnClose = true;
      if (checkCompatibility) {
        checkVersionsCompatibility(clientVersion);
      }
    }

I reproduced this to see the exception and it turns out the Qdrant cloud returns 403:

io.grpc.StatusRuntimeException: PERMISSION_DENIED: HTTP status code 403
invalid content-type: application/json; charset=utf-8
headers: Metadata(:status=403,content-type=application/json; charset=utf-8,date=Wed, 10 Dec 2025 10:53:47 GMT,content-length=21)
DATA-----------------------------
{"error":"forbidden"}

	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:268)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:249)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:167)
	at io.qdrant.client.grpc.QdrantGrpc$QdrantBlockingStub.healthCheck(QdrantGrpc.java:160)
	at de.zdf.pa.partner.shared.model.QdrantModelIntegrationTest$Companion.getServerVersion(QdrantModelIntegrationTest.kt:54)
	at de.zdf.pa.partner.shared.model.QdrantModelIntegrationTest$Companion.access$getServerVersion(QdrantModelIntegrationTest.kt:27)
	at de.zdf.pa.partner.shared.model.QdrantModelIntegrationTest.health check(QdrantModelIntegrationTest.kt:90)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)

The builder doesn't have any call credentials at this point (and the version check doesn't use it).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions