Failed to configure cattle client: Get XXX dial tcp 127.0.0.1:8080:connection refused

Unable to create event router" error=“Get http://localhost:8080/v2-beta: dial tcp 127.0.0.1:8080: getsockopt: connection refused
Failed to configure cattle client: Get http://localhost:8080/v2-beta: dial tcp 127.0.0.1:8080: connect: connection refused
Unable to create event router” error="Get http://localhost:8080/v2-beta: dial tcp 127.0.0.1:8080: getsockopt: connection refused
rancher服务在重启之后会报这个错误,并且无法访问GUI,解决方案。将rancher从1.X版本升级到2.X版本即可
1.拉取2.X镜像
$ docker pull rancher/rancher

2.创建宿主机挂载目录
$ mkdir -p /docker_volume/rancher_home/rancher
$ mkdir -p /docker_volume/rancher_home/auditlog

3.启动
$ docker run -d --restart=unless-stopped -p 80:80 -p 443:443
-v /docker_volume/rancher_home/rancher:/var/lib/rancher
-v /docker_volume/rancher_home/auditlog:/var/log/auditlog
–name rancher rancher/rancher

4.访问rancher的管理web页面:https://192.168.225.129

5.填写admin的密码及Ip
Failed to configure cattle client: Get XXX dial tcp 127.0.0.1:8080:connection refused_第1张图片
6.重启再次访问,访问成功,并不再出现错误
docker restart b95378991be0

你可能感兴趣的:(rancher,运维)