目录

一、问题描述

二、问题分析

解决方法:


一、问题描述

使用阿里云SLB做 kube-apiserver负载,查看kube-apiserver 日志一直在报 TLS handshake error 错误,100.121.5.128、100.120.70.1两个IP也不知道是从哪里来的,频率在每隔2s执行两次,问题如下:

2022/6/15 11:59:32 I0615 11:59:32.213207       1 log.go:172] http: TLS handshake error from 100.120.70.1:25664: read tcp 172.17.47.140:26443->100.120.70.1:25664: read: connection reset by peer
2022/6/15 11:59:32 I0615 11:59:32.660931       1 log.go:172] http: TLS handshake error from 100.121.5.128:18063: read tcp 172.17.47.140:26443->100.121.5.128:18063: read: connection reset by peer
2022/6/15 11:59:34 I0615 11:59:34.192356       1 log.go:172] http: TLS handshake error from 100.120.70.1:49522: read tcp 172.17.47.140:26443->100.120.70.1:49522: read: connection reset by peer
2022/6/15 11:59:34 I0615 11:59:34.746833       1 log.go:172] http: TLS handshake error from 100.121.5.128:31929: read tcp 172.17.47.140:26443->100.121.5.128:31929: read: connection reset by peer
2022/6/15 11:59:36 I0615 11:59:36.270063       1 log.go:172] http: TLS handshake error from 100.120.70.1:28159: read tcp 172.17.47.140:26443->100.120.70.1:28159: read: connection reset by peer
2022/6/15 11:59:36 I0615 11:59:36.815505       1 log.go:172] http: TLS handshake error from 100.121.5.128:45285: read tcp 172.17.47.140:26443->100.121.5.128:45285: read: connection reset by peer
2022/6/15 11:59:38 I0615 11:59:38.201727       1 log.go:172] http: TLS handshake error from 100.120.70.1:21729: read tcp 172.17.47.140:26443->100.120.70.1:21729: read: connection reset by peer

二、问题分析

1、排查未使用SLB集群无此问题

2、排查两个集群配置相同无差别

3、此IP(100.121.5.128、100.120.70.1)未在集群中与宿主机使用

4、排查阿里SLB健康检查

5、当关闭阿里云SLB健康检查后问题停止,分析阿里云健康检查问题

6、查看阿里云SLB健康检查支持两种方式:TCP协议健康检查通过发送SYN握手报文来检测服务器端口是否存活;HTTP协议健康检查通过发送HEAD/GET请求模拟浏览器的访问行为来检查服务器应用是否健康

7、尝试修改为http健康检查由于kube-apiserver使用https协议,健康检查失败

解决方法:

方法一:停掉健康检查

方法二:使用http协议调用勾选http_4xx、http_5xx

方法三:开启kube-apiserver http端口

# vim /etc/kubernetes/manifests/kube-apiserver.yaml- --enable-admission-plugins=NodeRestriction- --enable-bootstrap-token-auth=true- --etcd-cafile=/etc/kubernetes/pki/etcd/ca.pem- --etcd-certfile=/etc/kubernetes/pki/apiserver-etcd-client.pem- --etcd-keyfile=/etc/kubernetes/pki/apiserver-etcd-client-key.pem- --etcd-servers=https://172.17.47.140:2379,https://172.17.47.141:2379,https://172.17.47.142:2379- --insecure-port=0- --kubelet-client-certificate=/etc/kubernetes/pki/apiserver-kubelet-client.crt

修改:

# 修改为
- --insecure-port=8080
# ip 为不限制,默认为127.0.0.1
- --insecure-bind-address=0.0.0.0

重启服务

systemctl daemon-reload
systemctl restart docker
systemctl restart kubelet

SLB配置

参考:

docs/concepts/aws.md: document TLS handshake errors in kube-apiserver · kinvolk/lokomotive@243459f · GitHub

