Score:0

Clickhouse server can't connect to Zookeeper

us flag

I am running Clickhouse server on a Azure VM and trying to create a table using ReplicatedMergeTree engine (following this guide: https://medium.com/@merticariug/distributed-clickhouse-configuration-d412c211687c). I have zookeeper running on another Azure VM in the same subnet.

CREATE TABLE shard.test
(
   id Int64,
   event_time DateTime
)
Engine=ReplicatedMergeTree('/clickhouse/tables/shard1/test', 'replica_1')
PARTITION BY toYYYYMMDD(event_time)
ORDER BY id;

When I run the above command to create a replicated table, I get this error on my clickhouse-client:

Code: 225. DB::Exception: Received from localhost:9000. DB::Exception: Can't create replicated table without ZooKeeper. (NO_ZOOKEEPER)

I have uncommented the zoopkeeper portion of /etc/clickhouse-server/config.xml and also added a separate xml file for zookeeper in /etc/clickhouse-server/config.d/

Here is the content of /etc/clickhouse-server/config.d/zookeeper.xml:

<clickhouse>
    <zookeeper>
        <node>
            <host>public_IP</host>
            <port>2181</port>
        </node>
    </zookeeper>
</clickhouse>

Am I missing some config changes?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.