k8s集群部署中etcd启动报错request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c

报错信息如下,主要报错信息有两条

1、request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)

2、Error: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: connect: connection refused
; error #1: client: endpoint http://127.0.0.1:2379 exceeded header timeout
详细的报错信息见下面两段代码

[root@localhost etcd]# systemctl restart etcd.service
Job for etcd.service failed because a timeout was exceeded. See "systemctl status etcd.service" and "journalctl -xe" for details.
[root@localhost etcd]# journalctl -xe
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: request sent was ignored (cluster ID mismatch: peer[c39bdec535db1fd5]=cdf818194e3a8c32, local=b0daaba520989844)
Jun 18 01:09:29 localhost.localdomain etcd[62325]: c3342da4612d81d7 is starting a new election at term 133
Jun 18 01:09:29 localhost.localdomain etcd[62325]: c3342da4612d81d7 became candidate at term 134
Jun 18 01:09:29 localhost.localdomain etcd[62325]: c3342da4612d81d7 received MsgVoteResp from c3342da4612d81d7 at term 134
Jun 18 01:09:29 localhost.localdomain etcd[62325]: c3342da4612d81d7 [logterm: 1, index: 2] sent MsgVote request to c39bdec535db1fd5 at term 134

[root@localhost ~]# etcdctl cluster-health
cluster may be unhealthy: failed to list members
Error:  client: etcd cluster is unavailable or misconfigured; error #0: client: endpoint http://127.0.0.1:2379 exceeded header timeout
; error #1: dial tcp 127.0.0.1:4001: connect: connection refused

error #0: client: endpoint http://127.0.0.1:2379 exceeded header timeout
error #1: dial tcp 127.0.0.1:4001: connect: connection refused

[root@localhost ~]# etcdctl cluster-health
cluster may be unhealthy: failed to list members
Error:  client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: connect: connection refused
; error #1: client: endpoint http://127.0.0.1:2379 exceeded header timeout

error #0: dial tcp 127.0.0.1:4001: connect: connection refused
error #1: client: endpoint http://127.0.0.1:2379 exceeded header timeout

原因是/var/lib/etcd/目录下缓存导致

找了一堆处理办法,此博客有提到处理办法如下
https://my.oschina.net/u/4274516/blog/3522268
【坑1】
场景1:报错:rafthttp: request sent was ignored (cluster ID mismatch: peer[b6568aca930d28d4]=cdf818194e3a8c32, local=9c8b920197d88342)
场景2:当某个peer挂了,或者减少etcd集群的成员等,你变更了配置之后,发现重启失败等等之类的错误,都可以尝试如下的解决办法
解决:
cd /var/lib/etcd/
rm ./* -rf //清缓存

解决方法

但是没有说清楚,需要**把master和node节点的/var/lib/etcd/目录下的缓存都删除一遍,然后重启etcd**
已经亲测有效。

问题2: Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. Either boot into a newer kernel or disable selinux

报错如下

Jun 18 02:00:41 localhost.localdomain dockerd-current[75401]: Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. Either boot into a newer kernel or disable selinux i
Jun 18 02:00:41 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jun 18 02:00:41 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.

##处理办法
1、升级内核

yum update

2、没有启动新的内核,修改的docker配置文件。将配置文件的“–selinux-enabled”改成“–selinux-enabled=false”,然后再重启docker。

[root@registry lib]# cat /etc/sysconfig/docker
# /etc/sysconfig/docker

# Modify these options if you want to change the way the docker daemon runs
#OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false'

OPTIONS='--selinux-enabled=false --log-driver=journald --signature-verification=false --registry-mirror=https://fzhifedh.mirror.aliyuncs.com --insecure-registry=registry.sese.com'    #修改这里的"--selinux-enabled",改成"--selinux-enabled=false"
if [ -z "${DOCKER_CERT_PATH}" ]; then
    DOCKER_CERT_PATH=/etc/docker
fi

......   #配置文件后面的内容省略
[root@registry lib]# 
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值