Why Rancher container suddenly started to crash? Why Rancher container suddenly started to crash? kubernetes kubernetes

Why Rancher container suddenly started to crash?


I solved the problem by creating a new 'localhost' certificate inside the rancher container. The new certificate is valid for 10 years :)


I had the same problem, to fix it i had to delete the /var/lib/rancher/management-state folder inside the running container. Obviously, the first thing to be done is make a backup of the container data.

$ docker exec -ti sh -c "rm -rf /var/lib/rancher/management-state"

And then restart the container just to be sure about re creating the folder.

$ docker restart

I hope it helps


I just got the same issue here on my cluster.

Workaround:Set the system clock to a date in the past so that the certificate is not seen as expired. For me, on an Ubuntu server, that was achievable by disabling NTP and then setting the date and time manually;

sudo timedatectl set-ntp offsudo date --set="2020-05-05 09:03:00.000"

Another way:Log in to the container and then delete the certificates

sudo docker exec -it rancher sh -c "rm /var/lib/rancher/management-state/tls/token-node.crt; rm /var/lib/rancher/management-state/tls/localhost.crt"

Use combination for better result without downtime

sudo timedatectl set-ntp offsudo date --set="2020-07-11 09:03:00.000"sudo docker exec -it rancher sh -c "rm /var/lib/rancher/management-state/tls/token-node.crt; rm /var/lib/rancher/management-state/tls/localhost.crt"sudo timedatectl set-ntp onsudo docker restart rancher