[ 
https://issues.apache.org/jira/browse/NET-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Latorre closed NET-239.
-----------------------------

    Resolution: Invalid

This seen behaviour is related to a Sun Java 1.5 and 1.6  where  (under Windows 
Vista) socket.getLocalAddress() will return 127.0.0.1 even after connect().   
This bug has been fixed in java 1.6.0_7.

Sorry!

 

> FTP client does not work in Active Mode.
> ----------------------------------------
>
>                 Key: NET-239
>                 URL: https://issues.apache.org/jira/browse/NET-239
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: David Latorre
>
> When using FTPClient (under some circumstances?) the reported ip in a PORT 
> command is 127.0.0.1 so the data connection can't be established.
> It seems Version 1.4 also suffered from this bug. 
> I am using JDK 1.5/1.6 under Windows Vista.
> Sample code:
> public static void main(String[] args) throws Exception {
>         // TODO code application logic here
>         FTPClient client = new FTPClient();
>         client.addProtocolCommandListener(new 
> PrintCommandListener(System.out) );
>        // client=setTruststore(client);
>         client.connect("ftp.server.com", 21);
>         client.login("user", "password");
>         String[] lista = client.listNames();
>         for (String el : lista) {
>             System.out.println(el);
>         }
>         client.disconnect();
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to