我们正在使用 grpc 进行微服务间通信。我们正在使用 grpc 版本:1.2.0。对于特定测试,我们不断从其中一个微服务中看到此错误:
io.grpc.StatusRuntimeException: INTERNAL: Connection closed with unknown cause
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:141)
at io.grpc.stub.ServerCalls$1$1.onHalfClose(ServerCalls.java:148)
at io.grpc.internal.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:152)
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:227)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:208)
这只发生在最初的几个调用中,或者第一个尝试使用 grpc 调用另一个微服务的测试中。后续调用成功,使用相同的代码路径成功。所有微服务都已启动并正在运行。
有任何想法吗?