首页 > 其他分享 >ETCD 下线Member未剔除引发的日志报错

ETCD 下线Member未剔除引发的日志报错

时间:2023-12-27 19:35:57浏览次数:40  
标签:ETCD headless svc Member cluster 报错 etcd local apisix

背景介绍

容器化的etcd集群原来具有三个节点分别为etcd-0,etcd-1,etcd-2,在节点etcd-2下线后剩两个节点etcd-0,etcd-1

# kubectl get pod -n apisix
NAME                                         READY   STATUS    RESTARTS   AGE
etcd-0                                       1/1     Running   0          108m
etcd-1                                       1/1     Running   0          109m

每个节点日志请求一直有报错:

{"level":"warn","ts":"2023-12-27T09:35:15.756Z","caller":"rafthttp/probing_status.go:68","msg":"prober detected unhealthy status","round-tripper-name":"ROUND_TRIPPER_RAFT_MESSAGE","remote-peer-id":"5355ca4c835fd788","rtt":"0s","error":"dial tcp: lookup etcd-2.etcd-headless.apisix.svc.cluster.local on 10.44.12.155:53: no such host"}
  • 开始怀疑是etcd容器化编排文件有残留etcd-2相关配置信息,但经过排查及搜索并发发现与etcd-2相关的固化配置
  • 后面怀疑是CoreDNS出现异常,经过排查非DNS问题
  • 后面登录etcd集群命令查看还在存在etcd-2的成员信息,从而确定etcd-2未被下线导致的

查询etcd member有哪些

确认是否下线的etcd-2是否还存在集群里面

$ etcdctl --endpoints=http://etcd-0.etcd-headless.apisix.svc.cluster.local:2379,http://etcd-1.etcd-headless.apisix.svc.cluster.local:2379 member list
549aed3ff392fe0, started, etcd-0, http://etcd-0.etcd-headless.apisix.svc.cluster.local:2380, http://etcd-0.etcd-headless.apisix.svc.cluster.local:2379, false
5355ca4c835fd788, started, etcd-2, http://etcd-2.etcd-headless.apisix.svc.cluster.local:2380, http://etcd-2.etcd-headless.apisix.svc.cluster.local:2379, false
7cbbec80dc91e205, started, etcd-1, http://etcd-1.etcd-headless.apisix.svc.cluster.local:2380, http://etcd-1.etcd-headless.apisix.svc.cluster.local:2379, false

通过以上发现,etcd-2并未被剔除出集群,需要手动执行剔除操作

集群剔除etcd-2

$ etcdctl --endpoints=http://etcd-0.etcd-headless.apisix.svc.cluster.local:2379 member remove  5355ca4c835fd788 --user="root" --password="TZ7dVhdjabmpiRJz"
Member 5355ca4c835fd788 removed from cluster 6bcee157055be989

检验是否剔除etcd-2成功

$ etcdctl --endpoints=http://etcd-0.etcd-headless.apisix.svc.cluster.local:2379 member list
549aed3ff392fe0, started, etcd-0, http://etcd-0.etcd-headless.apisix.svc.cluster.local:2380, http://etcd-0.etcd-headless.apisix.svc.cluster.local:2379, false
7cbbec80dc91e205, started, etcd-1, http://etcd-1.etcd-headless.apisix.svc.cluster.local:2380, http://etcd-1.etcd-headless.apisix.svc.cluster.local:2379, false

日志请求错误检查已消失

标签:ETCD,headless,svc,Member,cluster,报错,etcd,local,apisix
From: https://www.cnblogs.com/NGU-PX/p/17931267.html

相关文章

  • Entity Framework中一对多关系关联id报错
    EntityFramework总是有那么一些令人无语的内置设定比如就遇到这么一个情况,building下有多个level则ef就会默认他们是一对多的情况,于是在对level进行增删改查时,就会找level中是否有building这个属性这时候如果你的level中没有Building则会报以下错误他告诉你,你的level中没......
  • swagger报错Unable to render this definition
    问题描述:访问swagger时,报错endofthestreamoradocumentseparatorisexpected,UnabletorenderthisdefinitionTheprovideddefinitiondoesnotspecifyavalidversionfield.PleaseindicateavalidSwaggerorOpenAPIversionfield.Supportedversionfields......
  • k8s 安装kubesphere3.4.1 多次安装报错 Error from server (InternalError): Internal
    failed:[localhost](item={'ns':'kubesphere-system','kind':'users.iam.kubesphere.io','resource':'admin','release':'ks-core'})=>{"ansible_loop_var":"......
  • 报错
    1.Youshouldconsiderupgradingviathe'C:\Users\榕宝\PycharmProjects\djangoProject\venv\Scripts\python.exe-mpipinstall--upgradepip'command.opython-mpipinstall--upgradepip   2.ERROR:Couldnotfindaversionthatsatisfie......
  • 完美解决SqlServer2012启动报错(cannot find one or more components.Please reinstall
    原因:默认安装在C:\ProgramFiles(x86)\MicrosoftVisualStudio10.0文件夹,以支持sqlserver2012.(我之前不小心把这个文件夹删除了)。解决方案:下载了visualstudio2010Isolatedshell完美解决问题,下载后安装就能正常运行SqlServer2012了,其他SqlServer版本请下载visualstudio......
  • Django 报错(You have 18 unapplied migration(s))
    pythonmanage.pyrunserver0.0.0.0:8000时报错:Youhave18unappliedmigration(s).Yourprojectmaynotworkproperlyuntilyouapplythemigrationsforapp(s):admin,auth,contenttypes,sessions.Run'pythonmanage.pymigrate'toapplythem.说明之前有......
  • 解决前端vue2报错 Error: Can't resolve cache-loader和Error: Can't resolve babel-l
    总得说来报这种Error:Can'tresolve+模块名字的错误,一般就只有两种原因:一、少了这个包(直接安装:pnpmadd-D模块名字@版本),二、有这个包,但是版本在package.json中不正确。需要和你的vue/cli-service的版本对应上,该降级的时候降级,降级一般先删除再安装新的pnpmremovecss-loaderpn......
  • 问题1:Ubuntu执行`sudo apt install XXX`报错出现Failed to Fetch
    报错问题:解决方案:1.查看自己Ubuntu的版本:lsb_release-a(LSB是LinuxStandardBase(Linux标准库)的缩写, lsb_release命令 用来与具体Linux发行版相关的Linux标准库信息)获取版本号之后进入:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/2.进入网址......
  • 官答|初始化GreatSQL报错无法找到数据目录或初始化数据字典失败
    官答|初始化GreatSQL报错无法找到数据目录或初始化数据字典失败GreatSQL推出新栏目——官答官答栏目针对GreatSQL数据库中的问题,选取官方论坛和讨论群中的典型提问进行深入解答。内容涵盖数据库安装部署、配置优化、故障排查、性能测试等方面。在文章中,我们不仅提供解决方案,......
  • 接口请求响应码415报错信息UNSUPPORTED_MEDIA_TYPE问题记录
    场景描述开发了一个Post类型的接口,在本地用postman测试是没有问题。前端调用返回415UNSUPPORTED_MEDIA_TYPE。而415UnsupportedMediaType是一种HTTP协议的错误状态代码,表示服务器由于不支持其有效载荷的格式,从而拒绝接受客户端的请求后面定位问题发现,后端接口请求参数使用@......