Docker Swarm: Error response from daemon: error while validating Root CA Certificate: x509: certificate has expired or is not yet valid
Docker Swarm: Error response from daemon: error while validating Root CA Certificate: x509: certificate has expired or is not yet valid
OS: CentOS 7 VM
Docker latest version
Commands Executed:
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
As you can see, swarm join is giving me this error. What is the reason for this error and where is it coming from?
Regards
Aditya
@Tarun Lalwani Both are executed on different machines.
– Aditya Krishnakant
Aug 4 '17 at 11:29
Are you using any proxy?
– Tarun Lalwani
Aug 5 '17 at 17:39
running into same problem despite including both "HTTP_PROXY" & "NO_PROXY"
– SndLt
Aug 7 '17 at 17:47
@Tarun Lalwani Nope. No proxies!
– Aditya Krishnakant
Aug 8 '17 at 10:38
2 Answers
2
Had similar issue because swarm init generated ca certificate with start date in future. Possibly due to ntp lag.
CA cert info may be acquired using following command:
docker swarm ca | openssl x509 -noout -text
I solved it by setting the same date on both machines.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
are you executing both commands on same machine or different ? Are you using any proxies?
– Tarun Lalwani
Aug 4 '17 at 10:51