Code: 221, e.displayText() = DB::Exception: No interserver IO endpoint named DataPartsExchange

clickhouse是4台机器,2分片2副本的配置。创建完本地表和分布式表后,往分布式表中插入数据时,发现副本没有同步数据。查看报错日志:

Code: 221, e.displayText() = DB::Exception: No interserver IO endpoint named DataPartsExchange

2022.01.21 14:58:09.189339 [ 7134 ] {} <Error> default.test_tab (6cde91f6-fc30-4a5d-acde-91f6fc30da5d): auto DB::StorageReplicatedMergeTree::processQueueEntry
(ReplicatedMergeTreeQueue::SelectedEntryPtr)::(anonymous class)::operator()(DB::StorageReplicatedMergeTree::LogEntryPtr &) const: Code: 86, e.displayText() = 
DB::Exception: Received error from remote server /?endpoint=DataPartsExchange%3A%2Fclickhouse%2Ftables%2F02%2Ftest_0121%2Freplicas%2Frep_2_2&part=20220118_0_0_0
&client_protocol_version=7&compress=false. HTTP status code: 500 Internal Server Error, body: Code: 221, e.displayText() = DB::Exception: No interserver IO endp
oint named DataPartsExchange:/clickhouse/tables/02/test_0121/replicas/rep_2_2, Stack trace (when copying this message, always include the lines below):

在这里插入图片描述
配置中internal_replication也设为true,这个配置之前在其他服务器上部署过,是没问题的,副本也是可以同步数据的。
在这里插入图片描述

查了下发现是因为interserver_http_host参数或server主机名的设置不正确。这四台机器中既没有配interserver_http_host参数,也没有配主机名。
interserver_http_host参数表示其他服务器可以用来访问该服务器的主机名。如果省略,则其定义方法与hostname -f命令相同,但是不能是localhost。

解决方法:

方法1:在config.xml中,配置interserver_http_host参数,我是直接配置了本机的IP
在这里插入图片描述
方法2:在/etc/hostname中配置主机名,之前的服务器中配置过主机名,但是没有配interserver_http_host参数,所以可以正常使用

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值