Results 1 to 3 of 3
  1. #1
    faisalhameed is offline Member
    Join Date
    Jan 2010
    Location
    Lahore
    Posts
    5
    Rep Power
    0

    Default java.net.SocketException: Connection closed by remote host

    I am getting an exception on client side during login.Most of the time i connect successfully but some time this exception is occured.
    Please tell me what should i do?

    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection closed by remote host
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEO F(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkWr ite(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write (Unknown Source)
    at java.io.ObjectOutputStream$BlockDataOutputStream.d rain(Unknown Source)
    at java.io.ObjectOutputStream$BlockDataOutputStream.s etBlockDataMode(Unknown Source)
    at java.io.ObjectOutputStream.writeNonProxyDesc(Unkno wn Source)
    at java.io.ObjectOutputStream.writeClassDesc(Unknown Source)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unk nown Source)
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.writeFatalException(Unk nown Source)
    at java.io.ObjectOutputStream.writeObject(Unknown Source)
    at project.io.MessageOutputStream.writeObject(Message OutputStream.java:74)
    at project.network.TCPLink.writeData(TCPLink.java:204 )
    at project.MainFrame.sendRefDataRequest(MainFrame.jav a:1968)
    at project.MainFrame.initialize(MainFrame.java:522)
    at project.MainFrame.<init>(MainFrame.java:274)
    at project.ApplicationMain.<init>(ApplicationMain.jav a:79)
    at project.ApplicationMain.main(ApplicationMain.java: 140)
    Caused by: javax.net.ssl.SSLException: java.net.SocketException: Connection closed by remote host
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLExceptio n(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(U nknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(U nknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleE xception(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleE xception(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write (Unknown Source)
    at java.io.ObjectOutputStream$BlockDataOutputStream.d rain(Unknown Source)
    at java.io.ObjectOutputStream$BlockDataOutputStream.w rite(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteFields(Unkn own Source)
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unk nown Source)
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    ... 8 more
    Caused by: java.net.SocketException: Connection closed by remote host
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkWr ite(Unknown Source)
    ... 15 more

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  3. #3
    faisalhameed is offline Member
    Join Date
    Jan 2010
    Location
    Lahore
    Posts
    5
    Rep Power
    0

    Default

    As you can see in the stack trace i am using SSL Sockets to create connection.
    It is a simple java program.I am running server and client on the same machine.
    Please give me some hints,how can i debug it ?
    I am connecting and disconnecting client continuosly.After 5 or 6 time this exception is occured.

Similar Threads

  1. java.sql.SQLException: Closed Connection
    By sunjavaboy in forum JDBC
    Replies: 4
    Last Post: 03-21-2012, 02:38 PM
  2. Java.net.socket connection :connection closed
    By veeru541 in forum Advanced Java
    Replies: 2
    Last Post: 06-27-2010, 03:14 AM
  3. Replies: 2
    Last Post: 01-24-2010, 04:41 PM
  4. copy file from local host to remote host
    By isotoper in forum New To Java
    Replies: 4
    Last Post: 12-24-2009, 05:41 PM
  5. Replies: 2
    Last Post: 01-15-2009, 10:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •