首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在检查etcd健康状况时超过上下文截止日期

在检查etcd健康状况时超过上下文截止日期
EN

Stack Overflow用户
提问于 2019-09-14 06:16:17
回答 1查看 6.4K关注 0票数 5

我使用以下命令检查etcd(3.3.13)群集状态:

代码语言:javascript
运行
复制
[root@iZuf63refzweg1d9dh94t8Z work]# /opt/k8s/bin/etcdctl endpoint health --cluster
https://172.19.150.82:2379 is unhealthy: failed to connect: context deadline exceeded
https://172.19.104.231:2379 is unhealthy: failed to connect: context deadline exceeded
https://172.19.104.230:2379 is unhealthy: failed to connect: context deadline exceeded
Error: unhealthy cluster

检查表成员:

代码语言:javascript
运行
复制
[root@iZuf63refzweg1d9dh94t8Z work]# /opt/k8s/bin/etcdctl member list
    56298c42af788da7, started, azshara-k8s02, https://172.19.104.230:2380, https://172.19.104.230:2379
    5ab2d0e431f00a20, started, azshara-k8s01, https://172.19.104.231:2380, https://172.19.104.231:2379
    84c70bf96ccff30f, started, azshara-k8s03, https://172.19.150.82:2380, https://172.19.150.82:2379

我的集群部署成功了吗?如果没有,如何解决上下文截止日期超过错误?我试过这个:

代码语言:javascript
运行
复制
     export ETCDCTL_API=3
     [root@ops001 ~]# /opt/k8s/bin/etcdctl endpoint status --write-out=table
+----------------+------------------+---------+---------+-----------+-----------+------------+
|    ENDPOINT    |        ID        | VERSION | DB SIZE | IS LEADER | RAFT TERM | RAFT INDEX |
+----------------+------------------+---------+---------+-----------+-----------+------------+
| 127.0.0.1:2379 | 5ab2d0e431f00a20 |  3.3.13 |  2.0 MB |     false |        20 |   39303798 |
+----------------+------------------+---------+---------+-----------+-----------+------------+
[root@ops001 ~]# /opt/k8s/bin/etcdctl endpoint health
127.0.0.1:2379 is healthy: successfully committed proposal: took = 1.816293ms
[root@ops001 ~]# /opt/k8s/bin/etcdctl endpoint health --cluster
https://172.19.150.82:2379 is unhealthy: failed to connect: context deadline exceeded
https://172.19.104.231:2379 is unhealthy: failed to connect: context deadline exceeded
https://172.19.104.230:2379 is unhealthy: failed to connect: context deadline exceeded
Error: unhealthy cluster
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-09-15 05:06:39

如何解决上下文期限超过错误的问题?

该错误具有误导性;它通常是由etcdctl不提供凭据和/或不使用与集群相同的ETCDCTL_API=值引起的。如果它是一个现代的etcd版本,您将需要export ETCDCTL_API=3,然后提供与启动etcd本身相同的--trusted-ca-file=

票数 9
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57932971

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档