Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

java.net.SocketException: Failed to read from SocketChannel: Connection reset by peer

You might have seen the java.net.SocketException: Failed to read from SocketChannel: Connection reset by peer error while working with Java NIO based server which is using SocketChannel instead of InputStream for reading data from the network. In general, this can come at both client and server end of a client-server Java application which is using TCP/IP to connect each other. Though, this exception usually comes at the server end and client was complaining that they are not able to connect. From the error message, it's quite clear that before client or server could read the data from SocketChannel, another party has disconnected the session. Let's see the root cause of the problem and how to solve java.net.SocketException: Failed to read from SocketChannel: Connection reset by a peer in Java application. On similar note, if you have not read any book on Java NIO or Socket programming, then you should read at least one this year, TCP/IP Sockets in Java, Second Edition: Practical Guide for Programmers good be great one.
Read more »

Java, Unix, Tibco RV and FIX Protocol Tutorial


This post first appeared on Javarevisited: Blog About Java Programmin, please read the originial post: here

Share the post

java.net.SocketException: Failed to read from SocketChannel: Connection reset by peer

×

Subscribe to Javarevisited: Blog About Java Programmin

Get updates delivered right to your inbox!

Thank you for your subscription

×