请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

etcd cluster 配置出错

# 出错信息:
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

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

正在回答 回答被采纳积分+3

1回答

提问者 qq_狼啸_0 2020-02-26 17:17:07

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

0 回复 有任何疑惑可以回复我~
  • 您把您启动etcd的命令都贴出看一下,另外命令行参数特别是IP地址,您都是对应您的环境里的是么?
    回复 有任何疑惑可以回复我~ 2020-02-27 02:09:29
  • 提问者 qq_狼啸_0 回复 麦兜搞IT #2
    是的,我对应的IP地址就是对应的2台机器的IP
    node1: 192.168.205.10
    node2: 192.168.205.11
    这些都是通过vagrant配置启起来的
    
    
    node1:
    nohup ./etcd --name docker-node1 --initial-advertise-peer-urls http://192.168.205.10:2380 \
    --listen-peer-urls http://192.168.205.10:2380 \
    --listen-client-urls http://192.168.205.10:2379,http://127.0.0.1:2379 \
    --advertise-client-urls http://192.168.205.10:2379 \
    --initial-cluster-token etcd-cluster \
    --initial-cluster docker-node1=http://192.168.205.10:2380,docker-node2=http://192.168.205.11:2380 \
    --initial-cluster-state new&
    
    node2:
    nohup ./etcd --name docker-node2 --initial-advertise-peer-urls http://192.168.205.11:2380 \
    --listen-peer-urls http://192.168.205.11:2380 \
    --listen-client-urls http://192.168.205.11:2379,http://127.0.0.1:2379 \
    --advertise-client-urls http://192.168.205.11:2379 \
    --initial-cluster-token etcd-cluster \
    --initial-cluster docker-node1=http://192.168.205.10:2380,docker-node2=http://192.168.205.11:2380 \
    --initial-cluster-state new&
    回复 有任何疑惑可以回复我~ 2020-02-27 12:51:42
  • 提问者 qq_狼啸_0 回复 麦兜搞IT #3
    我换成yum 安装的etcd,然后配置对应的文件,可以了,至于直接在文件夹里面为啥不行,我没搞明白。(参数都是一样的)
    回复 有任何疑惑可以回复我~ 2020-02-27 16:28:35
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信