You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/06/26 07:00:00 UTC

[jira] [Commented] (CAMEL-15245) On route shutdown timeout DefaultShutdownStrategy.forceShutdown remains set to true

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

Claus Ibsen commented on CAMEL-15245:
-------------------------------------

Just to be sure you are stopping one route, and expect other routes to keep running? In other words you are not stopping/shutting down the entire CamelContext - as the latter should force shutdown all routes and stop Camel itself (and if so then the behaviour is correct)

> On route shutdown timeout DefaultShutdownStrategy.forceShutdown remains set to true
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-15245
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15245
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 3.4.0
>         Environment: Linux Ubuntu 5.7.4-050704-generic #202006181331 SMP Thu Jun 18 13:33:57 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: Jh. To.
>            Priority: Minor
>             Fix For: 3.5.0
>
>
> I see the following behavior with the default shutdown strategy: when the graceful shutdown of a route times-out, a forced shutdow is executed by Camel. The following is logged in this case:
> {code:bash}
> 2020-06-25 14:59:57,640 INFO  http-nio-127.0.0.1-9080-exec-10 [] [] org.apache.camel.impl.engine.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
> 2020-06-25 15:00:07,647 WARN  http-nio-127.0.0.1-9080-exec-10 [] [] org.apache.camel.impl.engine.DefaultShutdownStrategy - Timeout occurred during graceful shutdown. Forcing the routes to be shutdown now. Notice: some resources may still be running as graceful shutdown did not complete successfully.
> {code}
> After the forced shutdown succeeds the following is logged
> {code:bash}
> 2020-06-25 15:00:08,711 INFO  http-nio-127.0.0.1-9080-exec-10 [] [] org.apache.camel.impl.engine.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 11 seconds
> {code}
> After the starting the route however the default shutdown strategy from the camel context has the forceShutdown flag set to true, causing the execution of the route to fail as follows:
> {code:bash}
> Caused by: java.util.concurrent.RejectedExecutionException: Run not allowed as ShutdownStrategy is forcing shutting down, will reject executing exchange: Exchange[]
> 	at org.apache.camel.processor.SharedCamelInternalProcessor.continueProcessing(SharedCamelInternalProcessor.java:310) ~[camel-base-3.4.0.jar:3.4.0]
> 	at org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:145) ~[camel-base-3.4.0.jar:3.4.0]
> 	at org.apache.camel.processor.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:110) ~[camel-base-3.4.0.jar:3.4.0]
> 	at org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83) ~[camel-base-3.4.0.jar:3.4.0]
> 	at org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:107) ~[camel-base-3.4.0.jar:3.4.0]
> 	at org.apache.camel.impl.engine.DefaultProducerCache.send(DefaultProducerCache.java:185) ~[camel-base-3.4.0.jar:3.4.0]
> 	at org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176) ~[camel-base-3.4.0.jar:3.4.0]
> 	at org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172) ~[camel-base-3.4.0.jar:3.4.0]
> 	at org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:153) ~[camel-base-3.4.0.jar:3.4.0]
> 	at org.apache.camel.impl.engine.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:295) ~[camel-base-3.4.0.jar:3.4.0]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)