why am i getting status Unknown upon UnresolvedAddressException

25 views
Skip to first unread message

Elhanan Maayan

unread,
Apr 21, 2020, 10:37:30 AM4/21/20
to grpc.io
hi..
when using 
NettyChannelBuilder.forAddress(new InetSocketAddress(address,443)).sslContext(sslContext); 

with an a host that doesn't exist i get back a status error code if unknown with UnresolvedAddressException 

however 
when trying 
final NettyChannelBuilder nettyChannelBuilder = NettyChannelBuilder.forAddress(address,443).sslContext(sslContext);

with the same host i'm getting UnknownHostExcetpion with Status Unavailable 

i would have expected to get Unavailable for the UnknownAddressException too 

Jihun Cho

unread,
Apr 21, 2020, 1:09:06 PM4/21/20
to Elhanan Maayan, grpc.io
InetSocketAddress itself can resolve the hostname. if it fails you get the UnresolvedAddressException, if you pass the name you get the error from name resolver.

I do agree that they both should have the same status Unavailable since it is a standard exception. can you file an issue on github?

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/ea91958c-02fb-42e2-a1aa-f774a2940086%40googlegroups.com.

Elhanan Maayan

unread,
Apr 21, 2020, 1:17:50 PM4/21/20
to grpc.io


On Tuesday, April 21, 2020 at 8:09:06 PM UTC+3, Jihun Cho wrote:
InetSocketAddress itself can resolve the hostname. if it fails you get the UnresolvedAddressException, if you pass the name you get the error from name resolver.

I do agree that they both should have the same status Unavailable since it is a standard exception. can you file an issue on github?

On Tue, Apr 21, 2020 at 7:37 AM Elhanan Maayan <elh....@gmail.com> wrote:
hi..
when using 
NettyChannelBuilder.forAddress(new InetSocketAddress(address,443)).sslContext(sslContext); 

with an a host that doesn't exist i get back a status error code if unknown with UnresolvedAddressException 

however 
when trying 
final NettyChannelBuilder nettyChannelBuilder = NettyChannelBuilder.forAddress(address,443).sslContext(sslContext);

with the same host i'm getting UnknownHostExcetpion with Status Unavailable 

i would have expected to get Unavailable for the UnknownAddressException too 

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grp...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages