commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Getting FTP Server Response as 7 from FTPClient api
Date Thu, 01 May 2014 12:37:34 GMT
On 1 May 2014 07:32, Tarun Kumar <tarun.kumar@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


Mime
View raw message