aspose file tools*
The moose likes Java in General and the fly likes Connection reset vs. connection reset by peer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Connection reset vs. connection reset by peer" Watch "Connection reset vs. connection reset by peer" New topic
Author

Connection reset vs. connection reset by peer

san jan
Greenhorn

Joined: Sep 26, 2000
Posts: 24
Hi,
I get this problem "java.net.SocketException: Connection reset"
We are using socket pooling. Ours is a web application that internally connects to a legacy application through sockets.
This happens if we login to a page and keep it like that for 1 day and then retry to opertae something. i.e., the sockets are kep[t idle for a day and are tried to be used. it gives error while reading not while writing.
And is this different from "connection reset by peer" if so how much different?
If it is connection reset by peer then probably we can use 'setKeepAlive()' but I donot see it as like that, since the socket is not closed and we are able to write but the problem comes at the time of reading.
Thanks,
Santosh
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
"connection reset" means the connection times out on your end, "connection reset by peer" means it times out on the other end or is lost due to network conditions (which possibly can also trigger "connection reset", not quite sure there).


42
san jan
Greenhorn

Joined: Sep 26, 2000
Posts: 24
Thanks for the information. Any idea in what cases this may occur at the client side? and how to handle this...as this is observed to occur very vaguely.
If it is because of timing out at the time of reading then we are not using setSoTimeOut() for these sockets.
[ September 25, 2003: Message edited by: santu j ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection reset vs. connection reset by peer