node2200:
nohup etcd --name node2200 --initial-advertise-peer-urls http://10.0.2.16:2380
–listen-peer-urls http://10.0.2.16:2380
–listen-client-urls http://10.0.2.16:2379,http://127.0.0.1:2379
–advertise-client-urls http://10.0.2.16:2379
–initial-cluster-token etcd-cluster
–initial-cluster node2200=http://10.0.2.16:2380,node2202=http://10.0.2.18:2380
–initial-cluster-state new &
node2202:
nohup etcd --name node2202 --initial-advertise-peer-urls http://10.0.2.18:2380
–listen-peer-urls http://10.0.2.18:2380
–listen-client-urls http://10.0.2.18:2379,http://127.0.0.1:2379
–advertise-client-urls http://10.0.2.18:2379
–initial-cluster-token etcd-cluster
–initial-cluster node2200=http://10.0.2.16:2380,node2202=http://10.0.2.18:2380
–initial-cluster-state new &
检查cluster状态
etcdctl cluster-health
Error: client: etcd cluster is unavailable or misconfigured
error #0: dial tcp 127.0.0.1:4001: getsockopt: connection refused
error #1: client: endpoint http://127.0.0.1:2379 exceeded header timeout