• Post Reply Bookmark Topic Watch Topic
  • New Topic

JVM_recv -connection reset by peer  RSS feed

 
raj sekhar
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!