[ 
https://issues.apache.org/activemq/browse/CAMEL-2165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55531#action_55531
 ] 

Claus Ibsen commented on CAMEL-2165:
------------------------------------

Thanks for the test project. I got it up and running and with the latest fix it 
can self heal the connection

As you can see from the log output the write does not fail anymore

{code}
2009-11-18 09:35:44,742 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Starting
2009-11-18 09:35:44,743 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Starting 
producer: 
Producer[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]
2009-11-18 09:35:44,746 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Not already 
connected/logged in. Connecting to: 
Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]
2009-11-18 09:35:45,792 INFO 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Connected and 
logged in to: 
Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]
2009-11-18 09:35:45,793 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - preWriteCheck 
send noop success: true
2009-11-18 09:35:45,856 INFO 
[org.apache.ftpserver.command.impl.STOR:pool-2-thread-1] - File uploaded 
/autreq/writeAttempt.txt
2009-11-18 09:35:45,857 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Wrote 
[autreq/writeAttempt.txt] to 
[Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]]
2009-11-18 09:35:54,681 ERROR 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - 
org.apache.camel.component.file.GenericFileOperationFailedException: File 
operation failed:  Connection closed without indication.. Code: 226
2009-11-18 09:35:54,681 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - preWriteCheck 
send noop success: false
2009-11-18 09:35:54,685 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - preWriteCheck 
forcing a disconnect as noop failed
2009-11-18 09:35:54,685 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Disconnecting 
from: 
Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]
2009-11-18 09:35:54,685 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Not already 
connected/logged in. Connecting to: 
Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]
2009-11-18 09:35:54,689 INFO 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Connected and 
logged in to: 
Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]
2009-11-18 09:35:54,745 INFO 
[org.apache.ftpserver.command.impl.STOR:pool-2-thread-1] - File uploaded 
/autreq/writeAttempt.txt
2009-11-18 09:35:54,745 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Wrote 
[autreq/writeAttempt.txt] to 
[Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]]
2009-11-18 09:36:04,681 ERROR 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - 
org.apache.camel.component.file.GenericFileOperationFailedException: File 
operation failed:  Connection closed without indication.. Code: 226
2009-11-18 09:36:04,681 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - preWriteCheck 
send noop success: false
2009-11-18 09:36:04,681 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - preWriteCheck 
forcing a disconnect as noop failed
2009-11-18 09:36:04,681 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Disconnecting 
from: 
Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]
2009-11-18 09:36:04,682 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Not already 
connected/logged in. Connecting to: 
Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]
2009-11-18 09:36:04,686 INFO 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Connected and 
logged in to: 
Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]
2009-11-18 09:36:04,741 INFO 
[org.apache.ftpserver.command.impl.STOR:pool-2-thread-1] - File uploaded 
/autreq/writeAttempt.txt
2009-11-18 09:36:04,741 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Wrote 
[autreq/writeAttempt.txt] to 
[Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]]
2009-11-18 09:36:14,681 ERROR 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - 
org.apache.camel.component.file.GenericFileOperationFailedException: File 
operation failed:  Connection closed without indication.. Code: 226
2009-11-18 09:36:14,682 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - preWriteCheck 
send noop success: false
2009-11-18 09:36:14,682 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - preWriteCheck 
forcing a disconnect as noop failed
2009-11-18 09:36:14,682 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Disconnecting 
from: 
Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]
2009-11-18 09:36:14,682 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Not already 
connected/logged in. Connecting to: 
Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]
2009-11-18 09:36:14,686 INFO 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Connected and 
logged in to: 
Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]
2009-11-18 09:36:14,740 INFO 
[org.apache.ftpserver.command.impl.STOR:pool-2-thread-2] - File uploaded 
/autreq/writeAttempt.txt
2009-11-18 09:36:14,741 DEBUG 
[org.apache.camel.component.file.remote.RemoteFileProducer:foo] - Wrote 
[autreq/writeAttempt.txt] to 
[Endpoint[ftp://camelu...@localhost:2121/autreq?passiveMode=true&password=camelUser]]

Process finished with exit code 143
{code}

> ftp uploads can fail: File operation failed:  Connection closed without 
> indication.. Code: 421
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2165
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2165
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>            Reporter: Karl Palsson
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: camel-ftp-2.1-SNAPSHOT.jar, camel-ftp-bug-CAMEL-2165.zip
>
>
> Looks like something that was fixed for CAMEL-444 didn't make it into 2.0?
> On 2.0.0, this is not a warning, this is a fatal.
> SEVERE: Exception occured during execution on the exchange: Exchange[Message: 
> XXXXXX]
> org.apache.camel.CamelExecutionException: Exception occured during execution 
> on the exchange: Exchange[Message: XXXXX]
>         at 
> org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1027)
>         at 
> org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:479)
>         at 
> org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:431)
>         at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:106)
>         at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:122)
>         at 
> org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:266)
>         at... into my code here...
> Caused by: 
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed:  Connection closed without indication.. Code: 421
>         at 
> org.apache.camel.component.file.remote.FtpOperations.disconnect(FtpOperations.java:167)
>         at 
> org.apache.camel.component.file.remote.RemoteFileProducer.disconnect(RemoteFileProducer.java:77)
>         at 
> org.apache.camel.component.file.remote.RemoteFileProducer.handleFailedWrite(RemoteFileProducer.java:66)
>         at 
> org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:104)
>         at 
> org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:52)
>         at 
> org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:81)
>         at 
> org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:79)
>         at 
> org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:141)
>         at 
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:78)
>         at 
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
>         at 
> org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:186)
>         at 
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:155)
>         at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
>         at 
> org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
>         at 
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:148)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)
>         at 
> org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:54)
>         at 
> org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
>         at 
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:45)
>         at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:170)
>         at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:156)
>         at 
> org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:141)
>         at 
> org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:155)
>         at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:111)
>         at 
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:101)
>         at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:105)
>         ... 37 more
> Caused by: org.apache.commons.net.ftp.FTPConnectionClosedException: 
> Connection closed without indication.
>         at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:297)
> This is "not what I want"  and there doesn't seem to be any keep alive or 
> other option on the ftp2 component.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to