web-dev-qa-db-ja.com

etcd2は、非常に単純なセットアップでCoreOSで失敗します

独自の検出サービスを実行する3ノードクラスターをセットアップしたいのですが、静的検出については この簡単なガイド に従っています。 3台のマシンのIPアドレスを知っています。最初のマシンでetcd2を起動しようとすると次のようになります。

etcd2 -name infra0 -initial-advertise-peer-urls http://10.0.0.1:2380 
-listen-peer-urls http://10.0.0.1:2380 
-listen-client-urls http://10.0.0.1:2379,http://127.0.0.1:2379 
-advertise-client-urls http://10.0.0.1:2379 
-initial-cluster-token etcd-cluster-1 
-initial-cluster infra0=http://10.0.0.1:2380,infra1=http://10.0.0.2:2380,infra2=http://10.0.0.3:2380 
-initial-cluster-state new

しかし、それは失敗し、奇妙な出力を出力するだけです。

2015/10/20 15:16:50 etcdmain: etcd Version: 2.1.2
2015/10/20 15:16:50 etcdmain: Git SHA: ff8d1ec
2015/10/20 15:16:50 etcdmain: Go Version: go1.4.2
2015/10/20 15:16:50 etcdmain: Go OS/Arch: linux/AMD64
2015/10/20 15:16:50 etcdmain: setting maximum number of CPUs to 1, total number of available CPUs is 1
2015/10/20 15:16:50 etcdmain: no data-dir provided, using default data-dir ./infra0.etcd
2015/10/20 15:16:50 etcdmain: the server is already initialized as member before, starting as etcd member...
2015/10/20 15:16:50 etcdmain: listening for peers on http://10.0.0.1:2380
2015/10/20 15:16:50 etcdmain: listening for client requests on http://10.0.0.1:2379
2015/10/20 15:16:50 etcdmain: listening for client requests on http://127.0.0.1:2379
2015/10/20 15:16:50 etcdserver: name = infra0
2015/10/20 15:16:50 etcdserver: data dir = infra0.etcd
2015/10/20 15:16:50 etcdserver: member dir = infra0.etcd/member
2015/10/20 15:16:50 etcdserver: heartbeat = 100ms
2015/10/20 15:16:50 etcdserver: election = 1000ms
2015/10/20 15:16:50 etcdserver: snapshot count = 10000
2015/10/20 15:16:50 etcdserver: advertise client URLs = http://10.0.0.1:2379
2015/10/20 15:16:50 etcdserver: restarting member 7ebe4414520dd95e in cluster 7ef0605c00fad3ab at commit index 3
2015/10/20 15:16:50 raft: 7ebe4414520dd95e became follower at term 128
2015/10/20 15:16:50 raft: newRaft 7ebe4414520dd95e [peers: [], term: 128, commit: 3, applied: 0, lastindex: 3, lastterm: 1]
2015/10/20 15:16:50 etcdserver: starting server... [version: 2.1.2, cluster version: to_be_decided]
2015/10/20 15:16:50 etcdserver: added local member 7ebe4414520dd95e [http://10.0.0.1:2380] to cluster 7ef0605c00fad3ab
2015/10/20 15:16:50 etcdserver: added member 8c9ced5da49597eb [http://10.0.0.2:2380] to cluster 7ef0605c00fad3ab
2015/10/20 15:16:50 etcdserver: added member 992dd2c84a457838 [http://10.0.0.3:2380] to cluster 7ef0605c00fad3ab
2015/10/20 15:16:51 rafthttp: failed to dial 8c9ced5da49597eb on stream MsgApp v2 (dial tcp 10.0.0.2:2380: i/o timeout)
2015/10/20 15:16:51 rafthttp: failed to dial 8c9ced5da49597eb on stream Message (dial tcp 10.0.0.3:2380: i/o timeout)
2015/10/20 15:16:51 rafthttp: failed to dial 992dd2c84a457838 on stream MsgApp v2 (dial tcp 10.0.0.1:2380: i/o timeout)
2015/10/20 15:16:51 rafthttp: failed to dial 992dd2c84a457838 on stream Message (dial tcp 10.0.0.1:2380: i/o timeout)
2015/10/20 15:16:52 raft: 7ebe4414520dd95e is starting a new election at term 128
2015/10/20 15:16:52 raft: 7ebe4414520dd95e became candidate at term 129
2015/10/20 15:16:52 raft: 7ebe4414520dd95e received vote from 7ebe4414520dd95e at term 129
2015/10/20 15:16:52 raft: 7ebe4414520dd95e [logterm: 1, index: 3] sent vote request to 992dd2c84a457838 at term 129
2015/10/20 15:16:52 raft: 7ebe4414520dd95e [logterm: 1, index: 3] sent vote request to 8c9ced5da49597eb at term 129
2015/10/20 15:16:53 rafthttp: failed to write 992dd2c84a457838 on pipeline (dial tcp 10.0.0.1:2380: i/o timeout)
2015/10/20 15:16:53 rafthttp: failed to write 8c9ced5da49597eb on pipeline (dial tcp 10.0.0.3:2380: i/o timeout)
2015/10/20 15:16:53 raft: 7ebe4414520dd95e is starting a new election at term 129
2015/10/20 15:16:53 raft: 7ebe4414520dd95e became candidate at term 130
2015/10/20 15:16:53 raft: 7ebe4414520dd95e received vote from 7ebe4414520dd95e at term 130
2015/10/20 15:16:53 raft: 7ebe4414520dd95e [logterm: 1, index: 3] sent vote request to 8c9ced5da49597eb at term 130
2015/10/20 15:16:53 raft: 7ebe4414520dd95e [logterm: 1, index: 3] sent vote request to 992dd2c84a457838 at term 130
2015/10/20 15:16:54 raft: 7ebe4414520dd95e is starting a new election at term 130
2015/10/20 15:16:54 raft: 7ebe4414520dd95e became candidate at term 131
2015/10/20 15:16:54 raft: 7ebe4414520dd95e received vote from 7ebe4414520dd95e at term 131
2015/10/20 15:16:54 raft: 7ebe4414520dd95e [logterm: 1, index: 3] sent vote request to 8c9ced5da49597eb at term 131
2015/10/20 15:16:54 raft: 7ebe4414520dd95e [logterm: 1, index: 3] sent vote request to 992dd2c84a457838 at term 131
^C2015/10/20 15:16:54 osutil: received interrupt signal, shutting down...
2015/10/20 15:16:54 rafthttp: failed to dial 992dd2c84a457838 on stream MsgApp v2 (net/http: request canceled while waiting for connection)
2015/10/20 15:16:54 rafthttp: failed to dial 992dd2c84a457838 on stream Message (net/http: request canceled while waiting for connection)
2015/10/20 15:16:54 rafthttp: failed to dial 8c9ced5da49597eb on stream MsgApp v2 (net/http: request canceled while waiting for connection)
2015/10/20 15:16:54 rafthttp: failed to dial 8c9ced5da49597eb on stream Message (net/http: request canceled while waiting for connection)

これは本当にどういう意味ですか?

2
Rox

the server is already initialized as member before, starting as etcd member...は、以前にこのマシンをetcdクラスターのメンバーとして持っていたことを示します。この状態を使用して、クラスターに参加しようとして前のクラスターのメンバーに連絡します。

/var/lib/etcd2/*を削除して、この古いクラスターのすべての痕跡を取り除くことができます。次に、etcd2を再度開始します。

3
Rob