We are using grpc for inter microservice communication. We are using grpc version: 1.2.0. For a particular test we keep seeing this error from one of the microservice:
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)
This happens only for the first few calls, or the first test that is trying to call another microservice using grpc. Subsequent calls are successful using the same code path are successful. All microservices are up and running.
Any ideas?
At least in my case this problem was a version mismatch between io.grpc (1.4.0) and io.netty (4.1.27.FINAL). I had to explicitly set the io.netty version to 4.1.11.FINAL in my build.gradle file and suddenly the exception was gone.
Unfortunately I could not find any information on which version of grpc works with which versions of netty.
I hope this helps you.