【发布时间】:2020-10-09 13:46:27
【问题描述】:
我正在尝试在我的服务之间使用 GRPC。我只有三个服务。其中两个在 k8s 中运行。 GCP 中的一个。 我从 GCP 中的服务调用其他服务。我为我的存根使用相同的 NettyChannelBuilder。客户端每秒的请求率相同。我在构建器中设置了 keepAliveWithoutCalls=true, keepAliveTime, idleTimeout。 不幸的是,我定期从一个客户那里得到这个错误?
io.grpc.StatusRuntimeException: UNAVAILABLE: upstream connect error or disconnect/reset before headers. reset reason: connection failure
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:233)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:214)
谁能帮我找到解决办法? 我已经在 github 上阅读了很多问题。现在,我将为呼叫设置重试策略,但这不是最佳解决方案。
【问题讨论】:
标签: java kubernetes netty grpc