It's possible you're trying to write to a connection that's already closed. Another cause for this is that you closed the socket with unread data in the socket receive buffer.
This might be caused by unmatching versions of SSL. Java starts normally with SSLv2 and your server might not be able to negotiate. You have to force Java to use SSLv3. See this comment: https://goo.gl/hx0YB3
java.net.SocketException: Connection reset [b]main, SEND SSLv3 ALERT: fatal, description = unexpected_message[/b] main, WRITE: SSLv3 Alert, length = 2 Exception sending alert: java.net.SocketException: Broken pipe main, called closeSocket() java.net.SocketException: Connection resetat java.net.SocketInputStream.read(SocketInputStream.java:168)at com.ibm.jsse2.a.a(Unknown Source)at com.ibm.jsse2.a.a(Unknown Source)at com.ibm.jsse2.by.a(Unknown Source)at com.ibm.jsse2.by.l(Unknown Source)at com.ibm.jsse2.by.startHandshake(Unknown Source)at afb.mad.com.net.SSLSupport.handshake(SSLSupport.java:139)at afb.mad.com.net.ComFTPSClient.main(ComFTPSClient.java:804)