client: etcd cluster is unavailable or misconfigured

来源:4-10 Docker Overlay网络和etcd实现多机容器通信

水牛_0001

2019-01-28

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

写回答

1回答

麦兜搞IT

2019-01-30

您看一下后台进程,etcd的两个进程都在么?另外您两个node的防火墙都关闭了吧,这两个node是什么机器呢,虚拟机还是could的机器

0
3
麦兜搞IT
回复
Louis0o
您的问题我在您提问的问题里回复了,您的etcd进程并没有运行,而是退出了,请查看nohup.out的log看看原因是什么
2019-04-12
共3条回复

系统学习Docker 践行DevOps理念

无论你是开发、测试还是运维,Docker都是你的必备技能。

3297 学习 · 1895 问题

查看课程