[mule-user] How to get files from ftp and register them on local server Mule 3.1 ?

1 view
Skip to first unread message

a a

unread,
Feb 16, 2011, 9:34:07 AM2/16/11
to us...@mule.codehaus.org
Hi,

I'm facing serious problems while trying to get files from one ftp server ant put them on local, or register them in a database, using Mule 3.1.

My Mule configuration file is below. Can someone help me please?

****
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ftp="http://www.mulesoft.org/schema/mule/ftp" xmlns:file="http://www.mulesoft.org/schema/mule/file"
xmlns:jdbc="http://www.mulesoft.org/schema/mule/jdbc" xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ftp http://www.mulesoft.org/schema/mule/ftp/3.1/mule-ftp.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/3.1/mule-file.xsd
http://www.mulesoft.org/schema/mule/jdbc http://www.mulesoft.org/schema/mule/jdbc/3.1/mule-jdbc.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.1/mule-vm.xsd">

<ftp:connector name="FTPconnector"
passive="false"
pollingFrequency="1000"
validateConnections="false"
streaming="false">

</ftp:connector>

<file:connector name="output"
outputAppend="true"
outputPattern="#[function:datestamp]-#[header:originalFilename]" />

<flow name="FTPreader">
<ftp:inbound-endpoint user="userName"
password="pwd"
port="21"
host="localhost"
path="upload"
connector-ref="FTPconnector">

<!-- <file:filename-wildcard-filter pattern="*.csv,*.pdf,*.txt" /> -->
</ftp:inbound-endpoint>

<file:outbound-endpoint connector-ref="output"
path="/FTP_files"/>
</flow>

</mule>

****

I've got the following error :
ERROR 2011-02-16 15:29:19,953 [FTPconnector.receiver.1] org.mule.exception.DefaultSystemExceptionStrategy:
********************************************************************************
Message : Could not parse response code.
Server Reply: FZS (org.apache.commons.net.MalformedServerReplyException)
Code : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. Could not parse response code.
Server Reply: FZS (org.apache.commons.net.MalformedServerReplyException)
org.apache.commons.net.ftp.FTP:315 (null)
2. Could not parse response code.
Server Reply: FZS (org.apache.commons.net.MalformedServerReplyException) (org.mule.transport.ConnectException)
org.mule.transport.ftp.FtpMessageReceiver:105 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/transport/ConnectException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
Server Reply: FZS
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:315)
at org.apache.commons.net.ftp.FTP._connectAction_(FTP.java:364)
at org.apache.commons.net.ftp.FTPClient._connectAction_(FTPClient.java:540)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************

Please help me... If you have any idea about how to get csv files from ftp server and put it directly on databases, please let me know...

Best regards... Soon.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Andrew Perepelytsya

unread,
Feb 16, 2011, 9:43:24 AM2/16/11
to us...@mule.codehaus.org, a a


On Wed, Feb 16, 2011 at 9:34 AM, a a <mule.us...@mulesource.com> wrote:
Server Reply: FZS  

Are you trying to access SFTP server with FTP? Won't work. You have to use SFTP transport for that.

Andrew

a a

unread,
Feb 16, 2011, 9:57:42 AM2/16/11
to us...@mule.codehaus.org
Thanks for your quick answer.

No, I'm not try to use SFTP user. I indeed have a localhost FTP server... What changes in my configurations do you propose?

Dirk Olmes

unread,
Feb 16, 2011, 10:01:18 AM2/16/11
to us...@mule.codehaus.org
On 02/16/2011 03:57 PM, a a wrote:
> Thanks for your quick answer.
>
> No, I'm not try to use SFTP user. I indeed have a localhost FTP
> server... What changes in my configurations do you propose?

Your config looks fairly sane at first glance . What system are you on?
Which FTP server do you use?

-dirk

a a

unread,
Feb 16, 2011, 10:02:15 AM2/16/11
to us...@mule.codehaus.org
I've also got this response :

***
INFO 2011-02-16 16:00:14,362 [FTPconnector.receiver.1] org.mule.lifecycle.AbstractLifecycleManager: Starting: 'null'. Object is: FtpMessageReceiver
***

What can I do?

Thanks for your help.

a a

unread,
Feb 16, 2011, 10:08:16 AM2/16/11
to us...@mule.codehaus.org
Thanks for your help.

I'm on Windows Seven...

As FTP server, I use Fizella server (isn't a FTP server???)... Do you think that it's the source of the problem??? What can I do?

a a

unread,
Feb 16, 2011, 10:28:58 AM2/16/11
to us...@mule.codehaus.org
I can run it on Linux (CentOS VM) to verify... (((By the way, can someone help to create users for "proftpd" on CentOS? I struggled to do that.)))

Help, help for my Mule ESB problem please...

a a

unread,
Feb 16, 2011, 10:42:37 AM2/16/11
to us...@mule.codehaus.org
Problem solved... On the "ftp-connector", i changed the attribute --"validateConnections="false"-- to --validateConnections="true", and it works now!!! I suppose (i'm not sure) that the problem came from there. Anyway ...

(Thanks to Andrew & Dirk for your help).

*
Stevy

Edited by: a a on 16 févr. 2011 07:42

Reply all
Reply to author
Forward
0 new messages