camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Limitations or bug on FTP2 with FTPS
Date Thu, 12 May 2011 06:19:03 GMT
Hi

Thanks for the logs. I have created a ticket to track this issue
https://issues.apache.org/jira/browse/CAMEL-3965

I have committed a fix on trunk.



On Wed, May 11, 2011 at 6:50 PM, Laurentiu Trica
<laurentiu.trica@finalfolder.biz> wrote:
> Hi,
>
> Thanks for your message.
>
> I did a TRACE logging and this is the result:
>
> 19:34:27,119 | TRACE | timer1           | FtpsOperations                
  |
> 199 - org.apache.camel.camel-ftp - 2.6.0.fuse-01-09 | sendNoOp
> 19:34:27,119 | TRACE | timer1           | FtpsOperations                
  |
> 199 - org.apache.camel.camel-ftp - 2.6.0.fuse-01-09 | sendNoOp
> 19:34:27,120 | TRACE | timer1           | RemoteFileProducer              
|
> 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | preWriteCheck send
> noop success: false
> 19:34:27,120 | TRACE | timer1           | RemoteFileProducer              
|
> 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | preWriteCheck send
> noop success: false
> 19:34:27,120 | TRACE | timer1           | FtpsOperations                
  |
> 199 - org.apache.camel.camel-ftp - 2.6.0.fuse-01-09 | buildDirectory(in)
> 19:34:27,120 | TRACE | timer1           | FtpsOperations                
  |
> 199 - org.apache.camel.camel-ftp - 2.6.0.fuse-01-09 | buildDirectory(in)
> 19:34:27,121 | WARN  | timer1           | RemoteFileProducer            
  |
> 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | Writing file failed
> with: File operation failed: 421 Connection timed out.
>  Broken pipe. Code: 421
> 19:34:27,121 | WARN  | timer1           | RemoteFileProducer            
  |
> 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | Writing file failed
> with: File operation failed: 421 Connection timed out.
>  Broken pipe. Code: 421
> 19:34:27,121 | DEBUG | timer1           | RemoteFileProducer              
|
> 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | Disconnecting from:
> Endpoint[ftps://
> sftp-test@192.168.0.25:990/in?isImplicit=true&passiveMode=true&password=******
> ]
> 19:34:27,121 | DEBUG | timer1           | RemoteFileProducer              
|
> 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | Disconnecting from:
> Endpoint[ftps://
> sftp-test@192.168.0.25:990/in?isImplicit=true&passiveMode=true&password=******
> ]
> 19:34:27,122 | DEBUG | timer1           | RemoteFileProducer              
|
> 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | Ignored exception
> during disconnect: File operation failed: 421 Connection timed out.
>  Connection has been shutdown: javax.net.ssl.SSLException:
> java.net.SocketException: Broken pipe. Code: 421
> 19:34:27,122 | DEBUG | timer1           | RemoteFileProducer              
|
> 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | Ignored exception
> during disconnect: File operation failed: 421 Connection timed out.
>  Connection has been shutdown: javax.net.ssl.SSLException:
> java.net.SocketException: Broken pipe. Code: 421
> 19:34:27,123 | ERROR | timer1           | DefaultErrorHandler            
 |
