NativeIoException: readAddress(..) failed: Connection timed out
See original GitHub issueI’m facing an exception from Netty. My tests restarted the client and server throw out the netty exception.
io.netty.channel.unix.Errors$NativeIoException: readAddress(…) failed: Connection timed out at io.netty.channel.unix.Errors.newIOException(Errors.java:122) ~[netty-all-4.1.27.Final.jar:4.1.27.Final] at io.netty.channel.unix.Errors.ioResult(Errors.java:146) ~[netty-all-4.1.27.Final.jar:4.1.27.Final] at io.netty.channel.unix.FileDescriptor.readAddress(FileDescriptor.java:178) ~[netty-all-4.1.27.Final.jar:4.1.27.Final] at io.netty.channel.epoll.AbstractEpollChannel.doReadBytes(AbstractEpollChannel.java:343) ~[netty-all-4.1.27.Final.jar:4.1.27.Final] at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:794) [netty-all-4.1.27.Final.jar:4.1.27.Final] at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:417) [netty-all-4.1.27.Final.jar:4.1.27.Final] at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:317) [netty-all-4.1.27.Final.jar:4.1.27.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) [netty-all-4.1.27.Final.jar:4.1.27.Final] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_192]
Expected behavior
Actual behavior
Steps to reproduce
Minimal yet complete reproducer code (or URL to code)
Netty version
JVM version (e.g. java -version
)
OS version (e.g. uname -a
)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top GitHub Comments
@trajano Had the same problem, you have to set idleTimeout in grpcJava. I think also keepAlive might help you but in my case idleTimeout set to 2 minutes was better approach. Differences between them you can find in this answer: https://stackoverflow.com/questions/57930529/grpc-connection-use-keepalive-or-idletimeout
For people non using grpcJava and having this issue in netty: set the idleTimeout to smaller value than default (30 mins afaik)
I’m getting the same issue but with GRPC Java. It occurs randomly. I am trying to find the API documentation for
readAddress
it appears to be a DNS lookup which would mean it is before the call.