如何使用< secret>在远程_servers标签中标记?

发布于 2025-01-29 04:44:52 字数 1325 浏览 1 评论 0原文

我正在修改config.xml中的远程_servers标签。

大部分设置都是在StackoverFlow的帮助下完成的。 谢谢。

但是,当我在群集配置中使用秘密标签时,会出现错误。

以下是我配置的设置的示例。

<clusters>
    <secret>same_user</secret>
    <shard>
        <replica>
            <host>127.0.0.1</host>
            <default_database>local</default_database>
            <port>9000</port>
        </replica>
    </shard>
    <shard>
        <replica>
            <host>remote1</host>
            <default_database>local</default_database>
            <port>9000</port>
        </replica>
    </shard>
    <shard>
        <replica>
            <host>remote2</host>
            <default_database>local</default_database>
            <port>9000</port>
        </replica>
    </shard>
</clusters>

所有碎片都使用相同的用户和相同的密码。

另外,用作ClickHouse-client连接执行查询的用户是相同的。

但是,当我从ClickHouse-Client中的DistributateTable执行SELECT COUNT(*)时,会发生错误。 错误是 代码:101。DB::异常:从Localhost接收:9000。 DB ::异常:从远程收到1:9000。 db ::异常:哈希不匹配。

这是一个查询,如果我输入&lt; user&gt;,password&gt; password&gt;标签而无需使用秘密标签。有原因吗?我正在使用20.11.7版本。

如果有办法,请提供帮助。

谢谢。

I am modifying the remote_servers tag in config.xml.

Most of the setup was done with the help of stackoverflow.
thank you.

However, when I use the secret tag in the cluster configuration, I get an error.

Below is an example of the settings I have configured.

<clusters>
    <secret>same_user</secret>
    <shard>
        <replica>
            <host>127.0.0.1</host>
            <default_database>local</default_database>
            <port>9000</port>
        </replica>
    </shard>
    <shard>
        <replica>
            <host>remote1</host>
            <default_database>local</default_database>
            <port>9000</port>
        </replica>
    </shard>
    <shard>
        <replica>
            <host>remote2</host>
            <default_database>local</default_database>
            <port>9000</port>
        </replica>
    </shard>
</clusters>

All shard is using the same user and same password.

Also, the user connected as clickhouse-client to execute the query is the same.

But when I execute SELECT COUNT(*) FROM distributedTable in clickhouse-client , an error occurs.
error is
Code: 101. DB::Exception: Received from localhost:9000. DB::Exception: Received from remote1:9000. DB::Exception: Hash mismatch.

This is a query that works fine if i enter the <user>, <password> tag without using the secret tag. Is there a cause? I'm using the 20.11.7 version.

Please help if there is a way.

thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

云淡月浅 2025-02-05 04:44:52

我发现了这个问题。

必须输入每个远程碎片配置文件的秘密标签的相同值。

我只使用分布式表引擎将秘密标签放在服务器上,这是一个错误。

I found the problem.

Must enter the same value for the secret tag of each remote shard config file.

I only put the secret tag on servers using the distributed table engine, and this was a mistake.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文