开发者社区> 问答> 正文

阿里云的centos主机主从节点etcd通信问题Socket error

大家好, 问题出现在用阿里云ECS搭建kubernetes集群环境时候, 我这里用三台阿里云centos服务器分别做1个master和2个node节点; node节点的kube-calico服务连接master节点的etcd时候报错: kube-calico bird: Mesh_172_26_178_195: Socket error: bind: Address not available [closed];下面是主节点etcd配置,通过错误大概知道是从节点跟主节点的连接问题;有一点应该注意的是,下面etcd中--listen-client-urls的IP(172.26.178.195)是master节点的内网IP,因为如果写公网IP会报错,但是这样的话,从节点就会报Socket error: bind: Address not available [closed];

master上面的etcd配置: Description=Etcd Server After=network.target After=network-online.target Wants=network-online.target Documentation=https://github.com/coreos

[Service] Type=notify WorkingDirectory=/var/lib/etcd/ ExecStart=/root/kubernetes/bin/etcd
--name=172.26.178.195
--listen-client-urls=http://172.26.178.195:2379,http://127.0.0.1:2379
--advertise-client-urls=http://172.26.178.195:2379
--data-dir=/var/lib/etcd Restart=on-failure RestartSec=5 LimitNOFILE=65536

其他信息: master: Calico process is running.

IPv4 BGP status +----------------+-------------------+-------+----------+---------+ | PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO | +----------------+-------------------+-------+----------+---------+ | 47.105.223.158 | node-to-node mesh | start | 02:49:30 | Connect | | 47.105.189.58 | node-to-node mesh | start | 02:49:30 | Connect | +----------------+-------------------+-------+----------+---------+

IPv6 BGP status No IPv6 peers found.

node: Calico process is running.

IPv4 BGP status +----------------+-------------------+-------+----------+--------------------------------+ | PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO | +----------------+-------------------+-------+----------+--------------------------------+ | 47.105.189.58 | node-to-node mesh | start | 03:54:15 | Active Socket: Connection | | | | | | closed | | 172.26.178.195 | node-to-node mesh | start | 03:54:15 | Active Socket: Connection | | | | | | closed | +----------------+-------------------+-------+----------+--------------------------------+

IPv6 BGP status No IPv6 peers found.

展开
收起
游客cwmzfcta52sue 2019-12-18 23:57:43 1568 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
低代码开发师(初级)实战教程 立即下载