javax.net.ssl.SSLException:不支持或无法识别的SSL消息

问题描述 投票:0回答:1

我的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个回答
0
投票

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

麦克

© www.soinside.com 2019 - 2024. All rights reserved.