Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
17k views
in Java FTP by
I use edtFTPj/SSL but I get this error:

com.enterprisedt.net.puretls.SSLHandshakeFailedException: java.net.SocketException: Connection reset
at com.enterprisedt.net.puretls.SSLConn.handshake(SSLConn.java:155)
at com.enterprisedt.net.puretls.SSLSocket.handshake(SSLSocket.java:437)
at com.enterprisedt.net.ftp.ssl.B.I(Unknown Source)
at com.enterprisedt.net.ftp.ssl.SSLFTPClient.auth(Unknown Source)

in ftp.auth(SSLFTPClient.AUTH_TLS); method.

Anybody help me.

Thanks

14 Answers

0 votes
by (161k points)
Can you post:

1. A small program isolating the problem. Or can you replicate the problem with the demo program supplied with the distribution?

2. What FTPS server are you trying to connect to?

3. The log file

I use edtFTPj/SSL but I get this error:

com.enterprisedt.net.puretls.SSLHandshakeFailedException: java.net.SocketException: Connection reset
0 votes
by
SSLFTPClient objFtp = new SSLFTPClient(
strServerName,0);

// turn off server validation
objFtp.setValidateServer(false);

// connect to the server
objFtp.connect();

objFtp.auth(SSLFTPClient.AUTH_TLS); this line get the error

Thanks
0 votes
by
SSLFTPClient objFtp = new SSLFTPClient(
strServerName,0);

// turn off server validation
objFtp.setValidateServer(false);

// connect to the server
objFtp.connect();

objFtp.auth(SSLFTPClient.AUTH_TLS); this line get the error

Thanks

The error:
com.enterprisedt.net.puretls.SSLHandshakeFailedException: java.net.SocketException: Connection reset
at com.enterprisedt.net.puretls.SSLConn.handshake(SSLConn.java:155)
at com.enterprisedt.net.puretls.SSLSocket.handshake(SSLSocket.java:437)
at com.enterprisedt.net.ftp.ssl.B.I(Unknown Source)
at com.enterprisedt.net.ftp.ssl.SSLFTPClient.auth(Unknown Source)
0 votes
by (161k points)
Seems reasonable. What FTPS server are you trying to connect to?

SSLFTPClient objFtp = new SSLFTPClient(
strServerName,0);

// turn off server validation
objFtp.setValidateServer(false);

// connect to the server
objFtp.connect();

objFtp.auth(SSLFTPClient.AUTH_TLS); this line get the error

Thanks
0 votes
by
The server ftp is proftpd run in Red Hat.

explicit and pasiv.

Thanks
0 votes
by (51.2k points)
The server ftp is proftpd run in Red Hat.

explicit and pasiv.

Thanks


We regularly test against ProFTPD 1.2.9 (with the mod_tls module) so we are confident that that works OK (although you need to use the DISABLE_WAIT_ON_CLOSE flag in the SSLFTPClient constructor).

Could you please make sure that your ProFTPD server actually has the mod_tls module installed and enabled? Then I'd suggest trying to connect to it using a stand-alone FTPS-capable FTP client such as FileZilla. If you use FileZilla, make sure you enable FTPS as it's not on by default.

- Hans (EDT Support)
0 votes
by
mod_tls is installed and configured in ProFTPD server. The error is the same, can
0 votes
by (161k points)
Have you tried using FileZilla to log in?

http://sourceforge.net/project/showfile ... p_id=21558

If FileZilla can't login, there's definitely a problem with the ProFTPD setup.

Remember to enable FTPS in FileZilla.

mod_tls is installed and configured in ProFTPD server. The error is the same, can
0 votes
by
Have you tried using FileZilla to log in?

http://sourceforge.net/project/showfile ... p_id=21558

If FileZilla can't login, there's definitely a problem with the ProFTPD setup.

Remember to enable FTPS in FileZilla.

mod_tls is installed and configured in ProFTPD server. The error is the same, can
0 votes
by (51.2k points)
The problem is certificates...Is necesary use loadRootCertificates()?


Yes, if you turn on server validation then you must load one or more root certificates using the
loadRootCertificates()
method, otherwise the client will have nothing to validate the server against. This file may simply contain the certificate of the server in base-64 format, or, if the certificate was issued by a CA then it may contain the certificate of the CA.

A certificate in base-64 format looks something like this:
-----BEGIN CERTIFICATE-----
MIIE5zCCA8+gAwIBAgIBADANBgkqhkiG9w0BAQQFADCBrTELMAkGA1UEBhMCVUsx
EDAOBgNVBAgTB0VuZ2xhbmQxDzANBgNVBAcTBkxvbmRvbjEwMC4GA1UEChMnRW50
ZXJwcmlzZSBEaXN0cmlidXRlZCBUZWNobm9sb2dpZXMgTHRkMQwwCgYDVQQLEwNG
VFAxEjAQBgNVBAMTCWxvY2FsaG9zdDEnMCUGCSqGSIb3DQEJARYYc3VwcG9ydEBl
bnRlcnByaXNlZHQuY29tMB4XDTA0MDUwNDEwMDYyM1oXDTA3MDUwNDEwMDYyM1ow
ga0xCzAJBgNVBAYTAlVLMRAwDgYDVQQIEwdFbmdsYW5kMQ8wDQYDVQQHEwZMb25k
b24xMDAuBgNVBAoTJ0VudGVycHJpc2UgRGlzdHJpYnV0ZWQgVGVjaG5vbG9naWVz
IEx0ZDEMMAoGA1UECxMDRlRQMRIwEAYDVQQDEwlsb2NhbGhvc3QxJzAlBgkqhkiG
9w0BCQEWGHN1cHBvcnRAZW50ZXJwcmlzZWR0LmNvbTCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBANNI+JqiCU+4a1wc449I7c6qhvksZydXk9zzuQguGrGq
oP00Zrt8cnoOkKJnAmF/KhpLYlSEc/fC8O+1i3kllJPex7UPHeNnisO5+Njz8b7/
dmMvkQKNGWfPTtWeBwguI/H5+S8rRNv7xaFDgJJYJLsAElaWqBkh4w9uLhFtc3+b
2j674EaxTjcBeN1btCkr7z5MRBBo3YTj1jcZQmHfNbZC3243qJHt0L823JQ2Rt/s
UMl63JOm5tds7se6HYeEa3GvUqH7NCyejiemO5DJFvk2RcHXUGhWlhimFawbXBGb
eBIzggnDQkAVMDwczK5dUaEMyCiV9AiiOG5Li/R589UCAwEAAaOCAQ4wggEKMB0G
-----END CERTIFICATE-----


Please let us know if you have trouble with this.

- Hans (EDT Support)

Categories

...