etcd cluster id mistmatch

peachestao · · 3232 次点击 · 开始浏览    置顶
这是一个创建于 的主题,其中的信息可能已经有所发展或是发生改变。

我在做etcd 群集搭建,共三个几点,我使用同一台机器的不同的端口可以搭建成功,但用三台机器搭建时启动服务后报错'cluster ID mismatch',这三台都是云主机,相应的端口都已经开放了,可以互相访问, 详细报错日志如下: ``` Feb 20 20:33:13 VM-0-15-ubuntu etcd[26272]: request cluster ID mismatch (got 3652f05a66289861 want f633942361b97b7f) Feb 20 20:33:13 VM-0-15-ubuntu etcd[26272]: request cluster ID mismatch (got 3652f05a66289861 want f633942361b97b7f) Feb 20 20:33:13 VM-0-15-ubuntu etcd[26272]: request sent was ignored (cluster ID mismatch: peer[7a710abd2cc3d001]=3652f05a66289861, local=f633942361b97b7f) Feb 20 20:33:13 VM-0-15-ubuntu etcd[26272]: request sent was ignored (cluster ID mismatch: peer[7a710abd2cc3d001]=3652f05a66289861, local=f633942361b97b7f) Feb 20 20:33:13 VM-0-15-ubuntu etcd[26272]: request cluster ID mismatch (got 3652f05a66289861 want f633942361b97b7f) Feb 20 20:33:13 VM-0-15-ubuntu etcd[26272]: request cluster ID mismatch (got 3652f05a66289861 want f633942361b97b7f) Feb 20 20:33:13 VM-0-15-ubuntu etcd[26272]: request sent was ignored (cluster ID mismatch: peer[7a710abd2cc3d001]=3652f05a66289861, local=f633942361b97b7f) Feb 20 20:33:13 VM-0-15-ubuntu etcd[26272]: request sent was ignored (cluster ID mismatch: peer[7a710abd2cc3d001]=3652f05a66289861, local=f633942361b97b7f) Feb 20 20:33:13 VM-0-15-ubuntu etcd[26272]: request cluster ID mismatch (got 3652f05a66289861 want f633942361b97b7f) Feb 20 20:33:13 VM-0-15-ubuntu etcd[26272]: request cluster ID mismatch (got 3652f05a66289861 want f633942361b97b7f) ``` **node1 :** /etc/systemd/system/etcd.service 其他两台一样 ``` [Unit] Description=Etcd Server After=network.target After=network-online.target Wants=network-online.target [Service] Type=notify WorkingDirectory=/var/lib/etcd/ EnvironmentFile=-/etc/etcd/etcd.conf User=root # set GOMAXPROCS to number of processors ExecStart=/usr/bin/etcd \ --name=${ETCD_NAME} \ --data-dir=${ETCD_DATA_DIR} \ --listen-client-urls=${ETCD_LISTEN_CLIENT_URLS} \ --listen-peer-urls=${ETCD_LISTEN_PEER_URLS} \ --advertise-client-urls=${ETCD_ADVERTISE_CLIENT_URLS} \ --initial-cluster-token=${ETCD_INITIAL_CLUSTER_TOKEN} \ --initial-advertise-peer-urls=${ETCD_INITIAL_ADVERTISE_PEER_URLS} \ --initial-cluster-state=${ETCD_INITIAL_CLUSTER_STATE} \ --initial-cluster=${ETCD_INITIAL_CLUSTER} Restart=on-failure LimitNOFILE=65536 [Install] WantedBy=multi-user.target ``` /etc/etcd/etcd.conf ``` ETCD_NAME="etcd-1" ETCD_DATA_DIR="/var/lib/etcd/data" ETCD_LISTEN_CLIENT_URLS="http://ip1:2379,http://localhost:2379" ETCD_LISTEN_PEER_URLS="http://ip1:2380" ETCD_INITIAL_ADVERTISE_PEER_URLS="http://ip1:2380" ETCD_ADVERTISE_CLIENT_URLS="http://ip1:2379,http://localhost:2379" ETCD_INITIAL_CLUSTER="etcd-1=http://ip1:2380,etcd-2=http://ip2:2380,etcd-3=http://ip3:2380" ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-token" ETCD_INITIAL_CLUSTER_STATE="new" ``` **node2:** /etc/etcd/etcd.conf ``` ETCD_NAME="etcd-2" ETCD_DATA_DIR="/var/lib/etcd/data" ETCD_LISTEN_CLIENT_URLS="http://ip2:2379,http://localhost:2379" ETCD_LISTEN_PEER_URLS="http://ip2:2380" ETCD_INITIAL_ADVERTISE_PEER_URLS="http://ip2:2380" ETCD_ADVERTISE_CLIENT_URLS="http://ip2:2379,http://localhost:2379" ETCD_INITIAL_CLUSTER="etcd-1=http://ip1:2380,etcd-2=http://ip2:2380,etcd-3=http://ip3:2380" ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-token" ETCD_INITIAL_CLUSTER_STATE="new" ``` **node3:** /etc/etcd/etcd.conf ``` ETCD_NAME="etcd-3" ETCD_DATA_DIR="/var/lib/etcd/data" ETCD_LISTEN_CLIENT_URLS="http://ip3:2379,http://localhost:2379" ETCD_LISTEN_PEER_URLS="http://ip3:2380" ETCD_INITIAL_ADVERTISE_PEER_URLS="http://ip3:2380" ETCD_ADVERTISE_CLIENT_URLS="http://ip3:2379,http://localhost:2379" ETCD_INITIAL_CLUSTER="etcd-1=http://ip1:2380,etcd-2=http://ip2:2380,etcd-3=http://ip3:2380" ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-token" ETCD_INITIAL_CLUSTER_STATE="new" ``` **启动命令:** ``` systemctl daemon-reload systemctl enable etcd systemctl start etcd ``` **我尝试删除data-dir文件夹,然后重建,重启服务,还是无效** **帮我看下我哪里出错了** etcd version is 3.3.18 system is ubuntu 16.04

有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

3232 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传