当前位置:网站首页>upstream connect error or disconnect/reset before headers. reset reason: connection termination

upstream connect error or disconnect/reset before headers. reset reason: connection termination

2021-01-18 17:38:40 RandolphCYG

  • 错误:upstream connect error or disconnect/reset before headers. reset reason: connection termination

  • 环境:k8s部署的django后端

  • 发生场景:外部应用|postman|脚本 向后端发送post请求,api/handleOrders,返回状态码是503

  • 后端容器启动正常:

  • istio-proxy kubectl logs -f husky-web-7fd95dcff6-9clqx -n pdm-platform istio-proxy

  • 脚本发请求

  • 探究步骤: 通过搜索错误,反应的全是istio-proxy,然后需要在部署文件中加探针的方法, 我添加了发送命令的就绪探针:

readinessProbe:
  exec:
    command:
      - curl
      - -X POST
      - http://localhost/api/handleOrders
  initialDelaySeconds: 5
  timeoutSeconds: 1

结果是istio-proxy pod没有起来:

也添加了httpGet的就绪探针:

livenessProbe:
  httpGet:
    path: /api/handleOrders
    port: 3033
    httpHeaders:
  initialDelaySeconds: 5
  periodSeconds: 5

结果是: 用脚本发post请求是一样的错误

版权声明
本文为[RandolphCYG]所创,转载请带上原文链接,感谢
https://my.oschina.net/randolphcyg/blog/4893229

随机推荐