具体agent的报错如下:
/var/lib/rancher/rke2/bin/kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml logs -n cattle-system cattle-cluster-agent-5dd9cddd47-5ndqh
INFO: Environment: CATTLE_ADDRESS=10.42.0.36 CATTLE_CA_CHECKSUM= CATTLE_CLUSTER=true CATTLE_CLUSTER_AGENT_PORT=tcp://10.43.120.218:80 CATTLE_CLUSTER_AGENT_PORT_443_TCP=tcp://10.43.120.218:443 CATTLE_CLUSTER_AGENT_PORT_443_TCP_ADDR=10.43.120.218 CATTLE_CLUSTER_AGENT_PORT_443_TCP_PORT=443 CATTLE_CLUSTER_AGENT_PORT_443_TCP_PROTO=tcp CATTLE_CLUSTER_AGENT_PORT_80_TCP=tcp://10.43.120.218:80 CATTLE_CLUSTER_AGENT_PORT_80_TCP_ADDR=10.43.120.218 CATTLE_CLUSTER_AGENT_PORT_80_TCP_PORT=80 CATTLE_CLUSTER_AGENT_PORT_80_TCP_PROTO=tcp CATTLE_CLUSTER_AGENT_SERVICE_HOST=10.43.120.218 CATTLE_CLUSTER_AGENT_SERVICE_PORT=80 CATTLE_CLUSTER_AGENT_SERVICE_PORT_HTTP=80 CATTLE_CLUSTER_AGENT_SERVICE_PORT_HTTPS_INTERNAL=443 CATTLE_CREDENTIAL_NAME=cattle-credentials-4b950b21b8 CATTLE_FEATURES=fleet=false,managed-system-upgrade-controller=true,multi-cluster-management=false,multi-cluster-management-agent=true,provisioningprebootstrap=false,provisioningv2=false,rke2=false,turtles=false,ui-sql-cache=true CATTLE_INGRESS_IP_DOMAIN=sslip.io CATTLE_INSTALL_UUID=8503a0b9-937c-4cc3-af13-e81866756fb9 CATTLE_INTERNAL_ADDRESS= CATTLE_K8S_MANAGED=true CATTLE_NODE_NAME=cattle-cluster-agent-5dd9cddd47-5ndqh CATTLE_RANCHER_TURTLES_VERSION=110.0.0+up0.27.0 CATTLE_RANCHER_WEBHOOK_VERSION=110.0.0+up0.11.0 CATTLE_SERVER=https://ali-rancher-test.ich.tech CATTLE_SERVER_VERSION=v2.15.0 CATTLE_SUC_APP_NAME_OVERRIDE=mcc-aliyun-managed-system-upgrade-controller CATTLE_SYSTEM_DEFAULT_REGISTRY=harbor.ich.cn
INFO: Using resolv.conf: search cattle-system.svc.cluster.local svc.cluster.local cluster.local openstacklocal nameserver 10.43.0.10 options ndots:5
INFO: https://ali-rancher-test.ich.tech/ping is accessible
INFO: ali-rancher-test.ich.tech resolves to 10.72.2.189
time=“2026-08-10T02:56:02Z” level=info msg=“starting cattle-credential-cleanup goroutine in the background”
time=“2026-08-10T02:56:02Z” level=info msg=“Listening on /tmp/log.sock”
time=“2026-08-10T02:56:02Z” level=info msg=“Rancher agent version v2.15.0 is starting”
time=“2026-08-10T02:56:02Z” level=error msg=“unable to read CA file from /etc/kubernetes/ssl/certs/serverca: open /etc/kubernetes/ssl/certs/serverca: no such file or directory”
time=“2026-08-10T02:56:03Z” level=info msg=“Connecting to wss://ali-rancher-test.ich.tech/v3/connect/register with token starting with htc9mx8c4fqcpv9485fv665rfkw”
time=“2026-08-10T02:56:03Z” level=info msg=“Connecting to proxy” url=“wss://ali-rancher-test.ich.tech/v3/connect/register”
time=“2026-08-10T02:56:03Z” level=error msg=“Failed to connect to proxy. Response status: 400 - 400 Bad Request. Response body: cluster not found” error=“websocket: bad handshake”
time=“2026-08-10T02:56:03Z” level=error msg=“Remotedialer proxy error” error=“websocket: bad handshake”
time=“2026-08-10T02:56:13Z” level=info msg=“Connecting to wss://ali-rancher-test.ich.tech/v3/connect/register with token starting with htc9mx8c4fqcpv9485fv665rfkw”
time=“2026-08-10T02:56:13Z” level=info msg=“Connecting to proxy” url=“wss://ali-rancher-test.ich.tech/v3/connect/register”
time=“2026-08-10T02:56:13Z” level=error msg=“Failed to connect to proxy. Response status: 400 - 400 Bad Request. Response body: cluster not found” error=“websocket: bad handshake”
time=“2026-08-10T02:56:13Z” level=error msg=“Remotedialer proxy error” error=“websocket: bad handshake”
time=“2026-08-10T02:56:23Z” level=info msg=“Connecting to wss://ali-rancher-test.ich.tech/v3/connect/register with token starting with htc9mx8c4fqcpv9485fv665rfkw”
time=“2026-08-10T02:56:23Z” level=info msg=“Connecting to proxy” url=“wss://ali-rancher-test.ich.tech/v3/connect/register”
time=“2026-08-10T02:56:23Z” level=error msg=“Failed to connect to proxy. Response status: 400 - 400 Bad Request. Response body: cluster not found” error=“websocket: bad handshake”
我在Rancher控制台删除这个集群,重新导入后就可以。 但是只要导入集群的node重启,就会复现。