相关文章推荐
直爽的荔枝  ·  Git | ...·  11 月前    · 
想出国的饼干  ·  GROUP BY 聚合函数 | ...·  2 年前    · 
傻傻的风衣  ·  python ...·  2 年前    · 
想旅行的大蒜  ·  [err] ora-00933: sql ...·  2 年前    · 
Get http://localhost:10248/healthz: dial tcp 127.0.0.1:10248: connect: connection refused. 2021-06-06 20:13:16

因为标题放不下完整的k8s初始化的错误信息,所以在文章内容中写一下完整的错误信息,可以给读者一个很好的错误信息对照参考

[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp 127.0.0.1:10248: connect: connection refused..

这里提供一个解决方法:

1.首先去查看下你的:  /etc/systemd/system/kubelet.service.d
路径下有没有一个文件:10-kubeadm.conf.
如果没有的话,你就把以下内容复制一下(注意我的k8s版本是v1.17.3,如果别的版本修改完以后,无效的话,请另寻它法)
# Note: This dropin only works with kubeadm and kubelet v1.11+
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
# This is a file that "kubeadm init" and "kubeadm join" generates at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamically
EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
# This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use
# the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this file.
EnvironmentFile=-/etc/default/kubelet
ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
  1. 如果存在这个文件的话,就在这个文件中添加一句:
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true --fail-swap-on=false"
重新启动kubelet.service
		1.systemctl daemon reload
		2.systemctl restart kubelet.service

最终解决初始化中出现的上述的问题,希望你们也可以解决问题.

情景还原: 用docker拉取jenkins最新版本 docker pull jenkins/jenkins:lts报了这个错误: Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker 一通百度,发现原来是dns服务器的错误,把服务器改成8.8.8.8或者114.114.114.114即可 具体做法: vim /etc/sysconfig/network-scripts/ifcfg-ens33 vim /et 我在部署k8s集群使用kubeadm初始化报报错,成功解决: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused. $(dom).dial('start') or $(dom).dial('start',itemValue); //开启轮盘转动 $(dom).dial('setItem',itemValue); //单纯设置值 $(dom).dial( 阿里云java源码 说明:支持阿里Teambition网盘的webdav协议,后续的2.x版本仅支持阿里云盘,不再维护Teambition网盘版本 webdav-aliyundriver 本项目实现了阿里云盘的webdav协议,只需要简单的配置一下,就可以让阿里云盘变身为webdav协议的文件服务器。 基于此,你可以把阿里云盘挂载为Windows、Linux、Mac系统的磁盘,可以通过NAS系统做文件管理或文件同步,更多玩法等你挖掘 支持refreshToken登录方式,具体看参数说明 Jar包运行 建议自己下载源码编译,以获得最新代码 webdav.jar --aliyundrive.refresh-token="your refreshToken" docker --name=webdav-aliyundriver --restart=always 8080:8080 /etc/localtime:/etc/localtime /etc/aliyun-driver/:/etc/aliyun-driver/ 打开终端直接输入 docker 命令时出现以下错误: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http:///var/run/docker.sock/v1.40/images/json: dial unix /var/run/docker.sock: connect: permission denied 解决办法: 将非root用户加入docker组 usermod -aG docker yourUser [kubelet-check] It seems like the kubelet isn’t running or healthy. [kubelet-check] The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz’ failed with error: Get http://localhost:10248/heal... 提示问题: [kubelet-check] It seems like the kubelet isn’t running or healthy. [kubelet-check] The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz’ failed with error: Get http://localhost:10248/healthz: dial tcp 127.0.0.1:10248: connect: connection Error from server: Gethttps://10.23.XX:10250/containerLogs/kpanda-system/kpanda-controller-manager-6c77785f75-htwbd/kpanda-controller-manager”: dial tcp 10.23.XX:10250: connect: no route to host 问题发现: 在集群中部署应用,查看状态,发现某个pod一直起不来。 kubectl get pod -A 问题追踪及 http://blog.csdn.net/yl419440513/article/details/6872614 java.net.ConnectException: connection failed: socket,host=localhost,port=8100,tcpNoDelay=1: java.net.ConnectException: Connection refused: c... 解决了asp.net中访http://localhost出现http500的错误环境:IIS5.1;windows xp sp3;VS20081)将ie设置中的“工具-->Internet选项-->高级-->显示友好的HTTP错误信息”,再刷新,这个主要可以在ie中看出错的原因,以下的错误现象可能各有不同,我的就是2)中所描述的。2)ie页面出现:The specified module could not be found3)根据网上搜索的设置:http://wuyiwangyi.blog.163.com