Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.3k views
in Java FTP by (320 points)
I'm stumped! I get java.net.SocketException: Connection reset by peer: socket write error

when I call ftp.quit(). Yes, I am checking ftp.connected() first. "ftp" is an instance of SSLFTPClient.

The program works beautifully otherwise! Downloads, uploads, wildcards, no problem. I just can't seem to logout!

Help!

3 Answers

0 votes
by (162k points)
This can be a problem with some FTPS servers that are non-standard - the server abruptly closes the connection without sending an acknowledgement to the client. This error can be prevented by passing DISABLE_SSL_CLOSURE (in SSLFTPClient.ConfigFlags) into the SSLFTPClient constructor.

If this doesn't work, can you please post the debug log (see the Dev Guide) and the stack trace.

I'm stumped! I get java.net.SocketException: Connection reset by peer: socket write error

when I call ftp.quit(). Yes, I am checking ftp.connected() first. "ftp" is an instance of SSLFTPClient.

The program works beautifully otherwise! Downloads, uploads, wildcards, no problem. I just can't seem to logout!

Help!
0 votes
by (320 points)
I guess I'm dealing with a non-standard server - setting DISABLE_SSL_CLOSURE solved the problem. Thanks!!

(btw, the constructor you're referring to is deprecated - I used setConfigFlags.)
0 votes
by (162k points)
Oh yes, so it is. Glad it is working for you now.

I guess I'm dealing with a non-standard server - setting DISABLE_SSL_CLOSURE solved the problem. Thanks!!

(btw, the constructor you're referring to is deprecated - I used setConfigFlags.)

Categories

...