http: TLS handshake error from xxx.xxx.xxx.xxx:xxxx : read tcp xxx.xxx.xxx.xxx:6443->xxx.xxx.xxx.xxx相关推荐

  1. 解决:http: TLS handshake error from *

    目录 问题 解决 结尾 问题 今天以容器的形式在公网上一个部署了一个云服务,在测试环境是没有问题的,不知道为什么部署到 beta 环境就出现了问题,导致 https 协议文件访问失败. 具体报错信息如 ...

  2. docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: TLS handshake ti

    docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: TLS handshake ti ...

  3. 【Golang 中的 type A = XXX 与 type A XXXX的区别】

    Golang 中的 type A = XXX 与 type A XXXX的区别 先上代码 运行结果 结论 先上代码 package mainimport ("fmt" ) type ...

  4. docker配置代理pull报错:proxyconnect tcp: tls: first record does not look like a TLS handshake

    1.docker pull mysql报错 [root@k8s docker.service.d]# docker pull mysql Using default tag: latest Error ...

  5. 报错 proxyconnect tcp: tls: first record does not look like a TLS handshake

    使用代理时出现此报错,解决方案如下 # 报错内容 Error: looks like "https://prometheus-community.github.io/helm-charts& ...

  6. TLS Handshake failed: tls: server selected unsupported protocol version 301

    TLS Handshake failed: tls: server selected unsupported protocol version 301 问题 问题分析 解决方法 问题 使用gorm链接 ...

  7. docker 错误 request canceled while waiting for connection 或 TLS handshake timeout 解决方案

    使用docker 拉镜像的时候,出现下面的错误: net/http: request canceled while waiting for connection (Client.Timeout exc ...

  8. Cloud Foundry 运行bosh create-env时报错: TLS handshake timeout

    在Linux上使用Bosh创建Director的时候报错,如下: bosh create-env bosh-deployment/bosh.yml \--state state.json \ --va ...

  9. tls handshake timeout解决方案

    docker pull 错误 net/http: TLS handshake timeout 的解决方案有两种.问题原因 :该命令默认从docker远端镜像仓库中拉取镜像,但由于远端仓库的服务器是在国 ...

最新文章

  1. Fetch -- http请求的另一种姿势
  2. 企业建设网站之前需要做好哪些基本了解?
  3. BATCH+VBS脚本自动执行命令
  4. 检查 ABAP/4 程序用户的 权限
  5. Spring 配置解析之Properties
  6. SOAP协议初级指南(2)
  7. 【另类见解】那些要保证缓存和数据库数据一致性的最后怎么了?
  8. php 输出中文的引号,如何将php英文引号转换为中文引号
  9. 我的世界java什么时候打折_十周年特别纪念!微软《我的世界》游戏全平台最高折扣50% - IT之家...
  10. 【已解决】手机“此设备已安装证书授权中心,您的安全网络流量可能被监控”怎么办?
  11. 关于Objective-C 对象release操作的一个小问题探讨
  12. 用Scheme写Scheme编译器(三):一元运算
  13. Atitit.会员卡(包括银行卡)api的设计
  14. 使用通达信获取股票历史数据
  15. python中字节(bytes)是如何转换成整型(long)的?
  16. 关于a标签的hover问题
  17. 利用excel搭建动态图表
  18. php实现的证件照换底色功能示例【人像抠图/换背景图】
  19. 诗歌(3)—浣溪沙(细雨)
  20. python截取_python如何截取字符串中特定部分

热门文章

  1. 基于YOLOV3实现交通标志识别(Pytorch实现)
  2. 第二节-Javascript和jQuery笔记
  3. Spring Data JPA 原理与实战第十一天 Session相关、CompletableFuture、LazyInitializationException
  4. 由移动价值链到知识价值链─裕隆日产汽车案例
  5. 关于Android状态栏反色(白底黑字)的适配小总结
  6. A. Boredom(线性dp基础题)
  7. 爱康云前端项目结构和开发规范
  8. 一种Cortex-M内核中的精确延时方法
  9. PX4-Autopilot安装
  10. ffmpeg使用bsf后码流从avcc格式变成annex-b造成硬解异常