Skip to content

Unable to connect to clickhouse through HAProxy #80

@wezell

Description

@wezell

I have a clickhouse instance running behind haproxy, which is doing SSL termination. I can connect to clickhouse and run queries using curl, it just won't work with clickhouse4j. To test, I used dBeaver and I can also connect to HTTPS using dBeaver and the official clickhouse driver and this works. But if I try to connect using clickhouse4j - same connection settings, just different driver, I get a Your browser sent an invalid request. message. This is the same result I am seeing in my java code. Note that my SSL cert is valid and there are no server name / ssl type issues.

curl http works

> curl 'http://xxx.xxxx.com:8123/?user=default&password=xxxxxxxxxxx&' --data-binary "SELECT timezone()"
Etc/UCT

curl https works

> curl 'https://xxx.xxxx.com:8443//?user=default&password=xxxxxxxxxxx&' --data-binary "SELECT timezone()"
Etc/UCT

dBeaver + official driver https works

I can connect to HTTPS using dBeaver and the official clickhouse driver:
Screen Shot 2019-12-11 at 4 31 59 PM

dBeaver + clickhouse4j driver does not work

Screen Shot 2019-12-11 at 4 35 36 PM

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions