clemenko / rke_install_blog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting error while joining worker node

abduansari opened this issue · comments

Dear Team,

I am trying to create the environment using GCP compute engine. Have created three Instances and on one instance have installed Master node. Now when adding the worker node and running the command systemctl enable --now rke2-agent.service getting below error

Mar 18 14:55:07 rancher2 rke2[676]: time="2023-03-18T14:55:07Z" level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"

I got the same error message but at the step to start rke2.agent service. after enable it, run start, and then it's stuck at activating with:

^C
root@ubuntu2-1:~# systemctl status rke2-agent.service
● rke2-agent.service - Rancher Kubernetes Engine v2 (agent)
Loaded: loaded (/usr/local/lib/systemd/system/rke2-agent.service; enabled; vendor preset: enabled)
Active: activating (start) since Wed 2023-03-29 11:24:24 +07; 3h 43min ago
Docs: https://github.com/rancher/rke2#readme
Main PID: 960 (rke2)
Tasks: 8
Memory: 75.4M
CPU: 5.710s
CGroup: /system.slice/rke2-agent.service
└─960 "/usr/local/bin/rke2 agent"

Mar 29 15:03:55 ubuntu2-1 rke2[960]: time="2023-03-29T08:03:55Z" level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": context deadline exc>
Mar 29 15:04:17 ubuntu2-1 rke2[960]: time="2023-03-29T08:04:17Z" level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": context deadline exc>
Mar 29 15:04:39 ubuntu2-1 rke2[960]: time="2023-03-29T08:04:39Z" level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": context deadline exc>
Mar 29 15:05:01 ubuntu2-1 rke2[960]: time="2023-03-29T08:05:01Z" level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": context deadline exc>
Mar 29 15:05:23 ubuntu2-1 rke2[960]: time="2023-03-29T08:05:23Z" level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": context deadline exc>
Mar 29 15:05:45 ubuntu2-1 rke2[960]: time="2023-03-29T08:05:45Z" level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": context deadline exc>
Mar 29 15:06:07 ubuntu2-1 rke2[960]: time="2023-03-29T08:06:07Z" level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": context deadline exc>
Mar 29 15:06:29 ubuntu2-1 rke2[960]: time="2023-03-29T08:06:29Z" level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": context deadline exc>
Mar 29 15:06:51 ubuntu2-1 rke2[960]: time="2023-03-29T08:06:51Z" level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": context deadline exc>
Mar 29 15:07:13 ubuntu2-1 rke2[960]: time="2023-03-29T08:07:13Z" level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": context deadline exc>

Here are the things to test with when you see this error.
A. Put Selinux in Permissive mode. - May want to reboot.
B. Make sure Selinux is up to date. yum update -y selinux* or the whole os yum update -y.
C. You can get better logs by adding debug: true in the /etc/rancher/rke2/config.yaml file.
Then use journalctl -xefu rke2-server to see the logs live.

Hope this helps.

Any update?

Closing since no response. We can re-open if needed.