commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aidan Diffey <aidan.dif...@gmail.com>
Subject Re: [NET] SSL nsupported,record version
Date Tue, 07 Dec 2010 15:15:08 GMT
UPDATE on Java 6 problem.

I forgot to copy the unlimited strength encryption libs to my Java 6
install. (Meaning that I could not do AES256).

Now that I have done that copy, I am at the same stage as before (and
detailed in previous post) regarding freezing.


Cheers

On 7 December 2010 15:06, Aidan Diffey <aidan.diffey@gmail.com> wrote:
> Hello.
>
> I have tried with Java 6 and I get a different error message:
>
> 220 "Welcome to FTP service."
> AUTH TLS
> 234 Proceed with negotiation.
> Exception in thread "main" javax.net.ssl.SSLHandshakeException:
> Received fatal alert: handshake_failure
>        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
>        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
>        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1720)
>        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:954)
>        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
>        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1165)
>        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1149)
>        at org.apache.commons.net.ftp.FTPSClient.sslNegotiation(FTPSClient.java:240)
>        at org.apache.commons.net.ftp.FTPSClient._connectAction_(FTPSClient.java:171)
>        at org.apache.commons.net.SocketClient.connect(SocketClient.java:178)
>        at org.apache.commons.net.SocketClient.connect(SocketClient.java:268)
>        at Client.main(Client.java:23)
>
>
> BTW, I am using an implementation of BouncyCastle that is configured
> in my java.security file located inside the jre/lib.security
>
> Re-running with 1.5 java, when I try to do a LIST, it says "150 Here
> comes the directory listing", but then appears to freeze. If I pause
> the running thread, I can see:
>
> Thread [main] (Suspended)
>        SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int)
> line: not available [native method]
>        SocketInputStream.read(byte[], int, int) line: 129
>        StreamDecoder$CharsetSD.readBytes() line: 411
>        StreamDecoder$CharsetSD.implRead(char[], int, int) line: 453
>        StreamDecoder$CharsetSD(StreamDecoder).read(char[], int, int) line: 183
>        InputStreamReader.read(char[], int, int) line: 167
>        BufferedReader.fill() line: 136
>        BufferedReader.readLine(boolean) line: 299
>        BufferedReader.readLine() line: 362
>        UnixFTPEntryParser(FTPFileEntryParserImpl).readNextEntry(BufferedReader)
> line: 53
>        FTPListParseEngine.readStream(InputStream, String) line: 152
>        FTPListParseEngine.readServerList(InputStream, String) line: 100
>        FTPSClient(FTPClient).initiateListParsing(FTPFileEntryParser, String)
> line: 2303
>        FTPSClient(FTPClient).initiateListParsing(String, String) line: 2269
>        FTPSClient(FTPClient).listFiles(String) line: 2046
>        FTPSClient(FTPClient).listFiles() line: 2093
>        Client.main(String[]) line: 36
>
>
> I am totally stuck.
>
> Cheers
>
> On 2 December 2010 15:40, sebb <sebbaz@gmail.com> wrote:
>> On 2 December 2010 07:47, Aidan Diffey <aidan.diffey@gmail.com> wrote:
>>> I am using Java 1.5.0_21.
>>
>> Can you try with a different version of Java?
>>
>> Does the problem happen with all files?
>>
>>> I am a single client connecting to a single FTP server.  The server is
>>> running FTPES mode.
>>>
>>> Cheers for the help.
>>>
>>> On 2 December 2010 00:18, sebb <sebbaz@gmail.com> wrote:
>>>> On 1 December 2010 20:38, Aidan Diffey <aidan.diffey@gmail.com> wrote:
>>>>> Hello all.
>>>>>
>>>>> I was wondering if anyone had any idea on what causes the following
>>>>> error message when I am trying to connect an FTP client (using
>>>>> Common.net FTPSClient) with explicit SSL to a server.
>>>>> I can connect
>>>>> using FileZilla and FTPES mode correctly.
>>>>>
>>>>> 220 "Welcome"
>>>>> AUTH TLS
>>>>> 234 Proceed with negotiation.
>>>>> USER ****
>>>>> 331 Please specify the password.
>>>>> PASS ****
>>>>> 230 Login successful.
>>>>> OPTS UTF8 ON
>>>>> 200 Always in UTF8 mode.
>>>>> PBSZ 0
>>>>> 200 PBSZ set to 0.
>>>>> PROT P
>>>>> 200 PROT now Private.
>>>>> TYPE I
>>>>> 200 Switching to Binary mode.
>>>>> CWD Commands
>>>>> 250 Directory successfully changed.
>>>>> TYPE A
>>>>> 200 Switching to ASCII mode.
>>>>> PASV
>>>>> 227 Entering Passive Mode (10,20,3,112,117,87).
>>>>> STOR command.xml
>>>>> 150 Ok to send data.
>>>>>
>>>>> Exception in thread "main" javax.net.ssl.SSLException: Unsupported
>>>>> record version Unknown-48.48
>>>>
>>>> A web search suggests that this occurs when the SSL stream gets out of
>>>> step somehow, and this confuses the decoder.
>>>>
>>>> This may be related to the Java version you are using - have you tried
>>>> with a different one?
>>>> What Java version are you using currently?
>>>>
>>>> Does it happen with multiple servers and multiple files?
>>>> Is there a publicly accessible server that shows the behaviour?
>>>>
>>>>>        at
>>>>> com.sun.net.ssl.internal.ssl.InputRecord.readV3Record(InputRecord.java:375)
>>>>>        at
>>>>> com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:360)
>>>>>        at
>>>>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:782)
>>>>>        at
>>>>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:739)
>>>>>        at
>>>>> com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
>>>>>        at
>>>>> sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
>>>>>        at
>>>>> sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
>>>>>        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
>>>>>        at java.io.InputStreamReader.read(InputStreamReader.java:167)
>>>>>        at java.io.BufferedReader.fill(BufferedReader.java:136)
>>>>>        at java.io.BufferedReader.readLine(BufferedReader.java:299)
>>>>>        at java.io.BufferedReader.readLine(BufferedReader.java:362)
>>>>>        at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:294)
>>>>>        at org.apache.commons.net.ftp.FTP.getReply(FTP.java:619)
>>>>>        at
>>>>> org.apache.commons.net.ftp.FTPClient.completePendingCommand(FTPClient.java:1244)
>>>>>        at
>>>>> org.apache.commons.net.ftp.FTPClient.__storeFile(FTPClient.java:401)
>>>>>
>>>>>
>>>>> Regards
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message