本地环境:
linux120 :) select * from system.clusters where cluster='mycluster';
SELECT *
FROM system.clusters
WHERE cluster = 'mycluster'
Query id: 5a59047b-5013-4fbf-803f-b54d8fe35300
┌─cluster───┬─shard_num─┬─shard_weight─┬─replica_num─┬─host_name─┬─host_address──┬─port─┬─is_local─┬─user────┬─default_database─┬─errors_count─┬─slowdowns_count─┬─estimated_recovery_time─┐
│ mycluster │ 1 │ 1 │ 1 │ linux120 │ 192.168.0.120 │ 9003 │ 1 │ default │ │ 0 │ 0 │ 0 │
│ mycluster │ 1 │ 1 │ 2 │ linux121 │ 192.168.0.121 │ 9003 │ 0 │ default │ │ 0 │ 0 │ 0 │
│ mycluster │ 2 │ 1 │ 1 │ linux122 │ 192.168.0.122 │ 9003 │ 0 │ default │ │ 0 │ 0 │ 0 │
└───────────┴───────────┴──────────────┴─────────────┴───────────┴───────────────┴──────┴──────────┴─────────┴──────────────────┴──────────────┴─────────────────┴─────────────────────────┘
3 rows in set. Elapsed: 0.001 sec.
我在 linux120 下插入数据,linux121 可以同步到,但是在 linux121 上插入数据 linux120 无法同步,查看日志发现如下信息:
2022.10.26 16:08:31.940160 [ 113696 ] {} <Error> default.tb_local2 (dee7f3dc-f240-4502-a023-18b47b0c225d): auto DB::StorageReplicatedMergeTree::processQueueEntry(ReplicatedMergeTreeQueue::SelectedEntryPtr)::(anonymous class)::operator()(DB::StorageReplicatedMergeTree::LogEntryPtr &) const: std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in weakly_canonical: Permission denied ["store/dee/dee7f3dc-f240-4502-a023-18b47b0c225d/tmp-fetch_aaf93cc08163cf52b36a2581ff5221e0_0_0_0/checksums.txt"], Stack trace (when copying this message, always include the lines below):
0. std::__1::system_error::system_error(std::__1::error_code, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x186b7a4d in ?
4. std::__1::__fs::filesystem::__weakly_canonical(std::__1::__fs::filesystem::path const&, std::__1::error_code*) @ 0x1866398e in /usr/bin/clickhouse
对应目录权限都是clickhouse:clickhouse
查看目录发现,checksums.txt 并不存在,请问老师如何解决?
相关 issue:https://github.com/ClickHouse/ClickHouse/issues/39309
已尝试但无效的操作: