Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Driver error: Unknown packet 0x48." #205

Open
alexanderspevak opened this issue Nov 1, 2023 · 3 comments
Open

"Driver error: Unknown packet 0x48." #205

alexanderspevak opened this issue Nov 1, 2023 · 3 comments

Comments

@alexanderspevak
Copy link

I am having trouble connecting to clickhouse running locally in docker image. I am using version "1.0.0-alpha.1". I get following error:

Error: Io(Custom { kind: Other, error: "Driver error: `Unknown packet 0x48.`" })

when calling this part of code:

    let pool = Pool::new("tcp://localhost:8124?compression=lz4");
    let mut client = pool.get_handle().await?;
@suharev7
Copy link
Owner

suharev7 commented Nov 2, 2023

Try to use tcp://localhost:9000?compression=lz4

@alexanderspevak
Copy link
Author

yes, its working now, but its bypassing chproxy
Screenshot 2023-11-02 at 7 48 01

@suharev7
Copy link
Owner

suharev7 commented Nov 2, 2023

clickhouse-rs works with binary protocol (by default port: 9000) and chproxy works with HTTP protocol (by default port: 8123), so:

  • If you would like to work through binary protocol with multiple clickhouse instances, you may specify multiple hosts in url: tcp://host1:9000?alt_hosts=host2:9000,host3:9000
  • If you would like to work through the HTTP protocol with chproxy you need to use http clickhouse client library, for example https://crates.io/crates/clickhouse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants