[转]ERROR: http://rancherserver/v1 is not accessible

本文转自:http://securityer.lofter.com/post/1d0f3ee7_10c465cc

 

安装rancher agent时出现以下报错

[root@localhost ~]# sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/ent:v1.2.5 http://192.168.160.130:8080/v1/scripts/6A02DFC097998B0A7659:1483142400000:Eja7GMfVIFpz6o3n017UuZoNNUs

 

INFO: Running Agent Registration Process, CATTLE_URL=http://192.168.160.130:8080/v1

INFO: Attempting to connect to: http://192.168.160.130:8080/v1

ERROR: http://192.168.160.130:8080/v1 is not accessible (Failed to connect to 192.168.160.130 port 8080: No route to host)

ERROR: http://192.168.160.130:8080/v1 is not accessible (Failed to connect to 192.168.160.130 port 8080: No route to host)

......

原因可能是防火墙引起

[root@localhost ~]# firewall-cmd --state

running

[root@localhost ~]# systemctl stop firewalld

再次执行agent安装

[root@localhost ~]# sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.5 http://192.168.160.130:8080/v1/scripts/6A02DFC097998B0A7659:1483142400000:Eja7GMfVIFpz6o3n017UuZoNNUs

 

INFO: Running Agent Registration Process, CATTLE_URL=http://192.168.160.130:8080/v1

INFO: Attempting to connect to: http://192.168.160.130:8080/v1

INFO: http://192.168.160.130:8080/v1 is accessible

INFO: Inspecting host capabilities

INFO: Boot2Docker: false

INFO: Host writable: true

INFO: Token: xxxxxxxx

INFO: Running registration

INFO: Printing Environment

INFO: ENV: CATTLE_ACCESS_KEY=E916F23240672F13BDB3

INFO: ENV: CATTLE_HOME=/var/lib/cattle

INFO: ENV: CATTLE_REGISTRATION_ACCESS_KEY=registrationToken

INFO: ENV: CATTLE_REGISTRATION_SECRET_KEY=xxxxxxx

INFO: ENV: CATTLE_SECRET_KEY=xxxxxxx

INFO: ENV: CATTLE_URL=http://192.168.160.130:8080/v1

INFO: ENV: DETECTED_CATTLE_AGENT_IP=172.17.0.1

INFO: ENV: RANCHER_AGENT_IMAGE=rancher/agent:v1.2.5

INFO: Launched Rancher Agent: f97c2ac8ab0d7862bc2aa694266d2379ef41de06db0e9d7ba3a44b0560758677

OK

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值