etcd: can't get cluster going: etcdserver: publish error: etcdserver: request timed out

I’m trying to start a cluster with:

./etcd -name pi0 -initial-advertise-peer-urls http://10.248.0.1:2380 -listen-peer-urls \
http://localhost:2380,http://localhost:7001,http://10.248.0.1:2380 -listen-client-urls \
http://localhost:2379,http://localhost:4001,http://192.168.1.10:4001 -advertise-client-urls \
http://localhost:2379,http://localhost:4001,http://10.248.0.1:4001 \
-initial-cluster-token pi-etcd \
-initial-cluster pi0=http://10.248.0.1:2380,pi1=http://10.248.0.2:2380,pi2=http://10.248.0.3:2380\
 -initial-cluster-state new

But this keeps failing with:

2015/02/14 12:23:39 etcdserver: publish error: etcdserver: request timed out

I’ve seen issue #/2276, but this seems again different. I am also not able to capture any network traffic and any interface. So that explain it’s timing out, but not sure where to go from here…

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 17 (6 by maintainers)

Most upvoted comments

‘etcdctl cluster-health’ reported no problems.

I’m afraid I cannot open another issue because frankly Etcd has become a something of a time-suck for me. As such, I’ve decided to ditch it. I’ll revisit it in a few years when it’s had time to mature.

Sent from my iPhone

On Apr 13, 2015, at 9:30 AM, Yicheng Qin notifications@github.com wrote:

@MrJoy This error indicates the cluster doesn’t work in health from the very beginning, and its root cause can be various. Could you open a new issue and list the detailed steps on how to reproduce your case from beginning?

— Reply to this email directly or view it on GitHub.

I’m experiencing the same issue trying to add a node to an existing cluster.

I run etcdctl member add, get the env vars, and run this on the CoreOS box of the new node:

rm -rf /opt/etcd/*
/usr/bin/docker run   --net=host   -t -i --rm   -p 2379:2379   -p 2380:2380   -p 4001:4001   -p 7001:7001   -v /opt/etcd:/opt/etcd   -v /usr/share/ca-certificates/:/etc/ssl/certs   quay.io/coreos/etcd:v2.0.8   --data-dir /opt/etcd   --name hivemind-04.${COREOS_PRIVATE_IPV4}     --listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001   --advertise-client-urls=http://${COREOS_PRIVATE_IPV4}:2379,http://${COREOS_PRIVATE_IPV4}:4001 --listen-peer-urls=http://${COREOS_PRIVATE_IPV4}:2380 --initial-advertise-peer-urls=http://${COREOS_PRIVATE_IPV4}:2380 --initial-cluster=$ETCD_INITIAL_CLUSTER --initial-cluster-state=$ETCD_INITIAL_CLUSTER_STATE

Initially, everything seems fine, but eventually this starts happening:

2015/04/11 03:57:42 etcd: listening for peers on http://172.31.25.162:2380
2015/04/11 03:57:42 etcd: listening for client requests on http://0.0.0.0:2379
2015/04/11 03:57:42 etcd: listening for client requests on http://0.0.0.0:4001
2015/04/11 03:57:42 etcdserver: datadir is valid for the 2.0.1 format
2015/04/11 03:57:42 etcdserver: name = hivemind-04.172.31.25.162
2015/04/11 03:57:42 etcdserver: data dir = /opt/etcd
2015/04/11 03:57:42 etcdserver: member dir = /opt/etcd/member
2015/04/11 03:57:42 etcdserver: heartbeat = 100ms
2015/04/11 03:57:42 etcdserver: election = 1000ms
2015/04/11 03:57:42 etcdserver: snapshot count = 10000
2015/04/11 03:57:42 etcdserver: advertise client URLs = http://172.31.25.162:2379,http://172.31.25.162:4001
2015/04/11 03:57:42 etcdserver: start member 5307770575fcee05 in cluster e27fa83f08c7f3d2
2015/04/11 03:57:42 raft: 5307770575fcee05 became follower at term 0
2015/04/11 03:57:42 raft: newRaft 5307770575fcee05 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
2015/04/11 03:57:42 raft: 5307770575fcee05 became follower at term 1
2015/04/11 03:57:47 etcdserver: publish error: etcdserver: request timed out
2015/04/11 03:57:52 etcdserver: publish error: etcdserver: request timed out
2015/04/11 03:57:57 etcdserver: publish error: etcdserver: request timed out
2015/04/11 03:58:02 etcdserver: publish error: etcdserver: request timed out
2015/04/11 03:58:07 etcdserver: publish error: etcdserver: request timed out
2015/04/11 03:58:12 etcdserver: publish error: etcdserver: request timed out
2015/04/11 03:58:15 etcdhttp: unexpected error: etcdserver: request timed out
2015/04/11 03:58:16 etcdhttp: unexpected error: etcdserver: request timed out
2015/04/11 03:58:17 etcdserver: publish error: etcdserver: request timed out