专栏中心

EEPW首页 > 专栏 > kubelet报listen tcp [::1]:0: bind问题解决

kubelet报listen tcp [::1]:0: bind问题解决

发布人:天翼云开发者 时间:2025-08-15 来源:工程师 发布文章

本文分享自天翼云开发者社区《kubelet报listen tcp [::1]:0: bind问题解决》,作者:SummerSnow

目录

1.环境目录
2.问题现象
3.问题定位
4.问题解决

环境介绍
# k8s集群环境如下:[root@k8s-master][~]
$ kubectl versionClient Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.0", GitCommit:"xxx", GitTreeState:"clean", BuildDate:"xxx", GoVersion:"go1.17.3", Compiler:"gc", Platform:"linux/amd64"}

[root@k8s-master][~]
$kubectl get nodeNAME         STATUS   ROLES                  AGE    VERSIONk8s-master   Ready    control-plane,master   559d   v1.23.0k8s-node1    Ready    <none>                 559d   v1.23.0k8s-node2    Ready    <none>                 559d   v1.23.0# 系统环境信息[root@k8s-master][~]
$cat /etc/redhat-release 
CentOS Linux release 7.7.1908 (Core)
问题现象
#1 在master节点查看node节点信息的时候报NotReady[root@k8s-master][~]
$kubectl get nodeNAME         STATUS     ROLES                  AGE    VERSIONk8s-master   Ready      control-plane,master   559d   v1.23.0k8s-node1    Ready      <none>                 559d   v1.23.0k8s-node2   NotReady    <none>                 559d   v1.23.0#2 登录k8s-node2,查看kubelet状态,处于restarting状态[root@k8s-node2][~]
$systemctl status kubelet#3 查看日志,出现报错[root@k8s-node2][~]
$journalctl -fu kubelet
.........
Streaming server stopped unexpectedly" err="listen tcp [::1]:0: bind: cannot assign requested address
.........
问题定位
#1 初步判定 
通过报错信息 [::1]:0: bind 可以判断回环地址有问题

#2 查看hosts配置信息,发现没配置本地解析信息[root@k8s-node2][~]$cat /etc/hosts

xx.xx.xx.xx k8s-master
xx.xx.xx.xx k8s-node1
xx.xx.xx.xx k8s-node2
问题解决
#问题原因已找到,接下来就是解决问题#1 在hosts添加以下信息[root@k8s-node2][~]
$vim /etc/hosts127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4
::1     localhost localhost.localdomain localhost6 localhost6.localdomain6#2 重启kubelet[root@k8s-node2][~]
$systemctl restart kubelet#3 查看kubelet状态,已经处于running[root@k8s-node2][~]
$systemctl status kubelet#4 登录master节点查看node信息,已经变成ready了[root@k8s-master][~]
$kubectl get nodeNAME         STATUS   ROLES                  AGE    VERSIONk8s-master   Ready    control-plane,master   559d   v1.23.0k8s-node1    Ready    <none>                 559d   v1.23.0k8s-node2    Ready    <none>                 559d   v1.23.0#5 查看是否还有异常pod,通过命令查看已经无异常pod了[root@k8s-master][~]
$kubectl get pod -A |grep -v Running


专栏文章内容及配图由作者撰写发布,仅供工程师学习之用,如有侵权或者其他违规问题,请联系本站处理。 联系我们

关键词: 容器

相关推荐

2019年,从云、边缘计算再到容器,数字经济将进入元年

智能计算 2019-01-17

容器到外部环境的热阻

模拟技术 2010-06-17

红帽任命Matt Hicks为总裁兼CEO

如何设计容器来实践AI模型的PnP

智能计算 2023-10-30

Wind River Linux荣获2019年度Questex Fierce创新奖

嵌入式系统 2019-12-06

密封容器漏水监测和无线报警系统

基于单片机的密闭容器内压力控制系统设计

铝电解电容器基本原理及基本电气参数诠释

高速PCB设计中电容器的选择

资源下载 2013-09-18

钽电解电容器应用指南

资源下载 2013-09-18

通用温度液位集散控制系统的研究

电源用电容器的选择

资源下载 2013-09-17

虚拟机已死 容器才是未来?

邬贺铨院士谈 ICT的演进与创新 

容器到外部的热阻分析

模拟技术 2012-06-13
更多 培训课堂
更多 焦点
更多 视频

技术专区