当前位置:   article > 正文

Istio 错误: 502 UPE upstream_reset_before_response_started{protocol_error}_istio 502

istio 502

以下是使用 curl 命令请求 istio-proxy 中输出的错误日志

[2022-06-15T01:52:04.608Z] "GET /headers HTTP/1.1" 502 UPE upstream_reset_before_response_started{protocol_error} - "-" 0 87 3 - "-" "curl/7.83.1-DEV" "c1e77399-9dd6-9261-9e8a-3f4ebc8ecd87" "egress-httpbin.com:32505" "192.168.2.224:32505" outbound|32505||egress-httpbin.com 10.250.90.191:59768 240.240.0.1:32505 10.250.90.191:35884 - default
[2022-06-15T01:52:11.942Z] "GET /headers HTTP/1.1" 502 UPE upstream_reset_before_response_started{protocol_error} - "-" 0 87 2 - "-" "curl/7.83.1-DEV" "69ec264c-4706-95e3-ae49-422e224d0b6f" "egress-httpbin.com:32505" "192.168.2.224:32505" outbound|32505||egress-httpbin.com 10.250.90.191:59874 240.240.0.1:32505 10.250.90.191:35990 - default
[2022-06-15T01:52:12.510Z] "GET /headers HTTP/1.1" 502 UPE upstream_reset_before_response_started{protocol_error} - "-" 0 87 2 - "-" "curl/7.83.1-DEV" "f8bb8432-a0bd-9e29-9fc6-261c96969ed4" "egress-httpbin.com:32505" "192.168.2.224:32505" outbound|32505||egress-httpbin.com 10.250.90.191:59886 240.240.0.1:32505 10.250.90.191:36002 - default
  • 1
  • 2
  • 3

场景就是使用 service entry 引入了网格外的服务然后测试就发生了错误。经过排查发现在 service entry ports 中端口协议设置错误

apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
  name: ext-egress-httpbin
  namespace: servicemesh-sleep
spec:
  endpoints:
  - address: 192.168.2.224
    ports:
      http-32505: 32505
  exportTo:
  - '*'
  hosts:
  - egress-httpbin.com
  ports:
  - name: http-32505
    number: 32505
    protocol: grpc
  resolution: DNS
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19

更新为

apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
  name: ext-egress-httpbin
  namespace: servicemesh-sleep
spec:
  endpoints:
  - address: 192.168.2.224
    ports:
      http-32505: 32505
  exportTo:
  - '*'
  hosts:
  - egress-httpbin.com
  ports:
  - name: http-32505
    number: 32505
    protocol: http
  resolution: DNS
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/神奇cpp/article/detail/915639
推荐阅读
相关标签
  

闽ICP备14008679号