Reputation: 3956
When I try to connect to remote clickhouse db via clickhouse command line:
$ clickhouse-client -h some_ip.com --port 8123 -u some_user --password some_password -d some_db
I get:
ClickHouse client version 18.12.17.
Connecting to database some_db at some_ip.com:8123 as user some_user.
Code: 102. DB::NetException: Unexpected packet from server some_ip:8123, another_ip (expected Hello or Exception, got Unknown packet)
However this:
$ curl http://some_ip.com:8123
Returns:
Ok
How to connect to remote clickhouse db via clickhouse command line?
P.S. connection establishes well with IDE such as datagrip but not with ch command-line
Upvotes: 9
Views: 19167
Reputation: 3956
clickhouse-client works with server over TCP which binds on 9000 port, and datagrip works over HTTP protocol with port 8123.
You should:
$ clickhouse-client -h some_ip.com --port 9000 -u some_user --password some_password -d some_db
Upvotes: 23