Rancher 2.1.7单机版 ETCD报证书过期错误

变更https证书时,重启后打不开网页,通过docker logs命令查看容器日志,发现一直报 [info] Waiting on etcd startup: Get https://127.0.0.1:2379/health: x509: certificate has expired or is not yet valid 的错误

启动命令:

docker run -d --restart=unless-stopped --name rancherv217 -v /data/rancher:/var/lib/rancher -v /data/cert/cert.pem:/etc/rancher/ssl/cert.pem -v /data/cert/key.pem:/etc/rancher/ssl/key.pem  -p 80:80 -p 443:443 rancher/rancher:v2.1.7 --no-cacerts

操作:

docker stop rancherv217
docker rm rancherv217

停掉现在的容器后,进入

cd /data/rancher/management-state/certs

将bundle.json 移走

mv bundle.json bundle.json-bak

重新启动rancher

docker run -d --restart=unless-stopped --name rancherv217 -v /data/rancher:/var/lib/rancher -v /data/cert/cert.pem:/etc/rancher/ssl/cert.pem -v /data/cert/key.pem:/etc/rancher/ssl/key.pem  -p 80:80 -p 443:443 rancher/rancher:v2.1.7 --no-cacerts

github issues回答:
https://github.com/rancher/rancher/issues/20011#issuecomment-608440069
https://github.com/rancher/rancher/issues/20011#issuecomment-697223685

你可能感兴趣的:(Rancher 2.1.7单机版 ETCD报证书过期错误)