kube-calico bird:Mesh_172_26_178_195:套接字错误:绑定:地址不可用

kube-calico bird:Mesh_172_26_178_195:套接字错误:绑定:地址不可用

当节点上的 kube-calico 服务尝试连接主节点时出现问题:Dec 17 12:03:41 a docker[27052]: bird: Mesh_47_105_189_58: Socket error: bind: Address not available Dec 17 12:03:41 a docker[27052]: bird: Mesh_172_26_178_195: Socket error: bind: Address not available

下面是我在 master 上的 etcd 配置(172.26.178.195:2379 是我的私有 IP):

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.
docker config for 'calico service':

[Service] User=root PermissionsStartOnly=true ExecStart=/usr/bin/docker run --net=host --privileged --name=calico-node \ -e ETCD_ENDPOINTS=47.92.52.24:2379 \ -e CALICO_LIBNETWORK_ENABLED=true \ -e CALICO_NETWORKING_BACKEND=bird \ -e CALICO_DISABLE_FILE_LOGGING=true \ -e CALICO_IPV4POOL_CIDR=172.20.0.0/16 \ -e CALICO_IPV4POOL_IPIP=always \ -e FELIX_DEFAULTENDPOINTTOHOSTACTION=ACCEPT \ -e FELIX_IPV6SUPPORT=false \ -e FELIX_LOGSEVERITYSCREEN=info \ -e FELIX_IPINIPMTU=1440 \ -e FELIX_HEALTHENABLED=true \
-e IP=47.105.223.158 \ -v /var/run/calico:/var/run/calico \ -v /lib/modules:/lib/modules \ -v /run/docker/plugins:/run/docker/plugins \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /var/log/calico:/var/log/calico \ registry.cn-hangzhou.aliyuncs.com/imooc/calico-node:v2.6.2 ExecStop=/usr/bin/docker rm -f calico-node Restart=always RestartSec=10

对此有什么建议吗?

答案1

calico/node 使用公共 IP 相互通信。但阿里云中的节点位于防火墙后面。一些云提供商默认阻止主机之间的流量,例如在 GCE 中必须创建防火墙规则. 您应该创建允许主机之间通信的防火墙规则。

在 calico/node 容器中也可以使用环境变量IP_AUTODETECTION_METHOD指定要使用的接口/网络。

相关内容