IntelliJ Java IDE
The moose likes Sockets and Internet Protocols and the fly likes java.net.SocketException: Connection reset Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply 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.
 
 
subject: java.net.SocketException: Connection reset
 
Threads others viewed
SSL enabled client code with client authentication
SSLSocket Read timed out issue
ObjectInputStream.readObject() hangs forever during socket communication
Brio Report ReportMartException
simple socket programming
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture