修改rancher端口号为10443,并且在rancherUI上修改rancherUL添加端口号,重启rancher以后,在k8s集群的master节点启动rancher-agent 第一次启动手动指定的参数为10443,命令如下,第二次自启动的rancher-agent日志显示server参数还是原来的443端口是怎么回事呢? 大神帮帮忙。。
sudo docker run -d --privileged --restart=unless-stopped --net=host -v /etc/kubernetes:/etc/kubernetes -v /var/run:/var/run registry.dlsc.com:18082/rancher/rancher-agent:v2.5.5 --server https://rancher.dlsc.sgcc.com:10443 --token 94hldsdfcjdkznl5mpj7hs9s8tqhkdnt --ca-checksum 1a65053f0820ebe55877f9dcaa ee88df2c671f379d --etcd --controlplane
日志 手动启动的rancher-agent日志
[yunwei@bj-dljy-k8s-149 ~]$ docker logs -f 37ad33a3b9ce
INFO: Arguments: --server https://rancher.dlsc.sgcc.com:10444 --token REDACTED --ca-checksum 1a65053f0820e 140d784aee88df2c671f379d --etcd --controlplane
INFO: Environment: CATTLE_ADDRESS=192.168.203.149 CATTLE_INTERNAL_ADDRESS= CATTLE_NODE_NAME=bj-dljy-k8s-149 CATTLE_ROLE=,etcd,controlplane CATTLE_SERVER=https://rancher.dlsc.sgcc.com:10444 CATTLE_TOKEN=REDACTED
INFO: Using resolv.conf: nameserver 192.168.203.156 nameserver 192.168.203.157
INFO: https://rancher.dlsc.sgcc.com:10444/ping is accessible
INFO: rancher.dlsc.sgcc.com resolves to 192.168.203.171
INFO: Value from https://rancher.dlsc.sgcc.com:10444/v3/settings/cacerts is an x509 certificate
time=“2022-11-26T09:44:30Z” level=info msg=“Listening on /tmp/log.sock”
time=“2022-11-26T09:44:30Z” level=info msg=“Rancher agent version v2.5.5 is starting”
time=“2022-11-26T09:44:30Z” level=info msg=“Option worker=false”
time=“2022-11-26T09:44:30Z” level=info msg=“Option requestedHostname=bj-dljy-k8s-149”
time=“2022-11-26T09:44:30Z” level=info msg=“Option customConfig=map[address:192.168.203.149 internalAddress: label:map roles:[etcd controlplane] taints:]”
time=“2022-11-26T09:44:30Z” level=info msg=“Option etcd=true”
time=“2022-11-26T09:44:30Z” level=info msg=“Option controlPlane=true”
time=“2022-11-26T09:44:30Z” level=info msg=“Connecting to wss://rancher.dlsc.sgcc.com:10444/v3/connect/register with token 646gkhvtzcstmw45k68s7w94hldsdfcjdkznl5mpj7hs9s8tqhkdnt”
time=“2022-11-26T09:44:30Z” level=info msg=“Connecting to proxy” url=“wss://rancher.dlsc.sgcc.com:10444/v3/connect/register”
time=“2022-11-26T09:44:32Z” level=info msg=“Starting plan monitor, checking every 120 seconds”
自动启动的rancher-agent日志
[yunwei@bj-dljy-k8s-149 ~]$ docker logs -f 6ea7f9fe11e3
INFO: Arguments: --server https://rancher.dlsc.sgcc.com:10443 --token REDACTED --ca-checksum 1a65053f0820ebe5 4aee88df2c671f379d --no-register --only-write-certs --node-name bj-dljy-k8s-149
INFO: Environment: CATTLE_ADDRESS=192.168.203.149 CATTLE_AGENT_CONNECT=true CATTLE_INTERNAL_ADDRESS= CATTLE_NODE_NAME=bj-dljy-k8s-149 CATTLE_SERVER=https://rancher.dlsc.sgcc.com:10443 CATTLE_TOKEN=REDACTED CATTLE_WRITE_CERT_ONLY=true
INFO: Using resolv.conf: nameserver 192.168.203.156 nameserver 192.168.203.157
ERROR: https://rancher.dlsc.sgcc.com:10443/ping is not accessible (Failed to connect to rancher.dlsc.sgcc.com port 10443: Connection timed out)
INFO: Arguments: --server https://rancher.dlsc.sgcc.com:10443 --token REDACTED --ca-checksum 1a65053f0820ebe55877f9dcaabb62d9473c2a62140d784aee88df2c671f379d --no-register --only-write-certs --node-name bj-dljy-k8s-149
INFO: Environment: CATTLE_ADDRESS=192.168.203.149 CATTLE_AGENT_CONNECT=true CATTLE_INTERNAL_ADDRESS= CATTLE_NODE_NAME=bj-dljy-k8s-149 CATTLE_SERVER=https://rancher.dlsc.sgcc.com:10443 CATTLE_TOKEN=REDACTED CATTLE_WRITE_CERT_ONLY=true
INFO: Using resolv.conf: nameserver 192.168.203.156 nameserver 192.168.203.157
ERROR: https://rancher.dlsc.sgcc.com:10443/ping is not accessible (Failed to connect to rancher.dlsc.sgcc.com port 10443: Connection timed out)
INFO: Arguments: --server https://rancher.dlsc.sgcc.com:10443 --token REDACTED --ca-checksum 1a65053f0820ebe55877f9dcaabb62d9473c2a62140d784aee88df2c671f379d --no-register --only-write-certs --node-name bj-dljy-k8s-149
INFO: Environment: CATTLE_ADDRESS=192.168.203.149 CATTLE_AGENT_CONNECT=true CATTLE_INTERNAL_ADDRESS= CATTLE_NODE_NAME=bj-dljy-k8s-149 CATTLE_SERVER=https://rancher.dlsc.sgcc.com:10443 CATTLE_TOKEN=REDACTED CATTLE_WRITE_CERT_ONLY=true
INFO: Using resolv.conf: nameserver 192.168.203.156 nameserver 192.168.203.157
程序自动启动的rancher-agent怎么端口和手动执行的端口不一致呢???