Problem creating cluster - RKE

Hi,

I am using rancher 2.5.7 and trying to add a new cluster (i already have 2 working clusters)
I’m using existing VM with ubuntu 20.04 and Docker version 19.03.15, build 99e3ed8919
im using RKE template with kubernetes 1.19.9-rancher1-1
after i run the install commend (node role etcd and control plane) i see that the node is Waiting to register with Kubernetes
when i check the docker logs in the node i get-
level=warning msg=“Error while getting agent config: invalid response 500: nodes.management.cattle.io “c-5z6hd/m-fda58d2806cd” not found”
and sometimes i get -
“the object has been modified; please apply your changes to the latest version and try again”

is there any solution ?

thnx

I am getting this same error when I try and register a new node to the digitial ocean cluster. I’m using the DigitalOcean RKE, but I am trying to register an existing brand new node. My script that I execute is the following . . .

      echo `curl "https://$RANCHER_HOSTNAME/v3/clusterRegistrationTokens/$CLUSTER_ID":system \
        -H 'Content-Type: application/json' \
        -H "Authorization: Basic $(echo -n $RANCHER_ACCESS_KEY:$RANCHER_SECRET_KEY | base64 | tr -d '\n\r')" | \
        jq -r '.nodeCommand' | sed 's/^sudo //g'` --worker --taints entrypoint=true:PreferNoSchedule | tee /tmp/rancher_node_register.sh
      sh /tmp/rancher_node_register.sh

It registers with rancher for a split second and then dissapears. I was able to take the following screenshot before it dissapeared.

Here is the error I am getting from the rancher-agent container.

I am using the following . . .

Rancher v2.5.7
User Interface v2.5.6
Helm v2.16.8-rancher1
Machine v0.15.0-rancher52

The droplet I am trying to register is Ubuntu 18.04

So, it turns out that my issue was because Rancher deletes the nodes I try to register because they are not part of the cloud provider. Am am moving this to a new top at the link below.

Hi @jamrizzi were you able to get a workaround?

I was not. I would have to fork the code and modify it to prevent this from happening.

I’ve ran into this issue as well, but my situation may have been different. Two things I noticed:

  • Rancher does not appear to set up the nodes until etcd, controlplane and workers are present.
  • When I used 22.04 I got the same error messages that you guys got, but it might be that the error messages were a red herring, because I was able to spin up a different cluster with 22.04.

I used Rancher 2.5.9.