Comments (7)
How did you configure your cluster? Can you add the openssl part too?
Did you look at this guide to configure SSL-TLS: https://clickhouse.com/docs/en/guides/sre/configuring-ssl ?
from clickhouse.
@melvynator
I use ZooKeeper for cluster coordination (not TLS enforced at the moment)
zookeeper.xml:
<zookeeper>
<node>
<host>ip1</host>
<port>2181</port>
</node>
<node>
<host>ip2</host>
<port>2181</port>
</node>
<node>
<host>ip3</host>
<port>2181</port>
</node>
</zookeeper>
ssl.xml:
<openSSL>
<server> <!-- Used for https server AND secure tcp port -->
<certificateFile>/etc/clickhouse-server/ssl/clickhouse.crt</certificateFile>
<privateKeyFile>/etc/clickhouse-server/ssl/clickhouse.key</privateKeyFile>
<verificationMode>relaxed</verificationMode>
<caConfig>/etc/clickhouse-server/ssl/ca.crt</caConfig>
<cacheSessions>true</cacheSessions>
<disableProtocols>sslv2,sslv3</disableProtocols>
<preferServerCiphers>true</preferServerCiphers>
</server>
<client> <!-- Used for connecting to https dictionary source -->
<loadDefaultCAFile>true</loadDefaultCAFile>
<caConfig>/etc/clickhouse-server/ssl/ca.crt</caConfig>
<cacheSessions>true</cacheSessions>
<disableProtocols>sslv2,sslv3</disableProtocols>
<preferServerCiphers>true</preferServerCiphers>
<!-- Use for self-signed: <verificationMode>none</verificationMode> -->
<verificationMode>relaxed</verificationMode>
<invalidCertificateHandler>
<!-- Use for self-signed: <name>AcceptCertificateHandler</name> -->
<name>RejectCertificateHandler</name>
</invalidCertificateHandler>
</client>
</openSSL>
and ports defined like that:
<http_port>8123</http_port>
<https_port>8443</https_port>
<tcp_port>9000</tcp_port>
<tcp_port_secure>9440</tcp_port_secure>
<interserver_http_port remove="true">9004</interserver_http_port>
<interserver_https_port>9010</interserver_https_port>
from clickhouse.
@melvynator I've checked your link and it would be great if I can use remote_servers section to define other nodes' endpoints. But when I create replicated database new cluster entity created and it is not controlled via this config file (remote_severs section).
The system.clusters system table contains a cluster named like the replicated database, which consists of all replicas of the database. This cluster is updated automatically when creating/deleting replicas, and it can be used for Distributed tables.
Using this page as a reference: https://clickhouse.com/docs/en/engines/database-engines/replicated
from clickhouse.
@evillique @tavplubix I have never seen this setting 'cluster_secure_connection' and I can't find any documentation about it do you happened to know the issue?
from clickhouse.
Looks like Replicated databases always use TCP port when creating a cluster. We can fix that, but you will have to re-create databases or manually update metadata in ZooKeeper here:
localhost.localdomain :) select * from system.zookeeper where path='/database_path/replicas'
SELECT *
FROM system.zookeeper
WHERE path = '/database_path/replicas'
┌─name─┬─value─────────────────────────────────────────────────────────────┬─path──────────────────────┐
1. │ 1|1 │ localhost%2Elocaldomain:9000:37c5d4d7-06d6-44cc-918b-5497d2a104a5 │ /database_path/replicas │
└──────┴───────────────────────────────────────────────────────────────────┴───────────────────────────┘
Btw, looks like manually updating the port in ZooKeeper is a possible workaround
from clickhouse.
@tavplubix many thanks for looking into it. I was also thinking about updating data in ZooKeeper directly but it looks as wrong way of doing things since there is no guarantee (at least at the documentation) that the metadata wouldn't be overwritten because of new replica joining or anything that triggers changes in replica set. I guess the most safe way is to wait for the proper fix to be sure that everything is under control? Or in that case I still won't be able to change port of already created databases even with this cluster_secure_connection
variable?
from clickhouse.
According to the implementation, updating it manually in ZK will work, but yes, new replicas will be added with TCP port.
The fix (#65054) automatically updates the port number in ZK, so it will not require manual intervention
from clickhouse.
Related Issues (20)
- Enable "uncompressed cache" to boost ClickHouse performance HOT 5
- Lightweight DELETE on cluster table not exits bug
- getSettingOrNull / getSettingOrDefault
- Replicas keep turning inactive & read-only HOT 7
- Why sorting order affects `OSReadChars` significantly HOT 1
- Parquet query failed with `In` decimal column filter
- ATTACH PART can't attach broken parts after failed upgrade
- MODIFY COLUMN ... ALIAS to column with CODEC leads to load failure HOT 1
- Context has expired in BACKUP query, `03032_async_backup_restore` HOT 6
- Inconsistent/incorrect treatment of backslashes in bound query params
- [Umbrella] New JSON type improvements HOT 8
- Error occurred while reading data from an Iceberg table on S3. HOT 2
- bug(s) in log writing failure handling
- CI sometimes fails to run stateful tests: "Another server instance in same directory is already running"
- ClickHouse will set ACL for (Zoo)Keeper nodes on create.
- prefer_column_name_to_alias breaks create table with ALIAS/MATERIALIZED columns
- Failed `02910_prefetch_unexpceted_exception` test
- Inconsistent formatting of lambda. HOT 2
- Supporting for tombstone in kafka engine
- how to use roaringbitmap filter with normal table efficient.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clickhouse.