1

I'm getting the following error when deployed to a remote host:

Wrapped by: io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AnnotatedConnectException: connect(..) failed: Address family not supported by protocol: /somegrpcservice-grpc.abc.com:443
Wrapped by: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
    at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:271)
    at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:252)
    at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:165)

I'm deploying using a fatjar, when run locally everything fine. It is only when the service is deployed to a remote host. Some things I've already tried:

  • Various version of io.grpc:grpc-netty-shaded from 1.30.0 to 1.53.0
  • Running Ncat from the remote host and successfully connecting
  • Setting system property: -Djava.net.preferIPv4Stack=true

None of these seemed to make a difference. Appreciate if anyone else has any ideas. Thanks!

1 Answers1

1

Found the solution for my particular case here:

gRPC UnsupportedAddressTypeException, but only when packaged with shadowJar

Apparently my fat jar was being packaged incorrectly and I needed to use the mergeServiceFiles() function from shadowJar in order to merge my service files.

Eric Anderson
  • 24,057
  • 5
  • 55
  • 76