Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 50849 invoked from network); 23 Apr 2010 18:25:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Apr 2010 18:25:38 -0000 Received: (qmail 78579 invoked by uid 500); 23 Apr 2010 18:25:37 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 78453 invoked by uid 500); 23 Apr 2010 18:25:37 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 78444 invoked by uid 99); 23 Apr 2010 18:25:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Apr 2010 18:25:37 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.208.4.195] (HELO mout.perfora.net) (74.208.4.195) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Apr 2010 18:25:30 +0000 Received: from steve (rrcs-96-10-246-41.midsouth.biz.rr.com [96.10.246.41]) by mrelay.perfora.net (node=mrus4) with ESMTP (Nemesis) id 0MVvZQ-1NuImB1kS0-00XcIc; Fri, 23 Apr 2010 14:25:00 -0400 From: "Steve Cole" To: "'Commons Users List'" References: In-Reply-To: Subject: RE: Commons-net FTP and AIX 5.3 FTP Server Date: Fri, 23 Apr 2010 14:24:58 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 thread-index: AcrjDNvJISxEsb+TTKKn04buBN6LpwABEfJw X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7600.16385 X-Provags-ID: V01U2FsdGVkX1/6HsYTX8pyFnnanDo3bmmduJ2rAoZj7aAPoqq utkzablce2qsCrldaHy0iIEJXZkmKDlhLWIfX9HTxtI0MiPypR 4+Oold5VafhYlruCv+Oj6aHoOmJFbXd X-Virus-Checked: Checked by ClamAV on apache.org The exception is occurring when a QUIT command is sent, simply because = it failed to parse the server reply. The actual problem appears to be a connection issue. It can't open the data connection. That's why list() failed. Have you tried setting the property = java.net.preferIPv4Stack=3Dtrue? -----Original Message----- From: Ricardo Duval [mailto:rdg.duval@ibest.com.br]=20 Sent: Friday, April 23, 2010 1:46 PM To: Commons Users List Subject: Re: Commons-net FTP and AIX 5.3 FTP Server Martin, Unfortunately I already tried with ASCII type. The first example I sent = I didn't change the default FTP transfer type which is ASCII. Using some other cliente I can easily upload files, even using other FTP client libs like edtFTPj. The same set of commands using the MS FTP = client (DOS) gave the following result: C:\Documents and Settings\rduval.FCD>ftp SOME_IP Connected to SOME_IP. 220 riscf80 FTP server (Version 4.2 Fri May 2 12:48:10 CDT 2008) ready. User (SOME_IP:(none)): SOME_USER 331 Password required for SOME_USER. Password: 230-Last unsuccessful login: Fri Apr 23 13:55:51 GRNLNDST 2010 on ftp = from SOME_HOME 230-Last login: Fri Apr 23 14:22:06 GRNLNDST 2010 on ftp from SOME_HOME 230 User SOME_USER logged in. ftp> binary 200 Type set to I. ftp> pwd 257 "/riscf80/some/folder" is current directory. ftp> cd ../nfe 250 CWD command successful. ftp> pwd 257 "/riscf80/some/nfe" is current directory. ftp> ls 200 PORT command successful. 150 Opening data connection for .. lost+found 61438248003904006 61438248004625033 ... (Several files and folders) 61438248005605033 226 Transfer complete. ftp: 639 bytes received in 0,05Seconds 13,60Kbytes/s. ftp> quit 221 Goodbye. I think the problem is something in the lib itself, but I tried to debug = it and couldn't find a reason for that. R. Duval 2010/4/23 Martin Gainty > > one possible problem is > type i (if your sending/receiving machine is EBCDIC and > the file contains non-display data, e.g., COMP-3); > i know of one system that sends/receives EBCDIC.. an old ibm mainframe that > the army abandoned in Saigon in 75..all other computer systems send/receive > and process in ascii > > i would strongly suggest setting type=3D'a' > http://www.ucop.edu/irc/campus_specs/ftp/aixftp.html > > what happens when you use issue the same series of commands at command-line > prompt? > Martin Gainty > ______________________________________________ > Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de = confidentialit=E9 > > > Date: Fri, 23 Apr 2010 11:55:49 -0300 > > Subject: Commons-net FTP and AIX 5.3 FTP Server > > From: rdg.duval@ibest.com.br > > To: user@commons.apache.org > > > > Hello, > > > > Let me explain what's happening: I have no problems connecting and > uploading > > files to Linux, Windows or even SCO (yes, it still exists) FTP = servers, > but > > when I try to execute a simple command using FTPClient to AIX 5.3 I = got > the > > following exception: > > > > 1. > > org.apache.commons.net.MalformedServerReplyException: Could not > > parse response code. > > 2. Server Reply: : The socket name is not available on this = system. > > 3. at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:316) > > 4. at = org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:491) > > 5. at = org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:533) > > 6. at = org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:582) > > 7. at org.apache.commons.net.ftp.FTP.quit(FTP.java:790) > > 8. at > org.apache.commons.net.ftp.FTPClient.logout(FTPClient.java:759 > > ) > > 9. > > at > = testes.integracao.FtpCommonsNetTest.testRiscf80(FtpCommonsNetTest.java: > > 27) > > 10. ... > > > > ... The code that generates the stack above is just that: > > > > 1. @Test > > 2. public final void testRiscf80() throws Exception { > > 3. FTPClient ftp =3D new FTPClient(); > > 4. try { > > 5. ftp.connect(AIX_HOST_IP); > > 6. ftp.login(AIX_USER, AIX_PASSWD); > > 7. ftp.changeWorkingDirectory( > > "/riscf80/path/to/uploaded/files"); > > 8. File file =3D new File("some-dummy-file.gz"); > > 9. FileInputStream fis =3D new FileInputStream(file); > > 10. ftp.storeFile(fileName, fis); > > // Line where exception occurs > > 11. } finally { > > 12. ftp.logout(); > > 13. ftp.disconnect(); > > 14. } > > 15. } > > > > That was intriguing, > > so I performed some research and reached the following results = printing > all > > responses from the server while was just trying to list some folder > files: > > > > 1. @Test > > 2. public void testListingRiscf80Internal() throws Exception = { > > 3. FTPClient client =3D new FTPClient(); > > 4. try { > > 5. client.connect(AIX_HOST_IP); > > 6. System.out.println(client.getReplyString()); > > 7. if(client.login(AIX_USER, AIX_PASSWD)) { > > 8. System.out.println(client.getReplyString()); > > 9. = client.setFileType(FTPClient.BINARY_FILE_TYPE); > > 10. System.out.println(client.getReplyString()); > > 11. client.pwd(); > > 12. System.out.println(client.getReplyString()); > > 13. client.list(); // This generates the 425 = reply > code > > 14. System.out.println(client.getReplyString()); > > 15. } > > 16. } finally { > > 17. client.logout(); // Where exception is thrown > > 18. client.disconnect(); > > 19. } > > > > And these are the sysout results: > > > > 220 riscf80 FTP server (Version 4.2 Fri May 2 12:48:10 CDT 2008) = ready. > > 230-Last unsuccessful login: Wed Apr 21 18:35:18 GRNLNDST 2010 on = ssh > from > > SOME_IP > > 230-Last login: Thu Apr 22 19:41:45 GRNLNDST 2010 on ftp from = SOME_HOST > > 230 User SOME_USER logged in. > > 200 Type set to I. > > 257 "/riscf80/some/folder" is current directory. > > 425 No data connection > > > > Some additional data may be useful to understand this issue: > > - There is no firewall between the client and the FTPServer > > - I've tried other client libraries (like edtFTPJ, ftp4j), they work = but > their > > performance is very poor compared to commons-net > > - I couldn't find an explicit way to set preference on ipv4 stack = over > ipv6 > > stack in commons-net lib > > I've also tried to enable the remote passive mode for no avail. = Tried > > several different things, like disabling the remote verification, = and > > nothing made the trick. It's a very specific problem, but any = thoughts > would > > be greatly appreciated. > > > > Thanks in advance > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org