You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Glebow, Philip" <Ph...@blackrock.com> on 2010/07/19 22:51:00 UTC
Camel 2.4 - Shutdown Exception
I'm using Camel 2.4 and this route to move files from a remote SFTP site
to a local directory:
from("sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binary=t
rue&move=.done").to("file:/c:/camelTmp")
When I run this in a unit test that extends CamelTestSupport, I usually
get a GenericFileOperationFailedException while the CamelContext is
shutting down. These are the log entries that I see:
DEBUG : tearDown test
DEBUG : ShutdownNow ExecutorService:
java.util.concurrent.ThreadPoolExecutor@17471e0
INFO : Apache Camel 2.4.0 (CamelContext:camel-1) is shutting
down
INFO : Starting to graceful shutdown 1 routes (timeout 10
seconds)
DEBUG : Created new single thread pool for source:
org.apache.camel.impl.DefaultShutdownStrategy@16c9867 with name:
ShutdownTask. ->
java.util.concurrent.Executors$FinalizableDelegatedExecutorService@89cc5
e
DEBUG : There are 1 routes to shutdown
DEBUG : Suspend complete for:
Consumer[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binar
y=true&move=.done]
INFO : Route: route1 suspended and shutdown deferred, was
consuming from:
Endpoint[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binar
y=true&move=.done]
DEBUG : Stopping consumer:
Consumer[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binar
y=true&move=.done]
DEBUG : Stopping producer: Producer[file:///c:/camelTmp]
DEBUG : Disconnecting from: sftp://<user>@<host>:22
INFO : JSCH -> Disconnecting from <host> port 22
WARN : Trying to recover by disconnecting from remote server
forcing a re-connect at next poll: sftp://<user>@<host>:22
WARN : Consumer
Consumer[[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&bina
ry=true&move=.done] could not poll endpoint:
sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binary=true&mo
ve=.done caused by: Cannot list directory: FTPDir/testFiles
It looks like the shutdown is occurring in the middle of directory list
operation; it seems to be cause by this exception:
Caused by: java.io.IOException: inputstream is closed
at
com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2327)
at
com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2351)
at
com.jcraft.jsch.ChannelSftp.checkStatus(ChannelSftp.java:1924)
at
com.jcraft.jsch.ChannelSftp._sendCLOSE(ChannelSftp.java:1943)
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1320)
Things do shutdown but I'm wondering if this is a symptom of a problem?
Phil
THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY, AND MAY BE PRIVILEGED. If this message was misdirected, BlackRock, Inc. and its subsidiaries, ("BlackRock") does not waive any confidentiality or privilege. If you are not the intended recipient, please notify us immediately and destroy the message without disclosing its contents to anyone. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of BlackRock, unless the author is authorized by BlackRock to express such views or opinions on its behalf. All email sent to or from this address is subject to electronic storage and review by BlackRock. Although BlackRock operates anti-virus programs, it does not accept responsibility for any damage whatsoever caused by viruses being passed.
Re: Camel 2.4 - Shutdown Exception
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
I have committed a fix to trunk. You are welcome to test with latest
source code on your system, if the logging is "more friendly" when
shutting down Camel.
On Tue, Jul 20, 2010 at 10:57 AM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Yeah its just a warning that the ftp operation could not complete due
> it being shutting down.
> I will polish the logging a bit so you wont see the WARN and
> stacktraces during shutdown.
>
>
> On Mon, Jul 19, 2010 at 10:51 PM, Glebow, Philip
> <Ph...@blackrock.com> wrote:
>> I'm using Camel 2.4 and this route to move files from a remote SFTP site
>> to a local directory:
>>
>>
>> from("sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binary=t
>> rue&move=.done").to("file:/c:/camelTmp")
>>
>> When I run this in a unit test that extends CamelTestSupport, I usually
>> get a GenericFileOperationFailedException while the CamelContext is
>> shutting down. These are the log entries that I see:
>>
>> DEBUG : tearDown test
>> DEBUG : ShutdownNow ExecutorService:
>> java.util.concurrent.ThreadPoolExecutor@17471e0
>> INFO : Apache Camel 2.4.0 (CamelContext:camel-1) is shutting
>> down
>> INFO : Starting to graceful shutdown 1 routes (timeout 10
>> seconds)
>> DEBUG : Created new single thread pool for source:
>> org.apache.camel.impl.DefaultShutdownStrategy@16c9867 with name:
>> ShutdownTask. ->
>> java.util.concurrent.Executors$FinalizableDelegatedExecutorService@89cc5
>> e
>> DEBUG : There are 1 routes to shutdown
>> DEBUG : Suspend complete for:
>> Consumer[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binar
>> y=true&move=.done]
>> INFO : Route: route1 suspended and shutdown deferred, was
>> consuming from:
>> Endpoint[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binar
>> y=true&move=.done]
>> DEBUG : Stopping consumer:
>> Consumer[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binar
>> y=true&move=.done]
>> DEBUG : Stopping producer: Producer[file:///c:/camelTmp]
>> DEBUG : Disconnecting from: sftp://<user>@<host>:22
>> INFO : JSCH -> Disconnecting from <host> port 22
>> WARN : Trying to recover by disconnecting from remote server
>> forcing a re-connect at next poll: sftp://<user>@<host>:22
>> WARN : Consumer
>> Consumer[[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&bina
>> ry=true&move=.done] could not poll endpoint:
>> sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binary=true&mo
>> ve=.done caused by: Cannot list directory: FTPDir/testFiles
>>
>> It looks like the shutdown is occurring in the middle of directory list
>> operation; it seems to be cause by this exception:
>>
>> Caused by: java.io.IOException: inputstream is closed
>> at
>> com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2327)
>> at
>> com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2351)
>> at
>> com.jcraft.jsch.ChannelSftp.checkStatus(ChannelSftp.java:1924)
>> at
>> com.jcraft.jsch.ChannelSftp._sendCLOSE(ChannelSftp.java:1943)
>> at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1320)
>>
>> Things do shutdown but I'm wondering if this is a symptom of a problem?
>>
>> Phil
>>
>>
>>
>>
>>
>> THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY, AND MAY BE PRIVILEGED. If this message was misdirected, BlackRock, Inc. and its subsidiaries, ("BlackRock") does not waive any confidentiality or privilege. If you are not the intended recipient, please notify us immediately and destroy the message without disclosing its contents to anyone. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of BlackRock, unless the author is authorized by BlackRock to express such views or opinions on its behalf. All email sent to or from this address is subject to electronic storage and review by BlackRock. Although BlackRock operates anti-virus programs, it does not accept responsibility for any damage whatsoever caused by viruses being passed.
>>
>>
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: Camel 2.4 - Shutdown Exception
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Yeah its just a warning that the ftp operation could not complete due
it being shutting down.
I will polish the logging a bit so you wont see the WARN and
stacktraces during shutdown.
On Mon, Jul 19, 2010 at 10:51 PM, Glebow, Philip
<Ph...@blackrock.com> wrote:
> I'm using Camel 2.4 and this route to move files from a remote SFTP site
> to a local directory:
>
>
> from("sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binary=t
> rue&move=.done").to("file:/c:/camelTmp")
>
> When I run this in a unit test that extends CamelTestSupport, I usually
> get a GenericFileOperationFailedException while the CamelContext is
> shutting down. These are the log entries that I see:
>
> DEBUG : tearDown test
> DEBUG : ShutdownNow ExecutorService:
> java.util.concurrent.ThreadPoolExecutor@17471e0
> INFO : Apache Camel 2.4.0 (CamelContext:camel-1) is shutting
> down
> INFO : Starting to graceful shutdown 1 routes (timeout 10
> seconds)
> DEBUG : Created new single thread pool for source:
> org.apache.camel.impl.DefaultShutdownStrategy@16c9867 with name:
> ShutdownTask. ->
> java.util.concurrent.Executors$FinalizableDelegatedExecutorService@89cc5
> e
> DEBUG : There are 1 routes to shutdown
> DEBUG : Suspend complete for:
> Consumer[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binar
> y=true&move=.done]
> INFO : Route: route1 suspended and shutdown deferred, was
> consuming from:
> Endpoint[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binar
> y=true&move=.done]
> DEBUG : Stopping consumer:
> Consumer[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binar
> y=true&move=.done]
> DEBUG : Stopping producer: Producer[file:///c:/camelTmp]
> DEBUG : Disconnecting from: sftp://<user>@<host>:22
> INFO : JSCH -> Disconnecting from <host> port 22
> WARN : Trying to recover by disconnecting from remote server
> forcing a re-connect at next poll: sftp://<user>@<host>:22
> WARN : Consumer
> Consumer[[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&bina
> ry=true&move=.done] could not poll endpoint:
> sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binary=true&mo
> ve=.done caused by: Cannot list directory: FTPDir/testFiles
>
> It looks like the shutdown is occurring in the middle of directory list
> operation; it seems to be cause by this exception:
>
> Caused by: java.io.IOException: inputstream is closed
> at
> com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2327)
> at
> com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2351)
> at
> com.jcraft.jsch.ChannelSftp.checkStatus(ChannelSftp.java:1924)
> at
> com.jcraft.jsch.ChannelSftp._sendCLOSE(ChannelSftp.java:1943)
> at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1320)
>
> Things do shutdown but I'm wondering if this is a symptom of a problem?
>
> Phil
>
>
>
>
>
> THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY, AND MAY BE PRIVILEGED. If this message was misdirected, BlackRock, Inc. and its subsidiaries, ("BlackRock") does not waive any confidentiality or privilege. If you are not the intended recipient, please notify us immediately and destroy the message without disclosing its contents to anyone. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of BlackRock, unless the author is authorized by BlackRock to express such views or opinions on its behalf. All email sent to or from this address is subject to electronic storage and review by BlackRock. Although BlackRock operates anti-virus programs, it does not accept responsibility for any damage whatsoever caused by viruses being passed.
>
>
>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus