You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "amit kumar (JIRA)" <ji...@apache.org> on 2015/03/16 16:41:38 UTC

[jira] [Commented] (NET-569) apache commons net FTPHTTP client not able to conect to ftp server

    [ https://issues.apache.org/jira/browse/NET-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14363363#comment-14363363 ] 

amit kumar commented on NET-569:
--------------------------------

now i am able to connect i used Inet4address
but if i will try to list directories
i will get below error

java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at org.apache.commons.net.ftp.FTPHTTPClient._openDataConnection_(FTPHTTPClient.java:71)
	at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2990)
	at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2965)
	at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2685)
	at org.apache.commons.net.ftp.FTPClient.listDirectories(FTPClient.java:2769)
	at org.apache.commons.net.ftp.FTPClient.listDirectories(FTPClient.java:2728)
	at com.ftp.ftpClient.FTPClientExample.main(FTPClientExample.java:156)

please help me out with this

> apache commons net FTPHTTP client not able to conect to ftp server
> ------------------------------------------------------------------
>
>                 Key: NET-569
>                 URL: https://issues.apache.org/jira/browse/NET-569
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1, 3.3
>         Environment: java 7 , windows 7
>            Reporter: amit kumar
>              Labels: features
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> if i will do 
> FTPClient ftp = new FTPClient();
> ftp.connect("FtpserverName", port(21));
> ftp.Login("******","****");
>  
> i am able to connect but if i will do
> Ftpclient ftp = FTPHTTPclient("proxyName", "port", "userId", "Pass");
> ftp.connect("FtpserverName", port(21));
> ftp.Login("******","****");
> i am getting 
> java.io.IOException: Could not connect to tovms3.fr.eu.airbus.corp
> 	at org.apache.commons.net.ftp.FTPHTTPClient.connect(FTPHTTPClient.java:93)
> 	at com.ftp.ftpClient.FTPClientExample.main(FTPClientExample.java:148)
> Caused by: java.lang.RuntimeException: Parameter supplied to Base64 encode is not a byte[]
> 	at org.apache.commons.net.util.Base64.encode(Base64.java:885)
> 	at org.apache.commons.net.ftp.FTPHTTPClient.tunnelHandshake(FTPHTTPClient.java:107)
> 	at org.apache.commons.net.ftp.FTPHTTPClient.connect(FTPHTTPClient.java:90)
> 	... 1 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)