当前位置: 代码迷 >> 综合 >> Unable to connect to the server: dial tcp 192.168.0.132:16443: connect: no route to host解决
  详细解决方案

Unable to connect to the server: dial tcp 192.168.0.132:16443: connect: no route to host解决

热度:7   发布时间:2024-02-27 04:15:40.0

项目场景:

vmware部署k8s集群,用于学习。挂起vm后重新启动,执行任何命令都报如下提示:

Unable to connect to the server: dial tcp 192.168.0.132:16443: connect: no route to host

查询显卡信息,发现虚拟ip:132未生效:

ip a s ens33
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000link/ether xxxxxxxxxxxxxxxxxxxxxxinet 192.168.0.130/24 brd 192.168.0.255 scope global ens33valid_lft forever preferred_lft foreverinet6 xxxxxxxxxxxxxxxxxxxxxx scope link valid_lft forever preferred_lft forever

重启keepalived,问题解决

# systemctl restart keepalived.service
# ip a s ens33
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000link/ether xxxxxxxxxxxxxxxxxxxxxxinet 192.168.0.130/24 brd 192.168.0.255 scope global ens33valid_lft forever preferred_lft foreverinet 192.168.0.132/32 scope global ens33valid_lft forever preferred_lft foreverinet6xxxxxxxxxxxxxxxxxxxxxx scope link valid_lft forever preferred_lft forever
  相关解决方案