grpc代理
1、reset reason: protocol error
2022-12-05 16:10:05.017 [main] ERROR com.tsingj.privpy.sdk.client.grpc.TmGrpcClient : registerToTm err
io.grpc.StatusRuntimeException: UNAVAILABLE: upstream connect error or disconnect/reset before headers. reset reason: protocol error
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156)
at
所以在envoy配置中clusters要配置以下内容,至少协议对了
http2_protocol_options:
max_concurrent_streams: 100
效果
clusters:
- name: my_custom_svc
http2_protocol_options:
max_concurrent_streams: 100
connect_timeout: 30s
type: static
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: service1
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 192.168.20.237
port_value: 8080
HTTP代理
1、filter中的配置
Envoy出现Didn‘t find a registered implementation for ‘envoy.filters.http.router‘ with type URL: ‘‘解决办法
配置如下时有问题
- name: envoy.filters.http.router
typed_config: { }
需要增加具体的配置
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
参考
Envoy作grpc代理
Envoy出现Didn‘t find a registered implementation for ‘envoy.filters.http.router‘ with type URL: ‘‘解决办法