Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (7k points)

ERROR GServerHandler  - java.io.IOException: Connection reset by peer

java.io.IOException: Connection reset by peer

        at sun.nio.ch.FileDispatcher.read0(Native Method)

        at sun.nio.ch.SocketDispatcher.read(Unknown Source)

        at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)

        at sun.nio.ch.IOUtil.read(Unknown Source)

        at sun.nio.ch.SocketChannelImpl.read(Unknown Source)

        at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:323)

        at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:282)

        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:202)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

        at java.lang.Thread.run(Unknown Source)

This log is from a game server implemented using netty. What can cause this exception?

1 Answer

0 votes
by (13.1k points)

java.io.IOException: Connection reset by peer

The other side has abruptly aborted the connection in the midst of a transaction. That can have many causes which are not controllable from the server side. E.g. the end user decided to shut down the client or change the server abruptly while still interacting with your server or the client program has crashed, or the enduser’s internet connection went down, or the enduser’s machine crashed, etc.

Want to learn Java? Check out the core java certification from Intellipaat.

Browse Categories

...