Adding Node to the Cluster defined in Rancher fails with x509 error

Hi All,

I want to create cluster from scratch using Rancher UI, so i installed rancher (single node) with this: docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:latest
When i try to add some etcd node by running the command copy-pasted from the Ranche UI the log of the rancher/rancher-agent:v2.2.2 filled with this errors:

time=“2019-04-21T00:23:23Z” level=info msg=“Connecting to proxy” url=“wss://rancher.myhost.com/v3/connect/register”

time=“2019-04-21T00:23:23Z” level=error msg=“Failed to connect to proxy” error=“x509: certificate has expired or is not yet valid”

time=“2019-04-21T00:23:23Z” level=error msg=“Failed to connect to proxy” error=“x509: certificate has expired or is not yet valid”

How to make it work?

The time and/or timezone is wrong on the server and/or node, so the agent thinks the certificate is not good yet because it was issued in the “future”.

That was it!
Silly me used the CentOS 7 minimal install and somehow totally missed the ntpd.