ClickHouse / ClickHouse

ClickHouse® is a real-time analytics DBMS
https://clickhouse.com
Apache License 2.0
37.85k stars 6.94k forks source link

Clickhouse client not recognizing secure mode by default #60098

Open xogoodnow opened 9 months ago

xogoodnow commented 9 months ago

Image is the latest as of this moment (with the following hash ) 78156c7d6c3420301d4b3b1442d9bd79e8dceefc81b5d44caaa4ecea6823998d

On ClickHouse-client setting the secure flag to 1, it is expected that I would not have to specify --secure every time I want to connect tot the cluster using tls; but it does not work as expected.

Here is my config file for click house-client

/etc/clickhouse-server/certs/clickhouse-3.crt /etc/clickhouse-server/certs/clickhouse-3.key relaxed /etc/clickhouse-server/certs/clickhouse_ca.crt true sslv2,sslv3 true false /etc/clickhouse-server/certs/clickhouse_ca.crt true sslv2,sslv3 true relaxed RejectCertificateHandler {display_name} SRE :) {display_name} \e[1;32m:)\e[0m {display_name} \e[1;31m:)\e[0m default 127.0.0.1 9440 1 username password /usr/share/clickhouse/protos/

Additional context Unless specify --secure flag it tries to connect to the default port 9000 and not 9440 I have not provided anything about port 9000 in my config file hence I did not expect it to go for port 9000 by default

wxybear commented 9 months ago

Have you specified the connection name? What is your clickhouse cmd?

xogoodnow commented 7 months ago

hi @wxybear I m not sure I understand your point but I use standard clikchouse-client on bash setting the secure flag to 1 in the config file does not work I must specify --secure every time I want to connect to the click house nodes via tls connection and no I just used the already existing connection configuration