Rancher Server 设置
- Rancher 版本:
- 安装选项 (Docker install/Helm Chart):
- 如果是 Helm Chart 安装,需要提供 Local 集群的类型(RKE1, RKE2, k3s, EKS, 等)和版本:
- 在线或离线部署:
下游集群信息
- Kubernetes 版本:
- Cluster Type (Local/Downstream):
- 如果 Downstream,是什么类型的集群?(自定义/导入或为托管 等):
用户信息
- 登录用户的角色是什么? (管理员/集群所有者/集群成员/项目所有者/项目成员/自定义):
- 如果自定义,自定义权限集:
主机操作系统:
centos7.6
问题描述:
rancher服务器修改端口为10443,然后又修改为10444,master执行rke-clean.sh脚本,在master 执行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没有问题,但是程自启动的rancher-agent参数和手动启动的不一致 导致无法进行后续安装etcd、apiserver等组件
重现步骤:
结果:
预期结果:
截图:
其他上下文信息:
日志
日志 手动启动的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怎么端口和手动执行的端口不一致呢???