etcd cluster 配置出错

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

qq_狼啸_0

2020-02-26

# 出错信息:
cluster may be unhealthy: failed to list membersError:  client: etcd cluster is unavailable or misconfigurederror 
#0: dial tcp 127.0.0.1:4001: getsockopt: connection refusederror
#1: dial tcp 127.0.0.1:2379: getsockopt: connection refused
# 参数:
全部都是复制的课程的
# etcd进程运行状况:
ps -ef | grep etcd
vagrant   3886  3785  0 09:07 pts/0    00:00:00 grep --color=auto etcd

2台机器的etcd好像都没有正确运行?
# nohup.out信息:
more nohup.out

2020-02-26 08:43:19.821488 C | etcdserver: create wal error: fsync: invalid argument
168.205.10:2380,docker-node2=http://192.168.205.11:2380
2020-02-26 08:43:32.346317 I | etcdmain: etcd Version: 3.0.12
2020-02-26 08:43:32.346718 I | etcdmain: Git SHA: 2d1e2e8
2020-02-26 08:43:32.346862 I | etcdmain: Go Version: go1.6.3
2020-02-26 08:43:32.346939 I | etcdmain: Go OS/Arch: linux/amd64
2020-02-26 08:43:32.347059 I | etcdmain: setting maximum number of CPUs to 1, total numbe
r of available CPUs is 1
2020-02-26 08:43:32.347165 W | etcdmain: no data-dir provided, using default data-dir ./d
ocker-node2.etcd
2020-02-26 08:43:32.347610 I | etcdmain: listening for peers on http://192.168.205.11:238
0
2020-02-26 08:43:32.347722 I | etcdmain: listening for client requests on 127.0.0.1:2379
2020-02-26 08:43:32.347829 I | etcdmain: listening for client requests on 192.168.205.11:
2379
2020-02-26 08:43:32.352649 I | etcdserver: name = docker-node2
2020-02-26 08:43:32.352727 I | etcdserver: data dir = docker-node2.etcd
2020-02-26 08:43:32.352830 I | etcdserver: member dir = docker-node2.etcd/member
2020-02-26 08:43:32.352959 I | etcdserver: heartbeat = 100ms
2020-02-26 08:43:32.353092 I | etcdserver: election = 1000ms
2020-02-26 08:43:32.353177 I | etcdserver: snapshot count = 10000
2020-02-26 08:43:32.353361 I | etcdserver: advertise client URLs = http://192.168.205.11:
2379
2020-02-26 08:43:32.353578 I | etcdserver: initial advertise peer URLs = http://192.168.2
05.11:2380
2020-02-26 08:43:32.353838 I | etcdserver: initial cluster = docker-node1=http://192.168.
205.10:2380,docker-node2=http://192.168.205.11:2380
2020-02-26 08:43:32.356993 C | etcdserver: create wal error: fsync: invalid argument

从上输出可知,有一个错误如下:
create wal error: fsync: invalid argument

查了好久,但是没有解决问题,希望老师帮忙看下怎么处理~

写回答

1回答

qq_狼啸_0

提问者

2020-02-26

补充一下,我2台机器的防火墙都是关闭的

0
3
qq_狼啸_0
回复
麦兜搞IT
我换成yum 安装的etcd,然后配置对应的文件,可以了,至于直接在文件夹里面为啥不行,我没搞明白。(参数都是一样的)
2020-02-27
共3条回复

系统学习Docker 践行DevOps理念

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

3297 学习 · 1895 问题

查看课程