clickhouse-rs
clickhouse-rs copied to clipboard
"Driver error: `Unknown packet 0x48.`"
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?;
Try to use tcp://localhost:9000?compression=lz4
yes, its working now, but its bypassing chproxy
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