commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anil Philip <goodnewsfor...@yahoo.com>
Subject Re: [commons-net] NoRouteToHostException for ftpClient.listNames()
Date Mon, 07 Aug 2006 18:41:43 GMT
It was fixed by commenting out the setPassiveMode call
in the commons test program. Does anyone know when the
call should be set?

// Use passive mode as default because most of us are
// behind firewalls these days.
// ftp.enterLocalPassiveMode();

thanks,
Anil

--- Anil Philip <goodnewsforyou@yahoo.com> wrote:

> Hello,
> I am able to successfully login but this call fails:
>     String[] fileNames = ftpClient.listNames();
> Any advice?
> thanks,
> Anil
> -----------------------
> 230 User guest00 logged in.
> SYST
> 215 UNIX Type: L8
> Remote system is UNIX Type: L8
> PASV
> 227 Entering Passive Mode (64,192,187,19,202,196).
> java.net.NoRouteToHostException: No route to host:
> connect
> 	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.DefaultSocketFactory.createSocket(DefaultSocketFactory.java:53)
> 	at
>
org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:513)
> 	at
>
org.apache.commons.net.ftp.FTPClient.listNames(FTPClient.java:1959)
> 	at
>
org.apache.commons.net.ftp.FTPClient.listNames(FTPClient.java:2006)
> 
> for good news go to
>
http://members.tripod.com/~goodnewsforyou/goodnews.html
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message