-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RKE 2 client error msg="failed to get CA certs: Get \"https://127.0.0.1:6444/cacerts\": read tcp 127.0.0.1: #3275
Comments
Why are you trying to use localhost (127.0.0.1) as the server? This should be the address of your server node. server: https://127.0.0.1:9345/
token: K10fdc50334262abad14458c4baf4ceb6f4136d102fcf05ea182bba42cb709ce331::server:f9f5ab06303b89cd4a06f1a8067b4621 |
I tried to use my host IP instead of 127.0.0.1 in config.yaml but log error is still teh same with 127.0.0.1 |
Can you successfully |
no, I cannot: root@azbest:~# curl -vks https://192.168.66.128:9345/ping
|
but there is no listener for 9354 |
Are you sure RKE2 is running on your server? |
after restart rke service: root@azbest:~# systemctl status rke2-server.service Aug 29 18:09:52 adam rke2[48837]: time="2022-08-29T18:09:52Z" level=info msg="Event(v1.ObjectReference{Kind:"HelmChart", Namespace:"kube-system", Name:"rke2-coredns", UID:"21f83e49-4f13-431f-bcba-9>
|
trying to run rke2 agent and it's hang: root@azbest:~# systemctl start rke2-agent.service and still plenty: error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": read tcp 127.0.0.1: |
this is the output for journalctl -u rke2-agent -f when root@azbest:~# systemctl start rke2-agent.service Aug 29 18:20:38 azbest rke2[50195]: time="2022-08-29T18:20:38Z" level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": read tcp 127.0.0.1:56500->127.0.0.1:6444: read: connection reset by peer" |
OK, so the server is working fine, but the agent gets a "connection reset by peer" error when it attempts to connect to it. It sounds like you have a firewall or something else blocking the connection. |
You're not trying to run the agent and server on the same node, are you? |
Yes, I am trying to run the agent and the server on the same node. |
root@azbest:~# systemctl status ufw |
That is not supported. The server also functions as an agent; you can't have RKE2 running twice on the same node. |
Thank you brandond for your help ! |
Hi @Azbest7812, I'm having the same issue as you. Did you find any solution? |
look at the solution upon,rke2-server an rke2-agent can't be installed on the same node,you can install the rke2-agent on another machine,then the errors will be resolved. This is an important caution,I don't know why this isn't mentioned in the |
Why would you even try to do that? You can't run multiple copies of Kubernetes on one node. |
Because I'm learning this software and lack of computer, so I tried to run many cases on the same machine,then encountered the errors.Thanks for this issue. |
Hi,
The following problem occurred while trying to start rk2 agent:
level=error msg="failed to get CA certs: Get "https://127.0.0.1:6444/cacerts\": read tcp 127.0.0.1:
this is my config file:
root@azbest:~# cat /etc/rancher/rke2/config.yaml
server: https://127.0.0.1:9345
token: K10fdc50334262abad14458c4baf4ceb6f4136d102fcf05ea182bba42cb709ce331::server:f9f5ab06303b89cd4a06f1a8067b4621
this is token:
root@azbest:~# cat /var/lib/rancher/rke2/server/node-token
K10fdc50334262abad14458c4baf4ceb6f4136d102fcf05ea182bba42cb709ce331::server:f9f5ab06303b89cd4a06f1a8067b4621
I tried to use my host IP instead of 127.0.0.1 in config.yaml but log error is still teh same with 127.0.0.1
And this is my rke2.yaml:
root@azbest:~# cat /etc/rancher/rke2/rke2.yaml
apiVersion: v1
clusters:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJlVENDQVIrZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWtNU0l3SUFZRFZRUUREQmx5YTJVeUxYTmwKY25abGNpMWpZVUF4TmpZeE56YzJOVFV6TUI0WERUSXlNRGd5T1RFeU16VTFNMW9YRFRNeU1EZ3lOakV5TXpVMQpNMW93SkRFaU1DQUdBMVVFQXd3WmNtdGxNaTF6WlhKMlpYSXRZMkZBTVRZMk1UYzNOalUxTXpCWk1CTUdCeXFHClNNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJFSDZnbGtEY2V2OGpueTI3VFppUVVibmhuMEFYc081SUJJeXRnTC8KRkpwY1FZdjVEYS9vNG5yQlEzbDhPRXVXQXJ4MEdObU9FR3pIMk14Rk85am1aemFqUWpCQU1BNEdBMVVkRHdFQgovd1FFQXdJQ3BEQVBCZ05WSFJNQkFmOEVCVEFEQVFIL01CMEdBMVVkRGdRV0JCUWMzbGRwRTJIbCs0Umo3Y1NuCmQveUZrbkhUbnpBS0JnZ3Foa2pPUFFRREFnTklBREJGQWlFQTRCd0xYeXJtajZvait3SERETmpxTmlaNURQT0IKNnhUNThONVJNekpYL1U4Q0lEeHhaWnVWQjAzdWpPQk00S2VLOHVhWWpHaTd1RTRBVUF2cUJtbXZHS01oCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
server: https://127.0.0.1:6443
name: default
contexts:
cluster: default
user: default
name: default
current-context: default
kind: Config
preferences: {}
users:
user:
client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJrekNDQVRpZ0F3SUJBZ0lJUGtHR0dlS2R5OU13Q2dZSUtvWkl6ajBFQXdJd0pERWlNQ0FHQTFVRUF3d1oKY210bE1pMWpiR2xsYm5RdFkyRkFNVFkyTVRjM05qVTFNekFlRncweU1qQTRNamt4TWpNMU5UTmFGdzB5TXpBNApNamt4TWpNMU5UTmFNREF4RnpBVkJnTlZCQW9URG5ONWMzUmxiVHB0WVhOMFpYSnpNUlV3RXdZRFZRUURFd3h6CmVYTjBaVzA2WVdSdGFXNHdXVEFUQmdjcWhrak9QUUlCQmdncWhrak9QUU1CQndOQ0FBU1NOK21TZCt6QktYM2wKQ3prZVk5NjNLSjZMYXBoeFhPeVQvMlk3K3pzM0M5K1BiQVg3dVNiUFFFZUg0WGt2eDBiWWQwcTBuMEE4T1NKYQpTUlJ1TFlZNm8wZ3dSakFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUhBd0l3Ckh3WURWUjBqQkJnd0ZvQVVjK1k3RnQyaUR3VkkwbmIzWXFCSXNZajNQYnd3Q2dZSUtvWkl6ajBFQXdJRFNRQXcKUmdJaEFLYUdCcFJaTFZhd3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pmcGtuZnN3U2w5NVFzNUhtUGV0eWllaTJxWWNWenNrLzltTy9zN053dmZqMndGKzdrbQp6MEJIaCtGNUw4ZEcySGRLdEo5QVBEa2lXa2tVYmkyR09nPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo=
root@azbest:~# netstat -nl | grep 6444
tcp 0 0 127.0.0.1:6444 0.0.0.0:* LISTEN
Any ideas, hints.
Regards,
Azbest
The text was updated successfully, but these errors were encountered: