dcsimg
Exception while connecting to FTPS Server
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ali_Gohar
Posted On:   Tuesday, November 30, 2004 02:07 AM

Hi, i am trying to connect and transfer a file at a FTPS server running on implicit mode. I am able to connect with the server but When i am trying to execute STOR command i am getting the following exception: java.net.SocketTimeoutException: Accept timed out at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) at java.net.ServerSocket.implAccept(ServerSocket.java:448) at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(DashoA6275) at testsftp.SSLCadreFtp.putFile(SSLCadreFtp.java:325) at testsftp.SSLCadreFtp.main(SSLCadreFtp.java:443) When i tried to print the response from the server i got    More>>

Hi,

i am trying to connect and transfer a file at a FTPS server running on implicit mode. I am able to connect with the server but When i am trying to execute STOR command i am getting the following exception:

			
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(DashoA6275)
at testsftp.SSLCadreFtp.putFile(SSLCadreFtp.java:325)
at testsftp.SSLCadreFtp.main(SSLCadreFtp.java:443)


When i tried to print the response from the server i got following:

220-Glub Tech Secure FTP Wrapper (v2.5.7)
220 127.0.0.1 FTP server ready
331 Password required for testuser.
230 User testuser logged in.
500 SSL not understood
200 PROT Command OK. Using Private data connection.
200 Type set to A
			
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.net.ssl.internal.ssl.InputRecord.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA6275)
at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
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 testsftp.SSLCadreFtp.showControlReponses(SSLCadreFtp.java:390)
at testsftp.SSLCadreFtp.quitFtp(SSLCadreFtp.java:368)
at testsftp.SSLCadreFtp.bye(SSLCadreFtp.java:357)
at testsftp.SSLCadreFtp.main(SSLCadreFtp.java:444)


I have disabled the SSL certificate validation as following:

			
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
public void checkServerTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
}
};

can anyone tell me why am i getting the exceptions listed above. Please help. Thanks    <<Less
About | Sitemap | Contact