Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 72584 invoked from network); 20 Nov 2006 14:23:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Nov 2006 14:23:26 -0000 Received: (qmail 42806 invoked by uid 500); 20 Nov 2006 14:23:24 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 42659 invoked by uid 500); 20 Nov 2006 14:23:23 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 42621 invoked by uid 99); 20 Nov 2006 14:23:23 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Nov 2006 06:23:23 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [159.134.118.19] (HELO mail03.svc.cra.dublin.eircom.net) (159.134.118.19) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 20 Nov 2006 06:23:09 -0800 Received: (qmail 93459 messnum 286787 invoked from network[159.134.237.77/webmail00.eircom.net]); 20 Nov 2006 14:22:47 -0000 Received: from webmail00.eircom.net (HELO webmail.eircom.net) (159.134.237.77) by mail03.svc.cra.dublin.eircom.net (qp 93459) with SMTP; 20 Nov 2006 14:22:47 -0000 From: "Rory Winston" Reply-To: To: "Jakarta Commons Users List" , Jakarta Commons Users List Subject: Re: R�f. : Re: [NET] empty result with listFiles =?ISO-8859-1?Q?=28=29_method_whereas_I_should_get_files?= Date: Mon, 20 Nov 2006 14:22:47 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-Originating-IP: 171.192.0.10 X-Mailer: Eircom Net CRC Webmail (http://www.eircom.net/) Organization: Eircom Net (http://www.eircom.net/) X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20061120142312.834DF10FB004@herse.apache.org> Are there just hidden files in your home directory (i.e. files beginning with a dot '.')? Rory "Jakarta Commons Users List" wrote: > > > > > > Hi Rory, > > Thanks for your input, i didn't knew how to do that. > I've just tried it, and obviously, I still don't know what happens. > > I'm unsure that the problem could be a parsing bug, because I tried to > emulate a FTP session directly through a "telnet" command, and I got > exactly the same output than the one received from a machine on which > everything works fine. > > With the PrintCommandListener I get on a working AIX machine (<<<< =3D > received, >>>> =3D sent) : > > <<<< 220 beaic1 FTP server (Version 4.1 Tue Jul 6 21:20:07 CDT 2004) re= > ady. > >>>> USER test > <<<< 331 Password required for test. > >>>> PASS test > <<<< 230-Last unsuccessful login: Thu Nov 9 16:38:22 2006 on /dev/pts/= > 7 > from beahba > 230-Last login: Mon Nov 20 12:49:29 2006 on ftp from beahba > 230 User test logged in. > >>>> SYST > <<<< 215 UNIX Type: L8 Version: BSD-44 > >>>> PASV > <<<< 227 Entering Passive Mode (10,68,188,139,236,238) > >>>> LIST > <<<< 150 Opening data connection for /bin/ls. > <<<< 226 Transfer complete. > > And printing what is returned by listFiles() outputs : > > .glancerc_aix > > .profile > > .rhosts > > tmp > (...) > > (but i'm surprised not to see in the output of the ProtocolCommandListe= > ner > the result of the LIST command returned by the server - either in passi= > ve > or active mode, is there something else to do to track data outputs fro= > m > the server ?) > > And on the "not working" machine I get exatly the same log (but no data= > > resulting from listFiles() ): > > <<<< 220 ylai0029 FTP server (Version 4.1 Tue Jul 6 21:20:07 CDT 2004) > ready. > >>>> USER test > <<<< 331 Password required for test. > >>>> PASS test > <<<< 230-Last login: lun 20 nov 12:49:29 NFT 2006 on ftp from beahba > 230 User test logged in. > >>>> SYST > <<<< 215 UNIX Type: L8 Version: BSD-44 > >>>> PASV > <<<< 227 Entering Passive Mode (10,68,212,66,210,94) > >>>> LIST > <<<< 150 Opening data connection for /bin/ls. > <<<< 226 Transfer complete. > > (no data returned whereas I have .profile, tmp, and so on) > > -- > Serge. > > > > = > > Rory Winston = > > > .net> P= > our > Jakarta Commons Users List = > > 20/11/2006 12:13 >, > commons-user@jakarta.apache.org = > > = > cc > Veuillez = > > r=E9pondre =E0 = > Objet > Jakarta Commons Re: [NET] empty result with = > > Users List listFiles() method whereas I sho= > uld > > karta.apache.org = > > > = > > = > > = > > = > > = > > > > > > Hi Serge > > You could try to look at the commands being passed back and forth betwe= > en > the FTPClient and the server by adding a PrintCommandListener instance = > to > the client (see the FTP example classes for details), and see what the > server is passing back. Its possible that there is a dormant bug in the= > > directory entry parsing code being triggered here, in which case I woul= > d > recommend you open an issue in JIRA and attach all of the relevant > information you can (including the exact directory listing sent by the > server). > > Thanks > Rory > > "Jakarta Commons Users List" wrote: > > > > > > > > > > > > > Hello, > > > > I have a strange behavior with commons-net, about FTP commands - with= > one > > and only one AIX computer - and I can't find what the problem is. > > > > I'm using Jakarta commons-net 1.4.1 (same problem with a build from > august > > 2006). > > > > I use a FTPClient object invoking the listFiles() method. It works we= > ll > on > > any machine, excepted on one, where I get no files resulting from the= > > > listFiles() method, whereas there are many files in my home directory= > . > With > > a direct ftp from another tool (ftp command line from the computer wh= > ere > I > > run my java program, or filezilla from my workstation), everything wo= > rks > > fine and I get all the files in my home directory, so my credentials = > are > > right and there is probably no network or firewall issue. > > > > Anyone has encountered this before ? Any idea about this ? > > > > The jar is launched with Java 1.4.2.02, the not-working computer runs= > AIX > > 5.2 and I have another computer with exactly the same configuration (= > same > > OS-level, same FTP server version) on which everythink works fine (as= > it > > does on any other computer) > > > > I use the following (pretty simple) code. > > I have tried a few things : > > - active / passive mode =3D> same problem ; > > - f.changeWorkingDirectory() before using listFiles() =3D> same probl= > em ; > > - study f.getReplyCode(); =3D> no usefull data in this case ; > > - other account and/or other path =3D> same problem ; > > > > org.apache.commons.net.ftp.FTPClient f =3D new > > org.apache.commons.net.ftp.FTPClient(); > > try { > > f.connect(ftpHostname); > > f.login(ftpLogin, ftpPassword); > > > > FTPFile[] files =3D f.listFiles(); > > > > if ( files.length =3D=3D 0 ) { > > System.out.println(" No results."); > > } else { > > for (int i =3D 0; i < files.length; i++) { > > FTPFile f =3D files[i]; > > System.out.println(" > " + f.getName()); > > } > > } > > > > } catch (SocketException e) { > > e.printStackTrace(); > > } catch (IOException e) { > > e.printStackTrace(); > > } > > > > > > > > ---------------------------------------------------------------------= > > > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: commons-user-help@jakarta.apache.org= > > > > > > > > > ----------------------------------------------------------------- > Find the home of your dreams with eircom net property > Sign up for email alerts now http://www.eircom.net/propertyalerts > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > = > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > ----------------------------------------------------------------- Find the home of your dreams with eircom net property Sign up for email alerts now http://www.eircom.net/propertyalerts --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org