> 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | Failed delivery for
> exchangeId: ID-moredevs4-50347-1305131627526-1-64. Exhausted after delivery
> attempt: 1 caught:
> org.apache.camel.component.file.GenericFileOperationFailedException: File
> operation failed: 421 Connection timed out.
>  Broken pipe. Code: 421
> org.apache.camel.component.file.GenericFileOperationFailedException: File
> operation failed: 421 Connection timed out.
>  Broken pipe. Code: 421
>    at
> org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:272)[199:org.apache.camel.camel-ftp:2.6.0.fuse-01-09]
>    at
> org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:256)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:163)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:50)[199:org.apache.camel.camel-ftp:2.6.0.fuse-01-09]
>    at
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:104)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at
> org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:49)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>    at java.util.TimerThread.mainLoop(Timer.java:512)[:1.6.0_24]
>    at java.util.TimerThread.run(Timer.java:462)[:1.6.0_24]
> Caused by: java.net.SocketException: Broken pipe
>    at java.net.SocketOutputStream.socketWrite0(Native Method)[:1.6.0_24]
>    at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)[:1.6.0_24]
>    at
> java.net.SocketOutputStream.write(SocketOutputStream.java:136)[:1.6.0_24]
>    at
> com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:297)[:1.6]
>    at
> com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:286)[:1.6]
>    at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:743)[:1.6]
>    at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:731)[:1.6]
>    at
> com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)[:1.6]
>    at
> sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)[:1.6.0_24]
>    at
> sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)[:1.6.0_24]
>    at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)[:1.6.0_24]
>    at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)[:1.6.0_24]
>    at
> java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)[:1.6.0_24]
>    at java.io.BufferedWriter.flush(BufferedWriter.java:236)[:1.6.0_24]
>    at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:477)[152:org.apache.commons.net:2
> .2]
>    at
> org.apache.commons.net.ftp.FTPSClient.sendCommand(FTPSClient.java:486)[152:org.apache.commons.net:2
> .2]
>    at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:537)[152:org.apache.commons.net:2
> .2]
>    at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:586)[152:org.apache.commons.net:2
> .2]
>    at
> org.apache.commons.net.ftp.FTP.pwd(FTP.java:1381)[152:org.apache.commons.net:2
> .2]
>    at
> org.apache.commons.net.ftp.FTPClient.printWorkingDirectory(FTPClient.java:1990)[152:org.apache.commons.net:2
> .2]
>    at
> org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:247)[199:org.apache.camel.camel-ftp:2.6.0.fuse-01-09]
>    ... 34 more
>
> It does seem like it's sending a NOOP message but somehow it's not detecting
> that the connection is down.
> Can I help you with more information?
>
> Regards,
> Laurentiu
>
> On Tue, May 10, 2011 at 9:24 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
>
>> Hi
>>
>> Can you try enabling TRACE level logging on:
>> org.apache.camel.component.file.remote
>>
>> When camel-ftp is being used, it will issue a NOOP command first to
>> check if the connection still works.
>> So you should see this TRACE logging
>>    log.trace("preWriteCheck send noop success: {}", noop);
>>
>> If its not a success, it would try to re-connect.
>>
>> Can you check what the NOOP log is for you?
>>
>>
>>
>> On Thu, May 5, 2011 at 12:31 PM, Laurentiu Trica
>> <laurentiu.trica@finalfolder.biz> wrote:
>> > Hello,
>> >
>> > I'm using an FTPS endpoint to output my route and I have a problem.
>> > On one FTPS endpoint I get the following error, from time to time:
>> >
>> > 13:01:00,770 | WARN  | ZZZ-OUT-thread-2 | RemoteFileProducer
>>   |
>> > 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | Writing file failed
>> > with: File operation failed: 250 Directory changed to "/"
>> >  Connection has been shutdown: javax.net.ssl.SSLException:
>> > java.net.SocketException: Connection reset. Code: 250
>> > 13:01:00,774 | ERROR | ZZZ-OUT-thread-2 | DefaultErrorHandler
>>  |
>> > 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | Failed delivery for
>> > exchangeId: ID-s15432285-56390-1304014965805-3-18. Exhausted after
>> delivery
>> > attempt: 1 caught:
>> > org.apache.camel.component.file.GenericFileOperationFailedException: File
>> > operation failed: 250 Directory changed to "/"
>> >  Connection has been shutdown: javax.net.ssl.SSLException:
>> > java.net.SocketException: Connection reset. Code: 250
>> > org.apache.camel.component.file.GenericFileOperationFailedException: File
>> > operation failed: 250 Directory changed to "/"
>> >  Connection has been shutdown: javax.net.ssl.SSLException:
>> > java.net.SocketException: Connection reset. Code: 250
>> >    at
>> >
>> org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:272)[212:org.apache.camel.camel-ftp:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:256)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:163)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:50)[212:org.apache.camel.camel-ftp:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.servicemix.camel.nmr.ServiceMixConsumer.process(ServiceMixConsumer.java:78)[213:org.apache.servicemix.camel.component:4.3.1.fuse-01-09]
>> >    at
>> >
>> org.apache.servicemix.nmr.core.InternalEndpointWrapper.process(InternalEndpointWrapper.java:86)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-09]
>> >    at
>> >
>> org.apache.servicemix.nmr.core.ChannelImpl.process(ChannelImpl.java:255)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-09]
>> >    at
>> >
>> org.apache.servicemix.nmr.core.ChannelImpl$1.run(ChannelImpl.java:215)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-09]
>> >    at
>> >
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.6.0_17]
>> >    at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.6.0_17]
>> >    at java.lang.Thread.run(Thread.java:636)[:1.6.0_17]
>> > Caused by: javax.net.ssl.SSLException: Connection has been shutdown:
>> > javax.net.ssl.SSLException: java.net.SocketException: Connection reset
>> >    at
>> >
>> sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1313)[:1.6.0_17]
>> >    at
>> >
>> sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1325)[:1.6.0_17]
>> >    at
>> >
>> sun.security.ssl.AppOutputStream.write(AppOutputStream.java:62)[:1.6.0_17]
>> >    at
>> > sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:220)[:1.6.0_17]
>> >    at
>> >
>> sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:290)[:1.6.0_17]
>> >    at
>> sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:294)[:1.6.0_17]
>> >    at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:140)[:1.6.0_17]
>> >    at
>> > java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)[:1.6.0_17]
>> >    at java.io.BufferedWriter.flush(BufferedWriter.java:253)[:1.6.0_17]
>> >    at
>> > org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:477)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> >
>> org.apache.commons.net.ftp.FTPSClient.sendCommand(FTPSClient.java:486)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> > org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:537)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> > org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:586)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> > org.apache.commons.net.ftp.FTP.pwd(FTP.java:1381)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> >
>> org.apache.commons.net.ftp.FTPClient.printWorkingDirectory(FTPClient.java:1990)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> >
>> org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:247)[212:org.apache.camel.camel-ftp:2.6.0.fuse-01-09]
>> >    ... 32 more
>> > Caused by: javax.net.ssl.SSLException: java.net.SocketException:
>> Connection
>> > reset
>> >    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)[:1.6.0_17]
>> >    at
>> > sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1665)[:1.6.0_17]
>> >    at
>> > sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1628)[:1.6.0_17]
>> >    at
>> >
>> sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1592)[:1.6.0_17]
>> >    at
>> >
>> sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1537)[:1.6.0_17]
>> >    at
>> >
>> sun.security.ssl.AppOutputStream.write(AppOutputStream.java:83)[:1.6.0_17]
>> >    at
>> > sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:220)[:1.6.0_17]
>> >    at
>> >
>> sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:290)[:1.6.0_17]
>> >    at
>> sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:294)[:1.6.0_17]
>> >    at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:140)[:1.6.0_17]
>> >    at
>> > java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)[:1.6.0_17]
>> >    at java.io.BufferedWriter.flush(BufferedWriter.java:253)[:1.6.0_17]
>> >    at
>> > org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:477)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> >
>> org.apache.commons.net.ftp.FTPSClient.sendCommand(FTPSClient.java:486)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> > org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:537)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> > org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:586)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> > org.apache.commons.net.ftp.FTP.noop(FTP.java:1596)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> > org.apache.commons.net.ftp.FTPClient.sendNoOp(FTPClient.java:2144)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> >
>> org.apache.camel.component.file.remote.FtpOperations.sendNoop(FtpOperations.java:671)[212:org.apache.camel.camel-ftp:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.component.file.remote.RemoteFileProducer.preWriteCheck(RemoteFileProducer.java:101)[212:org.apache.camel.camel-ftp:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:113)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    ... 30 more
>> > Caused by: java.net.SocketException: Connection reset
>> >    at
>> >
>> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)[:1.6.0_17]
>> >    at
>> > java.net.SocketOutputStream.write(SocketOutputStream.java:153)[:1.6.0_17]
>> >    at
>> >
>> sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:314)[:1.6.0_17]
>> >    at
>> sun.security.ssl.OutputRecord.write(OutputRecord.java:303)[:1.6.0_17]
>> >    at
>> >
>> sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:763)[:1.6.0_17]
>> >    at
>> >
>> sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:751)[:1.6.0_17]
>> >    at
>> >
>> sun.security.ssl.AppOutputStream.write(AppOutputStream.java:78)[:1.6.0_17]
>> >    ... 45 more
>> >
>> > *I tried to reproduce the problem and I set up a Filezilla FTPS server
>> with
>> > a timeout of 30s*
>> > I figured out that when a connection is open, the file is processed and
>> sent
>> > flawlessly.
>> > If another file is processed within 30s (the timeout), it also works ok.
>> > But if the file is sent after the connection closes due to timeout, FTP2
>> > seems not to acknowledge it and still tries to send the file and gets an
>> > timeout error like the following one:
>> >
>> > 12:51:31,070 | WARN  | LAB-OUT-thread-2 | RemoteFileProducer
>>   |
>> > 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | Writing file failed
>> > with: File operation failed: 421 Connection timed out.
>> >  Broken pipe. Code: 421
>> > 12:51:31,072 | ERROR | LAB-OUT-thread-2 | DefaultErrorHandler
>>  |
>> > 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | Failed delivery for
>> > exchangeId: ID-moredevs4-45371-1304588991086-2-14. Exhausted after
>> delivery
>> > attempt: 1 caught:
>> > org.apache.camel.component.file.GenericFileOperationFailedException: File
>> > operation failed: 421 Connection timed out.
>> >  Broken pipe. Code: 421
>> > org.apache.camel.component.file.GenericFileOperationFailedException: File
>> > operation failed: 421 Connection timed out.
>> >  Broken pipe. Code: 421
>> >    at
>> >
>> org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:272)[199:org.apache.camel.camel-ftp:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:256)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:163)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:50)[199:org.apache.camel.camel-ftp:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0.fuse-01-09]
>> >    at
>> >
>> org.apache.servicemix.camel.nmr.ServiceMixConsumer.process(ServiceMixConsumer.java:78)[197:org.apache.servicemix.camel.component:4.3.1.fuse-01-09]
>> >    at
>> >
>> org.apache.servicemix.nmr.core.InternalEndpointWrapper.process(InternalEndpointWrapper.java:86)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-09]
>> >    at
>> >
>> org.apache.servicemix.nmr.core.ChannelImpl.process(ChannelImpl.java:255)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-09]
>> >    at
>> >
>> org.apache.servicemix.nmr.core.ChannelImpl$1.run(ChannelImpl.java:215)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-09]
>> >    at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_24]
>> >    at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_24]
>> >    at java.lang.Thread.run(Thread.java:662)[:1.6.0_24]
>> > Caused by: java.net.SocketException: Broken pipe
>> >    at java.net.SocketOutputStream.socketWrite0(Native Method)[:1.6.0_24]
>> >    at
>> >
>> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)[:1.6.0_24]
>> >    at
>> > java.net.SocketOutputStream.write(SocketOutputStream.java:136)[:1.6.0_24]
>> >    at
>> >
>> com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:297)[:1.6]
>> >    at
>> >
>> com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:286)[:1.6]
>> >    at
>> >
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:743)[:1.6]
>> >    at
>> >
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:731)[:1.6]
>> >    at
>> >
>> com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)[:1.6]
>> >    at
>> > sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)[:1.6.0_24]
>> >    at
>> >
>> sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)[:1.6.0_24]
>> >    at
>> sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)[:1.6.0_24]
>> >    at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)[:1.6.0_24]
>> >    at
>> > java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)[:1.6.0_24]
>> >    at java.io.BufferedWriter.flush(BufferedWriter.java:236)[:1.6.0_24]
>> >    at
>> > org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:477)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> >
>> org.apache.commons.net.ftp.FTPSClient.sendCommand(FTPSClient.java:486)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> > org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:537)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> > org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:586)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> > org.apache.commons.net.ftp.FTP.pwd(FTP.java:1381)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> >
>> org.apache.commons.net.ftp.FTPClient.printWorkingDirectory(FTPClient.java:1990)[152:
>> org.apache.commons.net:2
>> > .2]
>> >    at
>> >
>> org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:247)[199:org.apache.camel.camel-ftp:2.6.0.fuse-01-09]
>> >    ... 32 more
>> >
>> > As you can see, the error is slightly different, but I would guess it has
>> > the same roots.
>> >
>> > *I saw some FTP2 options I could use, like:*
>> > - *disconnect* - to force a disconnection after each operation - is this
>> a
>> > good approach? What if I have to send 3 files on three separate
>> transactions
>> > (exchanges), does this mean I will have 3 different connections for each
>> > file?
>> > - *soTimeout* and *timeout* - should I use something like this to prevent
>> > the connection closing on the other side before closing it on my side? Is
>> > this the common practice?
>> >
>> > Please help me figure out a way to understand and fix this problem.
>> >
>> > Thank you!
>> >
>> >
>> > --
>> > Laurentiu Trica
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> CamelOne 2011: http://fusesource.com/camelone2011/
>> Twitter: davsclaus
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message