I am trying to create grpc service client in Java where server is in goLang and deployed with the https . where I am trying to achieve a non-secured connection [I don't want to pass the certificate ]
public class testgrpc {
ManagedChannel channel ;
ServiceGrpc.ServiceBlockingStub blockingStub;
String host = "remotesecuredhost";
int port ="XXX";
@Test
public void testgrpc()
{
channel = ManagedChannelBuilder.forAddress(host,port).build();
blockingStub = ServiceGrpc.newBlockingStub(channel);
response = blockingStub.health(Empty.newBuilder().build());
}
}
the above code gives following exception
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:221)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:202)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:131)
can someone help with Client code