Add new node in migrated cluster using the API (rke1)

Hi!

Recently, I had to migrate my clusters to a new Rancher host. I followed the steps to migrate each cluster as the documentation advised. However, the “Add Node” and “Take Snapshot” options are no longer available in the UI. As a result, I decided to use the v3 API.

Whenever I try to register a new node in a migrated cluster, it gets stuck in the “Registering” step, specifically during the WebSocket connection.

Any help would be appreciated.

I have attached a photo, the Docker logs, and the commands I used.

My steps:
First, I get the token in the next command with a curl:
curl -k -H "Authorization: Bearer <my-created-token>" "https://<my-host>/v3/clusterregistrationtokens?clusterId=<cluster-id>"

Then, after searching in the previous output, i place the given token and try to register a new node, running this command from my VM:
sudo docker run -d --privileged --restart=unless-stopped --net=host -v /etc/kubernetes:/etc/kubernetes -v /var/run:/var/run rancher/rancher-agent:v2.9.2 --server https://<my-host>/ --token <given-token> --worker

rancher_add_node_issue

Docker logs:

INFO: Arguments: --server https://<my-host> --token REDACTED --worker
INFO: Environment: CATTLE_ADDRESS=<cattle-ip> CATTLE_INTERNAL_ADDRESS= CATTLE_NODE_NAME=node-add-test CATTLE_RANCHER_PROVISIONING_CAPI_VERSION= CATTLE_RANCHER_WEBHOOK_VERSION=104.0.2+up0.5.2 CATTLE_ROLE=,worker CATTLE_SERVER=https://<my-host> CATTLE_TOKEN=REDACTED
INFO: Using resolv.conf: nameserver 127.0.0.53 search dedi.leaseweb.net options edns0 trust-ad
WARN: Loopback address found in /etc/resolv.conf, please refer to the documentation how to configure your cluster to resolve DNS properly
INFO: https://<my-host>/ping is accessible
INFO: <my-host> resolves to <my-ip>
time="2024-10-25T12:42:26Z" level=info msg="Listening on /tmp/log.sock"
time="2024-10-25T12:42:26Z" level=info msg="Rancher agent version v2.9.2 is starting"
time="2024-10-25T12:42:26Z" level=info msg="Option requestedHostname=node-add-test"
  time="2024-10-25T12:42:26Z" level=info msg="Option dockerInfo={378faf03-dc95-48cb-bf67-9c9e8af6986e 2 2 0 0 1 overlay2 [[Backing Filesystem extfs] [Supports d_type true] [Using metacopy false] [Native Overlay Diff true] [userxattr false]] [] {[local] [bridge host ipvlan macvlan null overlay] [] [awslogs fluentd gcplogs gelf journald json-file local splunk syslog]} true true false false true true true true true true false false false 34 false 48 2024-10-25T12:42:26.35936753Z json-file systemd 2 0 6.8.0-41-generic Ubuntu 24.04.1 LTS 24.04 linux x86_64 https://index.docker.io/v1/ 0xc0003e6230 8 8338034688 [] /var/lib/docker    node-add-test [] false 27.3.1   map[io.containerd.runc.v2:{runc [] <nil>} runc:{runc [] <nil>}] runc {  inactive false  [] 0 0 <nil> []} false  docker-init {7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c} {v1.1.14-0-g2c9f560 v1.1.14-0-g2c9f560} {de40ad0 de40ad0} [name=apparmor name=seccomp,profile=builtin name=cgroupns]  [] [WARNING: bridge-nf-call-iptables is disabled WARNING: bridge-nf-call-ip6tables is disabled]}"
time="2024-10-25T12:42:26Z" level=info msg="Option customConfig=map[address:<cattle-ip> internalAddress: label:map[] roles:[worker] taints:[]]"
time="2024-10-25T12:42:26Z" level=info msg="Option etcd=false"
time="2024-10-25T12:42:26Z" level=info msg="Option controlPlane=false"
time="2024-10-25T12:42:26Z" level=info msg="Option worker=true"
time="2024-10-25T12:42:26Z" level=error msg="unable to parse CA file /etc/kubernetes/ssl/certs/serverca"
time="2024-10-25T12:42:26Z" level=info msg="Connecting to wss://<my-host>/v3/connect/register with token starting with xxxxxxxxxxxxxxxxxxxx"
time="2024-10-25T12:42:26Z" level=info msg="Connecting to proxy" url="wss://<my-host>/v3/connect/register"
time="2024-10-25T12:42:26Z" level=info msg="Starting plan monitor, checking every 120 seconds"

Rancher version: 2.9.2
Clusters: rke1