Clickhouse tables frequently goes into read-only mode

5,453 views
Skip to first unread message

Csingh Singh

unread,
Aug 25, 2021, 6:01:56 AM8/25/21
to ClickHouse
Hi all
Following is my Clickhouse details
clickhouse-server: 20.12.4 revision 54442 
Number of replicas: 2
Number of shards : 2

I am facing a problem in which Clickhouse frequently turns into read-only mode. It happens for both the instances of Clickhouse

Following workaround does not work:
 1. sudo -u clickhouse touch /var/lib/clickhouse/flags/force_restore_data
 2. Restart the server

system.replicas table shows "is_readonly" flag true.

How I can remove the is_readonly = 1 to 0 , so that insertion in table can work as usual.
Or if there is any way to make the tables writable.

Thanks



tatiana....@lifestreet.com

unread,
Oct 12, 2021, 10:17:59 AM10/12/21
to ClickHouse
Replicated tables go readonly when ClickHouse loses its connection to ZooKeeper.
They recover automatically when the connection is restored.
You need to improve connectivity with ZooKeeper.

francesco pinta

unread,
Nov 2, 2022, 6:22:42 AM11/2/22
to ClickHouse
Hi all,
I have the same problem and there is no connectivity problem to zookeeper (is on the same server).
I have two nodes, and, when one of these crashes and come back up, the replication stop working and I don't find a way to re-establishing replication.
It appens every reboot of the node, and I haven't find a procedure to solve the issues (apart to rebuild the cluster!)

Finally, I think clickhouse is not fault tolerant!

Regards.
Francesco

Derek Chia

unread,
Nov 2, 2022, 8:04:48 AM11/2/22
to ClickHouse
Very likely this is due to connectivity issues with ZooKeeper. Also, 20.12.4 is long deprecated, please update to a recent version. 
Reply all
Reply to author
Forward
0 new messages