qdrant-dotnet icon indicating copy to clipboard operation
qdrant-dotnet copied to clipboard

Grpc.Core.RpcException Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1). (HttpProtocolError)

Open amirvenus opened this issue 1 year ago • 2 comments

Hi,

I am running dotnet8 on macOS and I have not been able to connect to my Qdrant running on a Docker container over network.

I get this exception on any calls including the following:

var collectionExists = await _client.CollectionExistsAsync("my_collection");
        
        
        await _client.CreateCollectionAsync("my_collection",
            new VectorParams { Size = 100, Distance = Distance.Cosine });

This is the exception:


Grpc.Core.RpcException
Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1). (HttpProtocolError) HttpProtocolException: The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1). (HttpProtocolError)", DebugException="System.Net.Http.HttpRequestException: The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1). (HttpProtocolError)")
   at Grpc.Net.Client.Internal.GrpcCall`2.GetResponseHeadersCoreAsync()
   at Qdrant.Client.QdrantClient.CollectionExistsAsync(String collectionName, CancellationToken cancellationToken)

I am certainly sure this only happens in this library as I can access it via a python client.

amirvenus avatar Apr 20 '24 14:04 amirvenus

Hi. Can you share how you're instantiating _client?

Anush008 avatar Apr 22 '24 09:04 Anush008

@amirvenus Also, what version of

  • Qdrant .NET client
  • Qdrant docker image

are you using?

russcam avatar Apr 23 '24 08:04 russcam

Same problem here

  • Docker image: 1.9.2
  • .NET client: 1.9.0 (nuget package)

abunk avatar May 23 '24 10:05 abunk

Could you https://github.com/qdrant/qdrant-dotnet/issues/53#issuecomment-2068935817?

Anush008 avatar May 23 '24 10:05 Anush008

Could you #53 (comment)?

var client = new QdrantClient(new Uri("http://localhost:6333"));

abunk avatar May 23 '24 10:05 abunk

Can you please try

var client = new QdrantClient("localhost");

?

Also, you're using port 6333. The Dotnet client uses Qdrant's gRPC interface at port 6334.

You can run Qdrant with gRPC enabled like so.

docker run -p 6334:6634 qdrant/qdrant

Anush008 avatar May 23 '24 10:05 Anush008

@Anush008 Thank you for your help. The call works now

abunk avatar May 23 '24 11:05 abunk