IntelliJ Java IDE
The moose likes Sockets and Internet Protocols and the fly likes JVM_recv -connection reset by peer Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "JVM_recv -connection reset by peer" Watch "JVM_recv -connection reset by peer" New topic
Author

JVM_recv -connection reset by peer

raj sekhar
Ranch Hand

Joined: Oct 16, 2001
Posts: 117

I am trying to connect to a mainframe with hostid and port using plain socket connection.I am able to send the data but while receiving, I am experiencing problems though I am closing(the connection)only after everything is done.
I am getting a SocketException with the msg: JVM_recv connection reset by peer.Am using jdk1.2.2.
What might be the reason for this error.Its frustrating.Can anybody help?
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7231

Yes, that particular message is a frustrating one. It is the dreaded message in any form of network communication because it amounts to "something went wrong, probably on the other side, and it looks like they dropped the socket on us."
That's where you should look first for a solution to this problem. Examine the interaction from the server perspective, if you can. The alternative tedious; and more likely to reveal a symptom rather than a condition: walk through and log each step of your own code, and determine where exactly things are breaking up. If it's consistent, try reproducing the failure to nail it down. Finally, tell someone with control of the remote side what's going on and ask if they know what could be causing it.
We were going through a similar thing on JavaRanch last week. I'd try to connect, and for moments here and there I would get "Connection reset by peer," which is the no-man's land between "Connection denied" and appearing to hang. The rest of the time I got "the server appears to be down." For me, the resets weer just enough encouragement to keep trying, when in fact all it meant was, someone was responding just enough to say it couldn't help me. Arg.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
 
 
subject: JVM_recv -connection reset by peer
 
Threads others viewed
Image transfer through sockets
visual J++ and retreiving rows from sql server
Remote debugging with Jdeveloper/weblogic
what does this Exception mean???thanx!@!!!
Got error message "Connection reset by peer"
developer file tools