You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Tarun Kumar <ta...@markit.com> on 2014/05/01 08:32:58 UTC
Getting FTP Server Response as 7 from FTPClient api
Hi Team,
While we are trying to retrieve file via FTPClient api
On calling ftpClient.retrieveFileStream(fileName) we are getting below exception.
org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
Server Reply: 7 Entering Passive Mode (172,25,16,22,131,51).
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:315)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:490)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:583)
at org.apache.commons.net.ftp.FTP.pasv(FTP.java:882)
at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:497)
at org.apache.commons.net.ftp.FTPClient.retrieveFileStream(FTPClient.java:1333)
at com.markit.valuations.marketdata.reporting.checks.yieldcurevs.DatascopeRICCheck.getRicFromFiles(DatascopeRICCheck.java:202)
Could not find response code 7 in FTP response list : http://en.wikipedia.org/wiki/List_of_FTP_server_return_codes
Can you please help us in knowing what could be underlying issue and recommend solution.
Thanks,
Tarun Kumar
________________________________
This e-mail, including accompanying communications and attachments, is strictly confidential and only for the intended recipient. Any retention, use or disclosure not expressly authorised by Markit is prohibited. This email is subject to all waivers and other terms at the following link: http://www.markit.com/en/about/legal/email-disclaimer.page
Please visit http://www.markit.com/en/about/contact/contact-us.page? for contact information on our offices worldwide.
RE: Getting FTP Server Response as 7 from FTPClient api
Posted by Martin Gainty <mg...@hotmail.com>.
is the FTP Server you are contacting AIX?
if so ...your cd command in your FTP script failed
http://publib.boulder.ibm.com/infocenter/zvm/v5r4/index.jsp?topic=/com.ibm.zvm.v54.kijl0/retcds.htm
Martin Gainty
______________________________________________
> From: tarun.kumar@markit.com
> To: user@commons.apache.org
> Date: Thu, 1 May 2014 07:32:58 +0100
> Subject: Getting FTP Server Response as 7 from FTPClient api
>
> Hi Team,
>
> While we are trying to retrieve file via FTPClient api
> On calling ftpClient.retrieveFileStream(fileName) we are getting below exception.
>
>
> org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
> Server Reply: 7 Entering Passive Mode (172,25,16,22,131,51).
> at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:315)
> at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:490)
> at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534)
> at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:583)
> at org.apache.commons.net.ftp.FTP.pasv(FTP.java:882)
> at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:497)
> at org.apache.commons.net.ftp.FTPClient.retrieveFileStream(FTPClient.java:1333)
> at com.markit.valuations.marketdata.reporting.checks.yieldcurevs.DatascopeRICCheck.getRicFromFiles(DatascopeRICCheck.java:202)
>
>
> Could not find response code 7 in FTP response list : http://en.wikipedia.org/wiki/List_of_FTP_server_return_codes
>
> Can you please help us in knowing what could be underlying issue and recommend solution.
>
> Thanks,
> Tarun Kumar
>
> ________________________________
> This e-mail, including accompanying communications and attachments, is strictly confidential and only for the intended recipient. Any retention, use or disclosure not expressly authorised by Markit is prohibited. This email is subject to all waivers and other terms at the following link: http://www.markit.com/en/about/legal/email-disclaimer.page
>
> Please visit http://www.markit.com/en/about/contact/contact-us.page? for contact information on our offices worldwide.
Re: Getting FTP Server Response as 7 from FTPClient api
Posted by sebb <se...@gmail.com>.
On 1 May 2014 07:32, Tarun Kumar <ta...@markit.com> wrote:
> Hi Team,
>
> While we are trying to retrieve file via FTPClient api
> On calling ftpClient.retrieveFileStream(fileName) we are getting below exception.
>
>
> org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
> Server Reply: 7 Entering Passive Mode (172,25,16,22,131,51).
> at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:315)
> at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:490)
> at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534)
> at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:583)
> at org.apache.commons.net.ftp.FTP.pasv(FTP.java:882)
> at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:497)
> at org.apache.commons.net.ftp.FTPClient.retrieveFileStream(FTPClient.java:1333)
> at com.markit.valuations.marketdata.reporting.checks.yieldcurevs.DatascopeRICCheck.getRicFromFiles(DatascopeRICCheck.java:202)
>
>
> Could not find response code 7 in FTP response list : http://en.wikipedia.org/wiki/List_of_FTP_server_return_codes
>
A simple web search for "Entering Passive Mode" shows that the normal
response is
227 Entering Passive Mode
> Can you please help us in knowing what could be underlying issue and recommend solution.
Either the server is sending an invalid response, or Commons NET has
somehow skipped part of the response.
Is it possible that your application is somehow eating up some of the
response data?
You'll need to add a ProtocolCommandListener to log what is being sent
and received.
Or you can use a network protocol analyser such as wireshark.
There are some example apps included with NET; you could try using one
of those to check how the target server behaves.
> Thanks,
> Tarun Kumar
>
> ________________________________
> This e-mail, including accompanying communications and attachments, is strictly confidential and only for the intended recipient. Any retention, use or disclosure not expressly authorised by Markit is prohibited. This email is subject to all waivers and other terms at the following link: http://www.markit.com/en/about/legal/email-disclaimer.page
>
> Please visit http://www.markit.com/en/about/contact/contact-us.page? for contact information on our offices worldwide.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org