如何使用< secret>在远程_servers标签中标记?
我正在修改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 isCode: 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现了这个问题。
必须输入每个远程碎片配置文件的秘密标签的相同值。
我只使用分布式表引擎将秘密标签放在服务器上,这是一个错误。
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.