- rancher/server:v1.6.26
Linux OS:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"建立完rancher後準備建在相同主機上新增HOST,鍵入指令後回饋
1
2
3
4
5INFO: Running Agent Registration Process, CATTLE_URL=http://rancherIp:8080/v1
INFO: Attempting to connect to: http://rancherIp:8080/v1
ERROR: http://rancherIp:8080/v1 is not accessible (Failed to connect to rancherIp port 8080: No route to host)
ERROR: http://rancherIp:8080/v1 is not accessible (Failed to connect to rancherIp port 8080: No route to host)
ERROR: http://rancherIp:8080/v1 is not accessible (Failed to connect to rancherIp port 8080: No route to host)查了下原因後,發現在特定版本OS:CenOS + rancher/server(尤其1.2)會有防火牆問題,解決方法鍵入指令
1
2
3
4
5
6nmcli connection modify docker0 connection.zone trusted
systemctl stop NetworkManager.service
firewall-cmd --permanent --zone=trusted --change-interface=docker0
systemctl start NetworkManager.service
nmcli connection modify docker0 connection.zone trusted
systemctl restart docker.service