qdrant / rust-client

Rust client for Qdrant vector search engine
https://crates.io/crates/qdrant-client
Apache License 2.0
222 stars 45 forks source link

[bug] h2 protocol error: http2 error when running example #188

Closed morristai closed 1 week ago

morristai commented 1 week ago

When running examples/deprecated_search.rs and examples/search.rs on localhost. It gives error:

ResponseError { status: Status { code: Unknown, message: "h2 protocol error: http2 error", source: Some(tonic::transport::Error(Transport, hyper::Error(Http2, Error { kind: GoAway(b"", FRAME_SIZE_ERROR, Library) }))) } }

On server side, it shows:

2024-09-25T20:40:00.830337Z ERROR actix_http::h1::dispatcher: stream error: request parse error: invalid HTTP version specified

Test Env:

timvisee commented 1 week ago

I cannot reproduce this problem.

Could you check whether it works when running the following two next to each other:

git clone git@github.com:qdrant/rust-client.git
cd rust-client
cargo run --example search
docker run --rm -it -p 6333:6333 -p 6334:6334 qdrant/qdrant:latest

What I'm seeing:

image

morristai commented 1 week ago

Oh, my apologies, the port is misconfigured. At first, I followed the Python client that uses port 6333 in the Qdrant main repository:

image

It worked, but for the Rust client, it uses port 6334 for the gRPC port by default.

timvisee commented 1 week ago

No problem, happy to see you were able to fix it!

You're correct. The Python client uses the HTTP/REST API by default, while the Rust client uses gRPC which is on a different port.