ETCD多次出现CONTEXT DEADLINE EXCEEDED
root@hqa-master-01:~# etcdctl --endpoints=$ETCD_ENDPOINTS member list --write-out=table
{“level”:“warn”,“ts”:“2020-03-23T14:19:45.033+0800”,“caller”:“clientv3/retry_interceptor.go:61”,“msg”:“retrying of unary invoker failed”,“target”:“endpoint://client-de4f21f1-72d2-4829-afb3-f395b8517c8b/192.168.10.59:2379”,“attempt”:0,“error”:“rpc error: code = DeadlineExceeded desc = latest connection error: connection error: desc = “transport: Error while dialing dial tcp: address etcd3=https://192.168.10.67:2379: too many colons in address””}
Error: context deadline exceeded
原因:
k8s现在使用的是etcd v3,必须提供ca、key、cert,否则会出现Error: context deadline exceeded
不加–endpoint参数时,默认访问的127.0.0.1:2379,而使用–endpoint参数时,必须提供ca,key,cert。
root@hqa-master-01:~# etcdctl --endpoints=$ETCD_ENDPOINTS \
–cert=/srv/etcd/etc/ssl/etcd.crt
–key=/srv/etcd/etc/ssl/etcd.key
–cacert=/srv/etcd/etc/ssl/ca.crt
member list --write-out=table
±-----------------±--------±------±---------------------------±---------------------------±-----------+
| ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS | IS LEARNER |
±-----------------±--------±------±---------------------------±---------------------------±-----------+
| 3ad858ae5255df41 | started | etcd2 | https://192.168.10.66:2380 | https://192.168.10.66:2379 | false |
| 79d2e10f8016a34d | started | etcd1 | https://192.168.10.59:2380 | https://192.168.10.59:2379 | false |
| 7c070e47b0530510 | started | etcd3 | https://192.168.10.67:2380 | https://192.168.10.67:2379 | false |
±-----------------±--------±------±---------------------------±---------------------------±-----------+
这样就正常了
来源地址:https://blog.csdn.net/songxi_bo/article/details/129422669
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341