File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes java.net.SocketException: Connection reset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "java.net.SocketException: Connection reset" Watch "java.net.SocketException: Connection reset" New topic
Author

java.net.SocketException: Connection reset

Aaron Mathias
Greenhorn

Joined: Mar 15, 2009
Posts: 4
I get this error often when I am trying to write to an output stream within my companys network. Outside the network the code works fine:

java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:632)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
at java.io.OutputStream.write(OutputStream.java:58)
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:404)
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:352)
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:322)
at javapns.Push.sendPayload(Push.java:176)
at javapns.Push.alert(Push.java:47)
at com.mycompany.mobile.APNSCommunicator.sendAPNSNotification(APNSCommunicator.java:101)
at com.mycompany.mobile.APNSCommunicator.main(APNSCommunicator.java:72)

My systems guys are telling me its not a firewall issue, as they have opened the appropriate ports in the past for this service and everything was working.

What should I investigate? From what I have read online it seems that either the host is closing the connection or we are closing the connection.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.net.SocketException: Connection reset