0

Issue appears when kube-calico service on node trying to connect master: 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

Below is my etcd configuration on master (172.26.178.195:2379 is my private 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

Any suggestions for this?

2
  • What cloud provider are you using? – Mark Watney Dec 18 '19 at 15:22
  • It serves on Ali Cloud ECS service – aleng1106 Dec 19 '19 at 13:49
0

The calico/node use a public ip to communicate with each other. But nodes in AliCloud are behind a firewall. Some cloud providers block traffic between host by default, for example in GCE firewall rule has to be created. You should create firewall rule allowing communication between hosts.

Also use env var in calico/node container IP_AUTODETECTION_METHOD to specify which interface/network to use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.