Istio 错误: 502 UPE upstream_reset_before_response_started{protocol_error}

以下是使用 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

场景就是使用 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

更新为

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值