[mule-user] File & Ftp connectors Mule 2.1.2

9 views
Skip to first unread message

NabiL

unread,
Jan 14, 2009, 9:32:47 AM1/14/09
to us...@mule.codehaus.org

hi all,

I configured file connector to listen directory (c:/temp/files) with filter,
it works fine !!.

I've tried to configure the connectors as described bellow :

<ftp:connector name="myftp1" passive="true" validateConnections="true"
numberOfConcurrentTransactedReceivers="1"
outputPattern="#[ORIGINALNAME].done" >
<dispatcher-threading-profile doThreading="false" maxThreadsActive="1"
poolExhaustedAction="WAIT" threadWaitTimeout="60000"/>
</ftp:connector>

<file:connector name= "FileConnector" createMultipleTransactedReceivers="1"
autoDelete="true" numberOfConcurrentTransactedReceivers="1"
streaming="false" fileAge="60000">
<receiver-threading-profile doThreading="false" maxThreadsActive="1"
maxBufferSize="1" maxThreadsIdle="1" poolExhaustedAction="WAIT"
threadTTL="999999999" threadWaitTimeout="999999999"/>
</file:connector>

<inbound>

<file:inbound-endpoint remoteSync="true"
comparator="org.mule.transport.file.comparator.OlderFirstComparator"
path="/C:/temp/files" >
<!-- file:file-to-string-transformer /-->
<file:filename-wildcard-filter
pattern="test*.txt,*.xml,*.pdf"/>

</file:inbound-endpoint>
</inbound>

<outbound>
<pass-through-router>

<ftp:outbound-endpoint host="ssss" port="21" user="xxx"
password="xxxxx" path="/ftp"
outputPattern="#[ORIGINALNAME].done">
</ftp:outbound-endpoint>

</pass-through-router>
</outbound>

if ftp service is down the the following errors appear :

ERROR 2009-01-14 14:28:16,500 [FileConnector.receiver.1]
org.mule.DefaultExceptionStrategy:
********************************************************************************
Message : Streaming failed. Could not get output stream.
Failed to route event via endpoint:
DefaultOutboundEndpoint{endpointUri=ftp://userftp:<password>@pld1189//ftp,
connector=FtpConnector{this=ea48be, started=true, initialised=true,
name='myftp1', disposed=false, numberOfConcurrentTransactedReceivers=1,
createMultipleTransactedReceivers=true, connected=true,
supportedProtocols=[ftp], serviceOverrides=null}, transformer=[],
name='endpoint.ftp.pld1189.21.ftp',
properties={outputPattern=#[ORIGINALNAME].done},
transactionConfig=Transaction{factory=null, action=NEVER, timeout=0},
filter=null, deleteUnacceptedMessages=false, securityFilter=null,
synchronous=false, initialState=started, remoteSync=false,
remoteSyncTimeout=10000, endpointEncoding=UTF-8}. Message payload is of
type: byte[]
Type : org.mule.api.transport.DispatchException
Code : MULE_ERROR-42999
JavaDoc :
http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html
Payload : [B@e4245
********************************************************************************
Exception stack is:
1. Connection reset (java.net.SocketException)
java.net.SocketInputStream:168
(http://java.sun.com/j2se/1.5.0/docs/api/java/net/SocketException.html)
2. Streaming failed. Could not get output stream. Failed to route event via
endpoint:
DefaultOutboundEndpoint{endpointUri=ftp://userftp:<password>@pld1189//ftp,
connector=FtpConnector{this=ea48be, started=true, initialised=true,
name='myftp1', disposed=false, numberOfConcurrentTransactedReceivers=1,
createMultipleTransactedReceivers=true, connected=true,
supportedProtocols=[ftp], serviceOverrides=null}, transformer=[],
name='endpoint.ftp.pld1189.21.ftp',
properties={outputPattern=#[ORIGINALNAME].done},
transactionConfig=Transaction{factory=null, action=NEVER, timeout=0},
filter=null, deleteUnacceptedMessages=false, securityFilter=null,
synchronous=false, initialState=started, remoteSync=false,
remoteSyncTimeout=10000, endpointEncoding=UTF-8}. Message payload is of
type: byte[] (org.mule.api.transport.DispatchException)
org.mule.transport.ftp.FtpConnector:549
(http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html)
********************************************************************************
Root Exception stack trace:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:254)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at
org.apache.commons.net.telnet.TelnetInputStream.__read(TelnetInputStream.java:114)
at
org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream.java:535)
at java.lang.Thread.run(Thread.java:595)


how can i configure the file connector to select only one file (from
directory which contains severals files) and pass it to <ftp:outbound> ? the
next file will be picked up, until the ftp transfert done.

Who can help.
Thanks in advance

Nabil


--
View this message in context: http://www.nabble.com/File---Ftp-connectors-Mule-2.1.2-tp21457103p21457103.html
Sent from the Mule - User mailing list archive at Nabble.com.


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

http://xircles.codehaus.org/manage_email


Andrew Perepelytsya

unread,
Jan 14, 2009, 10:24:50 AM1/14/09
to us...@mule.codehaus.org
Configure the file connector receiver's profile to have only 1 thread, that should do it.

Andrew

NabiL

unread,
Jan 15, 2009, 3:55:16 AM1/15/09
to us...@mule.codehaus.org

hi Andrew,

Thanks for your reply. I've already done "file receiver's profile" but the
file connector seems to select all files. When i stop ftp service (installed
on win server), mule still pickued up files and forward to ftp:outbound
element.

Here is my file connector configuration :

<file:connector name= "FileConnector" createMultipleTransactedReceivers="1"
autoDelete="true" numberOfConcurrentTransactedReceivers="1"

streaming="false" pollingFrequency="10000" fileAge="60000">
<receiver-threading-profile doThreading="true" maxThreadsActive="1"


maxBufferSize="1" maxThreadsIdle="1" poolExhaustedAction="WAIT"
threadTTL="999999999" threadWaitTimeout="999999999"/>
</file:connector>

Thanks in advance.
Nabil

--
View this message in context: http://www.nabble.com/File---Ftp-connectors-Mule-2.1.2-tp21457103p21473649.html

Andrew Perepelytsya

unread,
Jan 15, 2009, 9:55:00 AM1/15/09
to us...@mule.codehaus.org
Did you try to use synchronous processing?

Andrew

NabiL

unread,
Jan 16, 2009, 1:49:13 PM1/16/09
to us...@mule.codehaus.org

hi Andrew

Thanks a lot for your help. Now i can treat files (on inbound-endpoint
element) in sequential mode. Must adding forwarding router.

Nabil


Andrew Perepelytsya wrote:
>
> Did you try to use synchronous processing?
>
> Andrew
>
>

--
View this message in context: http://www.nabble.com/File---Ftp-connectors-Mule-2.1.2-tp21457103p21506052.html

Reply all
Reply to author
Forward
0 new messages