【问题标题】:javax.net.ssl.SSLException: Unsupported or unrecognized SSL messagejavax.net.ssl.SSLException:不支持或无法识别的 SSL 消息
【发布时间】:2020-05-12 08:41:24
【问题描述】:

我的 FTPS 连接有问题:

FTPSClient client = new FTPSClient(); 
client.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out))); 
client.connect(host);

得到了这样的回应:

220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 3 of 50 allowed.
220-Local time is now 10:21. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
AUTH TLS
234 AUTH TLS OK.
Mai 12, 2020 10:21:01 VORM. main
SEVERE: null
javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
at java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(SSLSocketInputRecord.java:439)
at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:184)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:108)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1180)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1091)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
at org.apache.commons.net.ftp.FTPSClient.sslNegotiation(FTPSClient.java:269)
at org.apache.commons.net.ftp.FTPSClient._connectAction_(FTPSClient.java:211)

有人知道出了什么问题吗?

【问题讨论】:

    标签: java ftps


    【解决方案1】:

    更新您的 commons-net-3.3.jar 文件。旧版本在某些服务器上存在错误或 SSL 问题。

    迈克

    【讨论】:

    • 完美。我认为这更困难:-)
    • 我尝试指定较新版本的公共文件,但没有得到任何更改compile group: 'commons-net', name:'commons-net', version:'3.8'
    猜你喜欢
    • 2014-08-08
    • 1970-01-01
    • 2011-06-06
    • 1970-01-01
    • 2021-02-10
    • 2016-08-04
    • 2017-09-09
    • 2016-08-28
    • 2018-03-13
    相关资源
    最近更新 更多