Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error from server: error dialing backend: dial tcp 10.9.84.149:10250: getsockopt: connection refused

I have a kubernetes cluster with three nodes: 10.9.84.149,10.9.105.90 and 10.9.84.149. When my application tries to execute the command inside some pod:

kuebctl exec -it <podName> 

it sometimes gets an error:

Error from server: error dialing backend: dial tcp 10.9.84.149:10250: getsockopt: connection refused

As far as I could see everything was fine with the cluster: all kube-system services and pods were running well. Besides, it didn't appear regularly.

Can anybody help me on this issue?

like image 412
killer_nudt Avatar asked Nov 06 '17 15:11

killer_nudt


1 Answers

I got the same error as this below

Error from server: Get https://192.168.100.102:10250/containerLogs/default/kubia-n8nv9/kubia: dial tcp 192.168.100.102:10250: connect: no route to host

DISABLING THE FIREWALL WAS MY FIX ON ALL NODES

I figured out my worker nodes firewall was not disabled. I did instruction below to fix my problem

systemctl disable firewalld && systemctl stop firewalld
-Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1...
-Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.```
like image 168
Ano Avatar answered Oct 20 '22 00:10

Ano