GRPC client getting error while connecting to service UNAVAILABLE

51 views
Skip to first unread message

shobhit agarwal

unread,
Apr 18, 2024, 4:28:09 PM4/18/24
to grpc.io

I am using java grpc client which connects to grpc server.
It was working fine for last 4 months but suddenly it started failing with error:UNAVAILABLE while service was up and running,
We have checked the ping and telnet.
Even after restarting the server it's failing with same error, So we need to restart client service and it started connecting.

jar version : 1.5.1.0

This is client code:
ManagedChannelBuilder<?> grpcChannelBuilder = ManagedChannelBuilder.forAddress(serverAddress, port);

if (negotionType.equalsIgnoreCase("TLS")) grpcChannelBuilder.useTransportSecurity(); else grpcChannelBuilder.usePlaintext(); ManagedChannel channel = grpcChannelBuilder.intercept(consumerAuthGrpcInterceptor).build(); blockingStub = SmsServiceRpcGrpc.newBlockingStub(channel);

Kindly let me know is there any way to reset the connections in case of connection failure

Eric Anderson

unread,
Apr 19, 2024, 4:39:30 PM4/19/24
to shobhit agarwal, grpc.io
On Thu, Apr 18, 2024 at 1:28 PM shobhit agarwal <impish....@gmail.com> wrote:

suddenly it started failing with error:UNAVAILABLE while service was up and running

What was the error message?

Eric Anderson

unread,
Apr 22, 2024, 10:52:25 AM4/22/24
to shobhit agarwal, grpc-io
+grpc-io

error:UNAVAILABLE isn't a format that grpc-java uses. This may be your own logging. You'll need to find it and include more information from the Status. In particular, status.getDescription() and sometimes getCause() have useful information.


On Sat, Apr 20, 2024 at 2:03 AM shobhit agarwal <impish....@gmail.com> wrote:
I am getting this error only:
error:UNAVAILABLE


Reply all
Reply to author
Forward
0 new messages