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

目录

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

环境介绍

# k8s集群环境如下:
[root@k8s-master][~]
$ kubectl version
Client 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 node
NAME STATUS ROLES AGE VERSION
k8s-master Ready control-plane,master 559d v1.23.0
k8s-node1 Ready <none> 559d v1.23.0
k8s-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 node
NAME STATUS ROLES AGE VERSION
k8s-master Ready control-plane,master 559d v1.23.0
k8s-node1 Ready <none> 559d v1.23.0
k8s-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/hosts
127.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 node
NAME STATUS ROLES AGE VERSION
k8s-master Ready control-plane,master 559d v1.23.0
k8s-node1 Ready <none> 559d v1.23.0
k8s-node2 Ready <none> 559d v1.23.0 #5 查看是否还有异常pod,通过命令查看已经无异常pod了
[root@k8s-master][~]
$kubectl get pod -A |grep -v Running

kubelet报listen tcp [::1]:0: bind问题解决的更多相关文章

  1. docker启动报错 (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport

    今天修改完docker宿主机的防火墙文件 vim /etc/sysconfig/iptables 停止容器再启动时 报如下错误 (iptables failed: iptables --wait -t ...

  2. nuxt npm run dev 报错Solution to the "Error: listen EADDRINUSE 127.0.0.1:8080"

    Solution to the "Error: listen EADDRINUSE 127.0.0.1:8080" Hello, Just sharing a solution t ...

  3. Go丨语言对数据库操作报错 panic: dial tcp 127.0.0.1:3306: connectex: No connection could be made because the target machine actively refused it.

    panic: dial tcp 127.0.0.1:3306: connectex: No connection could be made because the target machine ac ...

  4. vue运行时 eslint 报“import/first” WARN deprecated browserslist 问题解决

    vue运行时 eslint 报“import/first”  WARN deprecated browserslist 问题解决 这个信息的意思是导入文件顺序不对,绝对导入应该放在相对导入前面.将绝对 ...

  5. 转 : Apache启动报错:could not bind to address [::]:443 解决办法

    转:Apache启动报错:could not bind to address [::]:443 解决办法 安装Apache服务器的时候,报如下错误: Installing the 'apache' s ...

  6. 解决 AUTH` failed: ERR Client sent AUTH, but no password is set [tcp://127.0.0.1:6379]

    页面报错: ConnectionException In AbstractConnection.php line 155 AUTH` failed: ERR Client sent AUTH, but ...

  7. 鏈接Redis報錯`AUTH` failed: ERR Client sent AUTH, but no password is set [tcp://127.0.0.1:6379]

    問題 鏈接Redis報錯`AUTH` failed: ERR Client sent AUTH, but no password is set [tcp://127.0.0.1:6379] 解決 啟動 ...

  8. Error: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: getsockopt: connection refused

    配置docker网络flannel时,配置etcd的key的时候出现以下错误 Error:  client: etcd cluster is unavailable or misconfigured; ...

  9. Cannot send, channel has already failed: tcp://127.0.0.1:8161

    解决方案一 我觉得你可能需要把服务完全停掉了 然后重启一下. http://localhost:8161(管理端口) tcp://127.0.0.1:61616(服务端口)

  10. 解决Mac nginx问题 [emerg] 54933#0: bind() to 0.0.0.0:80 failed (13: Permission denied)

    brew services restart nginx Stopping nginx... (might take a while) ==> Successfully stopped nginx ...

随机推荐

  1. Spring Boot 整合 JMS(Active MQ 实现)

          我们使用jms一般是使用spring-jms和activemq相结合,通过spring Boot为我们配置好的JmsTemplate发送消息到指定的目的地Destination.本文以点到 ...

  2. sqlite:No module named _sqlite3

    执行代码报错:"sqlite:No module named _sqlite3" 执行环境说明 某台服务器上执行DrissionPage相关程序报错,本机没有问题. 解决说明 本机 ...

  3. 解决DevToolsActivePort file doesn't exist

    今天遇到个小问题:selenium 启动 chrome crash,报错:DevToolsActivePort file doesn't exist. 在option中添加一下几行: option = ...

  4. 【2020.12.02提高组模拟】球员(player) 题解

    [2020.12.02提高组模拟]球员(player) 题解 题意描述 基本的递推. ①所有运动员姓氏的长度必须不同. ②每个运动员的姓氏必须是长度比其长的所有其他运动员姓氏的连续子串 潜在的球员分成 ...

  5. 浅谈RMI、JRMP、JNDI

    目录 RMI 概念: 为什么要有RMI? RMI的构成: 如何使用RMI 注意!!! JRMP(是RMI的通信协议的名字) 概念 查看通信过程 工具使用 攻击Server 攻击Client JNDI ...

  6. 效能时代,数栈专属DevOps跑出加速度

    ​ 一.浅析DevOps 互联网的发展形同潮水,来势汹汹.快而迅猛,企业业务日益庞大的同时伴随着团队规模的扩大,业务的复杂度与关联性显著提升的同时对效能也有了更高的要求,高效协同之间,我们既要追求快速 ...

  7. [abc309 G] Ban Permutation

    G - Ban Permutation 首先看到绝对值,很烦,考虑取掉绝对值得到\(p_i\leq i-X\)或\(p_i\geq i+X\) 然后我们就自然而然有了一个暴力的想法,设\(dp[i][ ...

  8. Windows Server 2025激活教程

    Windows Server 如何把评估版升级改为正式版本并激活 微软官方并不提供server系统的正式版本,只提供测试的评估版本,那么我们怎么修改为正式版本呢? 1.确认版本 开始----运行--- ...

  9. vscode删除空行和注释

    打开VScode,按Ctrl + H 打开替换框,切换正则模式 单行注释: //[\s\S]*?\n 多行注释:/\*(.|\r\n|\n)*?\*/ 所有注释:\/\*[\s\S]*\*\/|\/\ ...

  10. 基于 doo-sabin的细分

    简介 没有 cc 细分好. 参考链接 http://graphics.stanford.edu/courses/cs468-10-fall/LectureSlides/10_Subdivision.p ...