gpt4 book ai didi

Docker Swarm : Error response from daemon: error while validating Root CA Certificate: x509: certificate has expired or is not yet valid

转载 作者:行者123 更新时间:2023-12-04 22:28:20 26 4
gpt4 key购买 nike

操作系统 :CentOS 7 虚拟机

Docker 最新版本

执行的命令:

   1) docker swarm init
2) docker swarm join --token SWMTKN-1-3iqtmbz55yvhxkahe2ncs7d9ebxzlzmw1pwhqzvmcemiolef63-3muc4qjs3mbvh53t8ktzzmb22 192.168.10.108:2377
Error: Error response from daemon: error while validating Root CA Certificate: x509: certificate has expired or is not yet valid

如您所见,swarm join 给了我这个错误。这个错误的原因是什么,它来自哪里?

问候
阿迪亚

最佳答案

有类似的问题,因为 swarm init 生成了 future 开始日期的 ca 证书。可能是由于ntp滞后。

可以使用以下命令获取 CA 证书信息:

docker swarm ca | openssl x509 -noout -text

输出将如下所示:
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
...
Signature Algorithm: ecdsa-with-SHA256
Issuer: CN=swarm-ca
Validity
Not Before: Oct 24 20:25:00 2018 GMT
Not After : Oct 19 20:25:00 2038 GMT
Subject: CN=swarm-ca
Subject Public Key Info:
Public Key Algorithm: id-ecPublicKey
Public-Key: (256 bit)
pub:
...
...
...
...
ASN1 OID: prime256v1
NIST CURVE: P-256
X509v3 extensions:
X509v3 Key Usage: critical
Certificate Sign, CRL Sign
X509v3 Basic Constraints: critical
CA:TRUE
X509v3 Subject Key Identifier:
...
Signature Algorithm: ecdsa-with-SHA256
...
...
...
...

您可以看到有效期在格林威治标准时间 2018 年 10 月 24 日 20:25:00 到 2038 年 10 月 19 日 20:25:00 之间。如果尝试加入群的机器在该时间间隔内没有其时钟,它将因该错误而失败。

关于Docker Swarm : Error response from daemon: error while validating Root CA Certificate: x509: certificate has expired or is not yet valid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45502822/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com