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='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éni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Fri, 23 Apr 2010 11:55:49 -0300
> Subject: Commons-net FTP and AIX 5.3 FTP Server
> From: [email protected]
> To: [email protected]
> 
> 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.         ...
> 
> org.apache.commons.net.MalformedServerReplyException: Could not parse
> response code. Server Reply: : The socket name is not available on this
> system. at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:316) at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:491) at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:533) at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:582) at
> org.apache.commons.net.ftp.FTP.quit(FTP.java:790) at
> org.apache.commons.net.ftp.FTPClient.logout(FTPClient.java:759) at
> testes.integracao.FtpCommonsNetTest.testRiscf80(FtpCommonsNetTest.java:27)
> ... The code that generates the stack above is just that:
> 
>    1.     @Test
>    2.     public final void testRiscf80() throws Exception {
>    3.         FTPClient ftp = 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 = new File("some-dummy-file.gz");
>    9.             FileInputStream fis = new FileInputStream(file);
>    10.             ftp.storeFile(fileName, fis);
>    // Line where exception occurs
>    11.         } finally {
>    12.             ftp.logout();
>    13.             ftp.disconnect();
>    14.         }
>    15.     }
> 
> @Test public final void testRiscf80() throws Exception { FTPClient ftp = new
> FTPClient(); try { ftp.connect(AIX_HOST_IP); ftp.login(AIX_USER,
> AIX_PASSWD); ftp.changeWorkingDirectory("/riscf80/path/to/uploaded/files");
> File file = new File("some-dummy-file.gz"); FileInputStream fis = new
> FileInputStream(file); ftp.storeFile(fileName, fis); // Line where exception
> occurs } finally { ftp.logout(); ftp.disconnect(); } } 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 = 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.         }
> 
> @Test public void testListingRiscf80Internal() throws Exception { FTPClient
> client = new FTPClient(); try { client.connect(AIX_HOST_IP);
> System.out.println(client.getReplyString()); if(client.login(AIX_USER,
> AIX_PASSWD)) { System.out.println(client.getReplyString());
> client.setFileType(FTPClient.BINARY_FILE_TYPE);
> System.out.println(client.getReplyString()); int pwd = client.pwd();
> System.out.println(pwd+" / "+client.getReplyString()); int list =
> client.list(); // This generates the 425 reply code
> System.out.println(list+" / "+client.getReplyString()); } } finally {
> client.logout(); // Where exception is thrown client.disconnect(); }
> 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
> 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 / 257
> "/riscf80/some/folder" is current directory. 425 / 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
                                          
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3

Reply via email to