• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.net.SocketException: Connection reset by peer: socket write error  RSS feed

 
Suchi Choudhary
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i had developed a application in which i am using SMPP for sending SMS.

after some time of binding, i get error
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
at com.knowcross.gmhs.smpp.TCPIPConnection.send(TCPIPConnection.java:355)
at com.knowcross.gmhs.smpp.Transmitter.send(Transmitter.java:69)
at com.knowcross.gmhs.smpp.Session.send(Session.java:931)
at com.knowcross.gmhs.smpp.Session.send(Session.java:986)
at com.knowcross.gmhs.smpp.Session.enquireLink(Session.java:740)
at com.knowcross.gmhs.smpp.Session.enquireLink(Session.java:766)
at com.knowcross.gmhs.smpp.controller.SMPPReceiver$EnquiryLink.enquireLink(SMPPReceiver.java:220)
at com.knowcross.gmhs.smpp.controller.SMPPReceiver$EnquiryLink.run(SMPPReceiver.java:173)

this error usally come after the SMSC resatarted their server. after getting this error i unbind first(but it throws the same error again) n then send the bind request again(says the transmitter/recevier is already bounded).

as this is done in a thread, the error keeps on coming.
Anybody having some idea.
 
Harvinder Thakur
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the look of it seems that you are not properly closing the socket connection before restarting the server. Maybe a finally block to close the socket resources should work.
But some actual code might be able to help me in helping you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!