docker swarm CA证书到期(Error grabbing logs: rpc error: code = Unknown)

现象

在portainer平台查看日志,发现一些节点日志无法查看报错为:

Error grabbing logs: rpc error: code = Unknown desc = warning: incomplete log stream. some logs could not be retrieved for the following reasons: node xw411xvzxn5sm29dd8u7culla is not available

查看证书时间

登陆docker swarm管理节点查看证书有效期时间

[root@host-10-6-29-41 ~]# docker system info

************

  CA Configuration:
   Expiry Duration: 3 months
   Force Rotate: 0

************

查看这语句发现CA证书只有3个月的有效期

更新CA证书并延长证书时间

在swarm管理节点执行这两个命令

[root@host-10-6-29-41 ~]# docker swarm update --cert-expiry 867240h0m0s
Swarm updated.

[root@host-10-6-29-41 ~]# docker swarm ca --rotate | openssl x509 -text -noout

[root@host-10-6-29-41 ~]# docker system info

************

  CA Configuration:
   Expiry Duration: 99 years
   Force Rotate: 2

************

  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值