facebookarchive / swift

An annotation-based Java library for creating Thrift serializable types and services.
Apache License 2.0
900 stars 297 forks source link

Stable UnresolvedAddressException on particular method #331

Closed vicmosin closed 6 years ago

vicmosin commented 7 years ago

I have very weird behavior in once of service implementations use swift.. The call stable fails with

java.nio.channels.UnresolvedAddressException: null
        at sun.nio.ch.Net.checkAddress(Net.java:101) ~[na:1.8.0_92-internal]
        at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:622) ~[na:1.8.0_92-internal]
        at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:108) [netty-3.10.5.Final.jar!/:na]

but previous methods work fine, the server side also has no mention of error in this case. No load-balancer or so at environment. What it can be?

SergeyMakarenko commented 7 years ago

Hi, How could I reproduce this? Thanks

dain commented 7 years ago

The sun.nio.ch.SocketChannelImpl.connect is simply validating the InetAddress by calling java.net.InetSocketAddress#isUnresolved, and it is reporting that the name could not be resolved to an address. I would guess this was caused by a DNS or network hiccup.