Calico wait for etcd error Kubespray

7/20/2017

I get the following error when trying to use Kubespray to install Kubernetes on an EC2 cluster

TASK [network_plugin/calico : Calico | wait for etcd] ***********************************************************************************************************************************************************************************************
Thursday 20 July 2017  17:21:40 -0400 (0:00:00.327)       0:04:16.018 ********* 
FAILED - RETRYING: Calico | wait for etcd (10 retries left).
FAILED - RETRYING: Calico | wait for etcd (9 retries left).
FAILED - RETRYING: Calico | wait for etcd (8 retries left).
FAILED - RETRYING: Calico | wait for etcd (7 retries left).
FAILED - RETRYING: Calico | wait for etcd (6 retries left).
FAILED - RETRYING: Calico | wait for etcd (5 retries left).
FAILED - RETRYING: Calico | wait for etcd (4 retries left).
FAILED - RETRYING: Calico | wait for etcd (3 retries left).
FAILED - RETRYING: Calico | wait for etcd (2 retries left).
FAILED - RETRYING: Calico | wait for etcd (1 retries left).
fatal: [node1 -> None]: FAILED! => {"attempts": 10, "changed": false, "content": "", "failed": true, "msg": "Status code was not [200]: Request failed: <urlopen error [Errno 111] Connection refused>", "redirected": false, "status": -1, "url": "https://localhost:2379/health"}

Anyone know why this might be? Here is a Github issue I filed with more info https://github.com/kubernetes-incubator/kubespray/issues/1466

-- mdornfe1
kubernetes

1 Answer

9/13/2017

TLDR; open both ports 2379 and 2380

I encountered this same issue and found that I needed to open two ports for etcd. The obvious port is 2379, because it is in the ansible error message. When I examined the logs for the etcd container on one of the failed nodes I found that it was trying to communicate with other etcd nodes on port 2380. I updated my security group to allow traffic on both ports and this error was resolved.

-- Daniel Watrous
Source: StackOverflow