question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NativeIoException: readAddress(..) failed: Connection timed out

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
BBartoszcommented, Jul 1, 2021

@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)

0reactions
trajanocommented, Apr 5, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequent "Connection timed out" errors when calling ...
Hi there! We are building a service to manage users and organizations using the Management API. However, our calls to the Management API ......
Read more >
How to handle "io.netty.channel.unix.Errors ...
How to handle "io.netty.channel.unix.Errors$NativeIoException: readAddress(..) failed: Connection reset by peer" in WebClient Springboot.
Read more >
readAddress(..) failed: Connection reset by peer - ASF JIRA
Errors$NativeIoException will occur sometime when we run TPCDS based on master, the full exception stack is Caused by: ...
Read more >
reactor/reactor-netty - Gitter
Hi, I am trying to handle a NativeIoException and trying to retry when I get it. ... then recv-q looks like full, and...
Read more >
Fatal error occurred when handling a client connec... - Neo4j
Errors$NativeIoException: readAddress(..) failed: Connection timed out at io.netty.channel.unix.Errors.newIOException(Errors.java:122) at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found