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
在这里插入图片描述
6.重启再次访问,访问成功,并不再出现错误
docker restart b95378991be0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值