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





are you executing both commands on same machine or different ? Are you using any proxies?
– Tarun Lalwani
Aug 4 '17 at 10:51





@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.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)