[
https://issues.apache.org/jira/browse/CAMEL-13310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
storage updated CAMEL-13310:
----------------------------
Description:
In our project we are have a camel context and in certain situations we would
like to terminate the context and all it routes immediately. For this we have
the following code:
{code:java}
private void stopContextImmediately(CamelContext context) throws
ExecutorException {
try {
ShutdownStrategy shutdownStrategy =
context.getShutdownStrategy();
shutdownStrategy.setTimeUnit(TimeUnit.MILLISECONDS);
shutdownStrategy.setTimeout(1);
shutdownStrategy.setShutdownNowOnTimeout(true);
context.setShutdownStrategy(shutdownStrategy);
for (Route route : context.getRoutes()) {
System.out.println("context.stopRoute: " +
route.getId()
+ " - " + route.getDescription());
context.stopRoute(route.getId(), 1,
TimeUnit.MILLISECONDS,
false);
}
context.stop();
} catch (Exception e) {
error("Can''t stop camel for file {0} in archive {1}", e);
}
}
{code}
But after the graceful shutdown with a timeout of 1 milisec has be initiated we
get a warning:
{color:#707070}_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. (see stacktrace below){color}
We notice that there still is a thread running with in this case contains a
job of our http component which is trying to send a http post with a retry
pattern.
*Question*: How can we forcefully terminate the running routes and it's
threads? (we also want to prevent that the whole java application is killed,
SIGTERM not an option)
{code:java}
2019-02-13 14:39:27.979 [:] [restartedMain ] INFO
oyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
2019-02-13 14:39:27.996 [:] [restartedMain ] INFO
mbedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8080 (http) with
context path ''
2019-02-13 14:39:27.998 [:] [restartedMain ] INFO
m.unit.u4ip.gmp.CamelApplication - Started CamelApplication in 5.461 seconds
(JVM running for 6.91)
2019-02-13 14:39:28.009 [:] [restartedMain ] DEBUG
oot.devtools.restart.Restarter - Creating new Restarter for thread
Thread[main,5,main]
2019-02-13 14:39:28.009 [:] [restartedMain ] DEBUG
oot.devtools.restart.Restarter - Immediately restarting application
2019-02-13 14:39:28.009 [:] [restartedMain ] DEBUG
oot.devtools.restart.Restarter - Created RestartClassLoader
org.springframework.boot.devtools.restart.classloader.RestartClassLoader@4316e59b
2019-02-13 14:39:28.010 [:] [restartedMain ] DEBUG
oot.devtools.restart.Restarter - Starting application
com.s.sdd.abv.CamelApplication with URLs
[file:/C:/development/code/workspace-idea/gmp-project/gmp/target/classes/]
2019-02-13 14:39:28.435 [:] [on(2)-10.0.75.1] INFO
rBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet
'dispatcherServlet'
2019-02-13 14:39:28.435 [:] [on(2)-10.0.75.1] INFO
.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
2019-02-13 14:39:28.449 [:] [on(2)-10.0.75.1] INFO
.web.servlet.DispatcherServlet - Completed initialization in 14 ms
2019-02-13 14:39:34.857 [490f8c58da7accf9:] [ntExecutorGroup] INFO
curity.m2m.AccessTokenProvider - Fetching access token for scopes "ik" from
"https://url.com/identity/connect/token"
2019-02-13 14:39:36.260 [490f8c58da7accf9:] [pool-2-thread-1] INFO
converter.DefaultTypeConverter - Type converters loaded (core: 195, classpath:
41)
2019-02-13 14:39:36.264 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2) is
starting
2019-02-13 14:39:36.264 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ment.ManagedManagementStrategy - JMX is enabled
2019-02-13 14:39:36.292 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'ConvertBodyTo[java.lang.String]'
2019-02-13 14:39:36.297 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'SetBody[simple{${body.replaceAll("\(|\)", "")}}]'
2019-02-13 14:39:36.302 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'Unmarshal[org.apache.camel.model.dataformat.XmlJsonDataFormat@62a53f37]'
2019-02-13 14:39:36.310 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'SetHeader[CamelHttpUri,
constant{https://www7.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP}]'
2019-02-13 14:39:36.313 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'SetHeader[CamelHttpUri,
constant{https://www.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP}]'
2019-02-13 14:39:36.314 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'Choice[[When[xpath{XPath: /root/e/TestMessage} -> [SetHeader[CamelHttpUri,
constant{https://www7.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP}]]]]
Otherwise[[SetHeader[CamelHttpUri,
constant{https://www.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP}]]]]'
2019-02-13 14:39:36.323 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'To[xslt:xslt/requestInvoicesReceived.xsl]'
2019-02-13 14:39:36.325 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'SetProperty[SoapRequestBody, simple{${body}}]'
2019-02-13 14:39:36.327 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'To[direct:http-call-route]'
2019-02-13 14:39:36.328 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'To[xslt:xslt/concatSoapRequestResponse.xsl]'
2019-02-13 14:39:36.329 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'SetHeader[certHeaderName, constant{test1}]'
2019-02-13 14:39:36.331 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'SetHeader[Content-Type, constant{text/xml; charset=utf-8}]'
2019-02-13 14:39:36.345 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.component.http4.HttpComponent - Created ClientConnectionManager
org.apache.http.impl.conn.PoolingHttpClientConnectionManager@65b98b52
2019-02-13 14:39:36.349 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'To[https://localhost?aliasHeader=certHeaderName&socketTimeout=5000&connectTimeout=5000&connectionRequestTimeout=5000]'
2019-02-13 14:39:36.350 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'ConvertBodyTo[java.lang.String]'
2019-02-13 14:39:36.351 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.impl.DefaultCamelContext - StreamCaching is not in use. If using streams
then its recommended to enable stream caching. See more details at
http://camel.apache.org/stream-caching.html
2019-02-13 14:39:36.357 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.builder.xml.XPathBuilder - Created default XPathFactory
org.apache.xpath.jaxp.XPathFactoryImpl@48dacf4f
2019-02-13 14:39:36.840 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.processor.DefaultErrorHandler - Using ExecutorService:
org.apache.camel.util.concurrent.SizedScheduledExecutorService@20f78b0a[ErrorHandlerRedeliveryTask]
for redeliveries on error handler:
DefaultErrorHandler[InstrumentProcessorAdvice]
2019-02-13 14:39:36.840 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.processor.DefaultErrorHandler - Using ExecutorService:
org.apache.camel.util.concurrent.SizedScheduledExecutorService@20f78b0a[ErrorHandlerRedeliveryTask]
for redeliveries on error handler:
DefaultErrorHandler[InstrumentProcessorAdvice]
2019-02-13 14:39:36.843 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.processor.DefaultErrorHandler - Using ExecutorService:
org.apache.camel.util.concurrent.SizedScheduledExecutorService@20f78b0a[ErrorHandlerRedeliveryTask]
for redeliveries on error handler:
DefaultErrorHandler[InstrumentProcessorAdvice]
2019-02-13 14:39:36.843 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.processor.DefaultErrorHandler - Using ExecutorService:
org.apache.camel.util.concurrent.SizedScheduledExecutorService@20f78b0a[ErrorHandlerRedeliveryTask]
for redeliveries on error handler:
DefaultErrorHandler[InstrumentProcessorAdvice]
2019-02-13 14:39:36.849 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.impl.DefaultCamelContext - Route: main started and consuming from:
direct://start
2019-02-13 14:39:36.850 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.impl.DefaultCamelContext - Route: http-call-route started and consuming
from: direct://http-call-route
2019-02-13 14:39:36.850 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.impl.DefaultCamelContext - Total 2 routes, of which 2 are started
2019-02-13 14:39:36.850 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2)
started in 0.586 seconds
2019-02-13 14:39:36.859 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 1 save history time: 2
2019-02-13 14:39:36.894 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 35 save history time: 0
2019-02-13 14:39:36.955 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 60 save history time: 0
2019-02-13 14:39:37.017 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
amel.processor.FilterProcessor - Filter matches: false for exchange:
Exchange[ff360297-c613-4653-a815-11a14b590f12]
2019-02-13 14:39:37.018 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 1 save history time: 0
2019-02-13 14:39:37.018 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 63 save history time: 0
2019-02-13 14:39:37.019 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.camel.processor.SendProcessor - >>>> xslt://xslt/requestInvoicesReceived.xsl
Exchange[ff360297-c613-4653-a815-11a14b590f12]
2019-02-13 14:39:37.201 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 183 save history time: 0
2019-02-13 14:39:37.202 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 1 save history time: 0
2019-02-13 14:39:37.202 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.camel.processor.SendProcessor - >>>> direct://http-call-route
Exchange[ff360297-c613-4653-a815-11a14b590f12]
2019-02-13 14:39:37.203 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 0 save history time: 0
2019-02-13 14:39:37.203 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 0 save history time: 0
2019-02-13 14:39:37.204 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.camel.processor.SendProcessor - >>>>
https://localhost?aliasHeader=certHeaderName&connectTimeout=5000&socketTimeout=5000&connectionRequestTimeout=5000
Exchange[ff360297-c613-4653-a815-11a14b590f12]
2019-02-13 14:39:37.220 [490f8c58da7accf9:] [pool-2-thread-1] INFO
curity.m2m.AccessTokenProvider - Fetching access token for scopes "ik
ik-tsm-secret" from "https://url.com/identity/connect/token"
context.stopRoute: main - null
2019-02-13 14:39:55.855 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes
(timeout 1 milliseconds)
2019-02-13 14:39:55.858 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Waiting as there are still 1 inflight and
pending exchanges to complete, timeout in 0 seconds. Inflights per route: [main
= 1]
2019-02-13 14:39:55.859 [490f8c58da7accf9:] [ntExecutorGroup] WARN
l.impl.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.
2019-02-13 14:39:55.861 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - There are 1 inflight exchanges:
InflightExchange: [exchangeId=ff360297-c613-4653-a815-11a14b590f12,
fromRouteId=main, routeId=http-call-route, nodeId=http-call, elapsed=0,
duration=19007]
2019-02-13 14:39:55.861 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - There are 1 inflight exchanges:
InflightExchange: [exchangeId=ff360297-c613-4653-a815-11a14b590f12,
fromRouteId=main, routeId=http-call-route, nodeId=http-call, elapsed=0,
duration=19007]
2019-02-13 14:39:55.861 [:] [ - ShutdownTask] WARN
l.impl.DefaultShutdownStrategy - Interrupted while waiting during graceful
shutdown, will force shutdown now.
2019-02-13 14:39:55.861 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Route: main shutdown complete, was consuming
from: direct://start
2019-02-13 14:39:55.862 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0
seconds
2019-02-13 14:39:55.863 [490f8c58da7accf9:] [ntExecutorGroup] INFO
camel.impl.DefaultCamelContext - Route: main is stopped, was consuming from:
direct://start
context.stopRoute: http-call-route - null
2019-02-13 14:39:55.863 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes
(timeout 1 milliseconds)
2019-02-13 14:39:55.864 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Waiting as there are still 1 inflight and
pending exchanges to complete, timeout in 0 seconds. Inflights per route:
[http-call-route = 1]
2019-02-13 14:39:55.865 [:] [ - ShutdownTask] WARN
l.impl.DefaultShutdownStrategy - Interrupted while waiting during graceful
shutdown, will force shutdown now.
2019-02-13 14:39:55.865 [490f8c58da7accf9:] [ntExecutorGroup] WARN
l.impl.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.
2019-02-13 14:39:55.865 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0
seconds
2019-02-13 14:39:55.865 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Route: http-call-route shutdown complete, was
consuming from: direct://http-call-route
2019-02-13 14:39:55.866 [490f8c58da7accf9:] [ntExecutorGroup] INFO
camel.impl.DefaultCamelContext - Route: http-call-route is stopped, was
consuming from: direct://http-call-route
2019-02-13 14:39:55.866 [490f8c58da7accf9:] [ntExecutorGroup] INFO
camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2) is
shutting down
2019-02-13 14:39:55.867 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - Starting to graceful shutdown 2 routes
(timeout 1 milliseconds)
2019-02-13 14:39:55.868 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Waiting as there are still 2 inflight and
pending exchanges to complete, timeout in 0 seconds. Inflights per route:
[http-call-route = 1, main = 1]
2019-02-13 14:39:55.868 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - There are 1 inflight exchanges:
InflightExchange: [exchangeId=ff360297-c613-4653-a815-11a14b590f12,
fromRouteId=main, routeId=http-call-route, nodeId=http-call, elapsed=0,
duration=19014]
2019-02-13 14:39:55.869 [490f8c58da7accf9:] [ntExecutorGroup] WARN
l.impl.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.
2019-02-13 14:39:55.869 [:] [ - ShutdownTask] WARN
l.impl.DefaultShutdownStrategy - Interrupted while waiting during graceful
shutdown, will force shutdown now.
2019-02-13 14:39:55.869 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Route: http-call-route shutdown complete, was
consuming from: direct://http-call-route
2019-02-13 14:39:55.869 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - There are 1 inflight exchanges:
InflightExchange: [exchangeId=ff360297-c613-4653-a815-11a14b590f12,
fromRouteId=main, routeId=http-call-route, nodeId=http-call, elapsed=0,
duration=19015]
2019-02-13 14:39:55.869 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Route: main shutdown complete, was consuming
from: direct://start
2019-02-13 14:39:55.869 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - Graceful shutdown of 2 routes completed in 0
seconds
2019-02-13 14:39:55.876 [490f8c58da7accf9:] [ntExecutorGroup] WARN
impl.DefaultInflightRepository - Shutting down while there are still 1 inflight
exchanges.
2019-02-13 14:39:55.885 [490f8c58da7accf9:] [ntExecutorGroup] INFO
camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2)
uptime 19.621 seconds
2019-02-13 14:39:55.886 [490f8c58da7accf9:] [ntExecutorGroup] INFO
camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2) is
shutdown in 0.020 seconds
2019-02-13 14:39:55.889 [490f8c58da7accf9:] [ntExecutorGroup] ERROR
ssors.IntegrationFlowProcessor - 590: IntegrationFlowExecutor timeout after
20000 milliseconds
com.s.sdd.abv.processors.ExecutorTimeoutException: IntegrationFlowExecutor
timeout after 20000 milliseconds
at
com.s.sdd.abv.processors.IntegrationFlowExecutor.process(IntegrationFlowExecutor.java:98)
at
com.s.sdd.abv.processors.IntegrationFlowProcessor.processExchange(IntegrationFlowProcessor.java:88)
at
com.s.sdd.abv.processors.IntegrationFlowProcessor.process(IntegrationFlowProcessor.java:71)
at
org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at
org.apache.camel.component.netty4.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:141)
at
org.apache.camel.component.netty4.handlers.ServerChannelHandler.channelRead0(ServerChannelHandler.java:112)
at
org.apache.camel.component.netty4.http.handlers.HttpServerChannelHandler.channelRead0(HttpServerChannelHandler.java:195)
at
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at
org.apache.camel.component.netty4.http.handlers.HttpServerMultiplexChannelHandler.channelRead0(HttpServerMultiplexChannelHandler.java:143)
at
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at
io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38)
at
io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:353)
at
io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.TimeoutException: null
at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1771)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
at
com.s.sdd.abv.processors.IntegrationFlowExecutor.process(IntegrationFlowExecutor.java:86)
... 20 common frames omitted
2019-02-13 14:40:22.321 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException)
caught when processing request to {s}->https://www.aeat.es:443: Connection reset
2019-02-13 14:40:22.321 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.http.impl.execchain.RetryExec - Retrying request to
{s}->https://www.aeat.es:443
2019-02-13 14:41:05.659 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException)
caught when processing request to {s}->https://www.aeat.es:443: Connection reset
2019-02-13 14:41:05.659 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.http.impl.execchain.RetryExec - Retrying request to
{s}->https://www.aeat.es:443
2019-02-13 14:41:49.021 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException)
caught when processing request to {s}->https://www.aeat.es:443: Connection reset
2019-02-13 14:41:49.021 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.http.impl.execchain.RetryExec - Retrying request to
{s}->https://www.aeat.es:443
2019-02-13 14:42:32.457 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 175.253 save history time: 0
2019-02-13 14:42:32.457 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
pache.camel.processor.Pipeline - Message exchange has failed: so breaking out
of pipeline for exchange: Exchange[ff360297-c613-4653-a815-11a14b590f12]
Exception: java.net.SocketException: Connection reset
2019-02-13 14:42:32.458 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 175.255 save history time: 1
2019-02-13 14:42:32.458 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
pache.camel.processor.Pipeline - Message exchange has failed: so breaking out
of pipeline for exchange: Exchange[ff360297-c613-4653-a815-11a14b590f12]
Exception: java.net.SocketException: Connection reset
{code}
was:
In our project we are have a camel context and in certain situations we would
like to terminate the context and all it routes immediately. For this we have
the following code:
{code:java}
private void stopContextImmediately(CamelContext context) throws
ExecutorException {
try {
ShutdownStrategy shutdownStrategy =
context.getShutdownStrategy();
shutdownStrategy.setTimeUnit(TimeUnit.MILLISECONDS);
shutdownStrategy.setTimeout(1);
shutdownStrategy.setShutdownNowOnTimeout(true);
context.setShutdownStrategy(shutdownStrategy);
for (Route route : context.getRoutes()) {
System.out.println("context.stopRoute: " +
route.getId()
+ " - " + route.getDescription());
context.stopRoute(route.getId(), 1,
TimeUnit.MILLISECONDS,
false);
}
context.stop();
} catch (Exception e) {
error("Can''t stop camel for file {0} in archive {1}", e);
}
}
{code}
But after the graceful shutdown with a timeout of 1 milisec has be initiated we
get a warning:
{color:#707070}_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. (see stacktrace below){color}
We notice that there still is a thread running with in this case contains a
job of our http component which is trying to send a http post with a retry
pattern.
*Question*: How can we forcefully terminate the running routes and it's
threads? (we also want to prevent that the whole java application is killed,
SIGTERM not an option)
{code:java}
2019-02-13 14:39:27.979 [:] [restartedMain ] INFO
oyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
2019-02-13 14:39:27.996 [:] [restartedMain ] INFO
mbedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8080 (http) with
context path ''
2019-02-13 14:39:27.998 [:] [restartedMain ] INFO
m.unit.u4ip.gmp.GmpApplication - Started GmpApplication in 5.461 seconds (JVM
running for 6.91)
2019-02-13 14:39:28.009 [:] [restartedMain ] DEBUG
oot.devtools.restart.Restarter - Creating new Restarter for thread
Thread[main,5,main]
2019-02-13 14:39:28.009 [:] [restartedMain ] DEBUG
oot.devtools.restart.Restarter - Immediately restarting application
2019-02-13 14:39:28.009 [:] [restartedMain ] DEBUG
oot.devtools.restart.Restarter - Created RestartClassLoader
org.springframework.boot.devtools.restart.classloader.RestartClassLoader@4316e59b
2019-02-13 14:39:28.010 [:] [restartedMain ] DEBUG
oot.devtools.restart.Restarter - Starting application
com.unit.u4ip.gmp.GmpApplication with URLs
[file:/C:/development/code/workspace-idea/gmp-project/gmp/target/classes/]
2019-02-13 14:39:28.435 [:] [on(2)-10.0.75.1] INFO
rBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet
'dispatcherServlet'
2019-02-13 14:39:28.435 [:] [on(2)-10.0.75.1] INFO
.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
2019-02-13 14:39:28.449 [:] [on(2)-10.0.75.1] INFO
.web.servlet.DispatcherServlet - Completed initialization in 14 ms
2019-02-13 14:39:34.857 [490f8c58da7accf9:] [ntExecutorGroup] INFO
curity.m2m.AccessTokenProvider - Fetching access token for scopes "u4ik" from
"https://u4ids-sandbox2.u4pp.com/identity/connect/token"
2019-02-13 14:39:36.260 [490f8c58da7accf9:] [pool-2-thread-1] INFO
converter.DefaultTypeConverter - Type converters loaded (core: 195, classpath:
41)
2019-02-13 14:39:36.264 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2) is
starting
2019-02-13 14:39:36.264 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ment.ManagedManagementStrategy - JMX is enabled
2019-02-13 14:39:36.292 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'ConvertBodyTo[java.lang.String]'
2019-02-13 14:39:36.297 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'SetBody[simple{${body.replaceAll("\(|\)", "")}}]'
2019-02-13 14:39:36.302 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'Unmarshal[org.apache.camel.model.dataformat.XmlJsonDataFormat@62a53f37]'
2019-02-13 14:39:36.310 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'SetHeader[CamelHttpUri,
constant{https://www7.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP}]'
2019-02-13 14:39:36.313 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'SetHeader[CamelHttpUri,
constant{https://www.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP}]'
2019-02-13 14:39:36.314 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'Choice[[When[xpath{XPath: /root/e/TestMessage} -> [SetHeader[CamelHttpUri,
constant{https://www7.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP}]]]]
Otherwise[[SetHeader[CamelHttpUri,
constant{https://www.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP}]]]]'
2019-02-13 14:39:36.323 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'To[xslt:xslt/requestInvoicesReceived.xsl]'
2019-02-13 14:39:36.325 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'SetProperty[SoapRequestBody, simple{${body}}]'
2019-02-13 14:39:36.327 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'To[direct:http-call-route]'
2019-02-13 14:39:36.328 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'To[xslt:xslt/concatSoapRequestResponse.xsl]'
2019-02-13 14:39:36.329 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'SetHeader[certHeaderName, constant{test1}]'
2019-02-13 14:39:36.331 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'SetHeader[Content-Type, constant{text/xml; charset=utf-8}]'
2019-02-13 14:39:36.345 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.component.http4.HttpComponent - Created ClientConnectionManager
org.apache.http.impl.conn.PoolingHttpClientConnectionManager@65b98b52
2019-02-13 14:39:36.349 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'To[https://localhost?aliasHeader=certHeaderName&socketTimeout=5000&connectTimeout=5000&connectionRequestTimeout=5000]'
2019-02-13 14:39:36.350 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
sor.interceptor.DefaultChannel - Initialize channel for target:
'ConvertBodyTo[java.lang.String]'
2019-02-13 14:39:36.351 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.impl.DefaultCamelContext - StreamCaching is not in use. If using streams
then its recommended to enable stream caching. See more details at
http://camel.apache.org/stream-caching.html
2019-02-13 14:39:36.357 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.builder.xml.XPathBuilder - Created default XPathFactory
org.apache.xpath.jaxp.XPathFactoryImpl@48dacf4f
2019-02-13 14:39:36.840 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.processor.DefaultErrorHandler - Using ExecutorService:
org.apache.camel.util.concurrent.SizedScheduledExecutorService@20f78b0a[ErrorHandlerRedeliveryTask]
for redeliveries on error handler:
DefaultErrorHandler[InstrumentProcessorAdvice]
2019-02-13 14:39:36.840 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.processor.DefaultErrorHandler - Using ExecutorService:
org.apache.camel.util.concurrent.SizedScheduledExecutorService@20f78b0a[ErrorHandlerRedeliveryTask]
for redeliveries on error handler:
DefaultErrorHandler[InstrumentProcessorAdvice]
2019-02-13 14:39:36.843 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.processor.DefaultErrorHandler - Using ExecutorService:
org.apache.camel.util.concurrent.SizedScheduledExecutorService@20f78b0a[ErrorHandlerRedeliveryTask]
for redeliveries on error handler:
DefaultErrorHandler[InstrumentProcessorAdvice]
2019-02-13 14:39:36.843 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.processor.DefaultErrorHandler - Using ExecutorService:
org.apache.camel.util.concurrent.SizedScheduledExecutorService@20f78b0a[ErrorHandlerRedeliveryTask]
for redeliveries on error handler:
DefaultErrorHandler[InstrumentProcessorAdvice]
2019-02-13 14:39:36.849 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.impl.DefaultCamelContext - Route: main started and consuming from:
direct://start
2019-02-13 14:39:36.850 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.impl.DefaultCamelContext - Route: http-call-route started and consuming
from: direct://http-call-route
2019-02-13 14:39:36.850 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.impl.DefaultCamelContext - Total 2 routes, of which 2 are started
2019-02-13 14:39:36.850 [490f8c58da7accf9:] [pool-2-thread-1] INFO
camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2)
started in 0.586 seconds
2019-02-13 14:39:36.859 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 1 save history time: 2
2019-02-13 14:39:36.894 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 35 save history time: 0
2019-02-13 14:39:36.955 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 60 save history time: 0
2019-02-13 14:39:37.017 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
amel.processor.FilterProcessor - Filter matches: false for exchange:
Exchange[ff360297-c613-4653-a815-11a14b590f12]
2019-02-13 14:39:37.018 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 1 save history time: 0
2019-02-13 14:39:37.018 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 63 save history time: 0
2019-02-13 14:39:37.019 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.camel.processor.SendProcessor - >>>> xslt://xslt/requestInvoicesReceived.xsl
Exchange[ff360297-c613-4653-a815-11a14b590f12]
2019-02-13 14:39:37.201 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 183 save history time: 0
2019-02-13 14:39:37.202 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 1 save history time: 0
2019-02-13 14:39:37.202 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.camel.processor.SendProcessor - >>>> direct://http-call-route
Exchange[ff360297-c613-4653-a815-11a14b590f12]
2019-02-13 14:39:37.203 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 0 save history time: 0
2019-02-13 14:39:37.203 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 0 save history time: 0
2019-02-13 14:39:37.204 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
.camel.processor.SendProcessor - >>>>
https://localhost?aliasHeader=certHeaderName&connectTimeout=5000&socketTimeout=5000&connectionRequestTimeout=5000
Exchange[ff360297-c613-4653-a815-11a14b590f12]
2019-02-13 14:39:37.220 [490f8c58da7accf9:] [pool-2-thread-1] INFO
curity.m2m.AccessTokenProvider - Fetching access token for scopes "u4ik
u4ik-tsm-secret" from "https://u4ids-sandbox2.u4pp.com/identity/connect/token"
context.stopRoute: main - null
2019-02-13 14:39:55.855 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes
(timeout 1 milliseconds)
2019-02-13 14:39:55.858 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Waiting as there are still 1 inflight and
pending exchanges to complete, timeout in 0 seconds. Inflights per route: [main
= 1]
2019-02-13 14:39:55.859 [490f8c58da7accf9:] [ntExecutorGroup] WARN
l.impl.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.
2019-02-13 14:39:55.861 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - There are 1 inflight exchanges:
InflightExchange: [exchangeId=ff360297-c613-4653-a815-11a14b590f12,
fromRouteId=main, routeId=http-call-route, nodeId=http-call, elapsed=0,
duration=19007]
2019-02-13 14:39:55.861 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - There are 1 inflight exchanges:
InflightExchange: [exchangeId=ff360297-c613-4653-a815-11a14b590f12,
fromRouteId=main, routeId=http-call-route, nodeId=http-call, elapsed=0,
duration=19007]
2019-02-13 14:39:55.861 [:] [ - ShutdownTask] WARN
l.impl.DefaultShutdownStrategy - Interrupted while waiting during graceful
shutdown, will force shutdown now.
2019-02-13 14:39:55.861 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Route: main shutdown complete, was consuming
from: direct://start
2019-02-13 14:39:55.862 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0
seconds
2019-02-13 14:39:55.863 [490f8c58da7accf9:] [ntExecutorGroup] INFO
camel.impl.DefaultCamelContext - Route: main is stopped, was consuming from:
direct://start
context.stopRoute: http-call-route - null
2019-02-13 14:39:55.863 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes
(timeout 1 milliseconds)
2019-02-13 14:39:55.864 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Waiting as there are still 1 inflight and
pending exchanges to complete, timeout in 0 seconds. Inflights per route:
[http-call-route = 1]
2019-02-13 14:39:55.865 [:] [ - ShutdownTask] WARN
l.impl.DefaultShutdownStrategy - Interrupted while waiting during graceful
shutdown, will force shutdown now.
2019-02-13 14:39:55.865 [490f8c58da7accf9:] [ntExecutorGroup] WARN
l.impl.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.
2019-02-13 14:39:55.865 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0
seconds
2019-02-13 14:39:55.865 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Route: http-call-route shutdown complete, was
consuming from: direct://http-call-route
2019-02-13 14:39:55.866 [490f8c58da7accf9:] [ntExecutorGroup] INFO
camel.impl.DefaultCamelContext - Route: http-call-route is stopped, was
consuming from: direct://http-call-route
2019-02-13 14:39:55.866 [490f8c58da7accf9:] [ntExecutorGroup] INFO
camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2) is
shutting down
2019-02-13 14:39:55.867 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - Starting to graceful shutdown 2 routes
(timeout 1 milliseconds)
2019-02-13 14:39:55.868 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Waiting as there are still 2 inflight and
pending exchanges to complete, timeout in 0 seconds. Inflights per route:
[http-call-route = 1, main = 1]
2019-02-13 14:39:55.868 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - There are 1 inflight exchanges:
InflightExchange: [exchangeId=ff360297-c613-4653-a815-11a14b590f12,
fromRouteId=main, routeId=http-call-route, nodeId=http-call, elapsed=0,
duration=19014]
2019-02-13 14:39:55.869 [490f8c58da7accf9:] [ntExecutorGroup] WARN
l.impl.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.
2019-02-13 14:39:55.869 [:] [ - ShutdownTask] WARN
l.impl.DefaultShutdownStrategy - Interrupted while waiting during graceful
shutdown, will force shutdown now.
2019-02-13 14:39:55.869 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Route: http-call-route shutdown complete, was
consuming from: direct://http-call-route
2019-02-13 14:39:55.869 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - There are 1 inflight exchanges:
InflightExchange: [exchangeId=ff360297-c613-4653-a815-11a14b590f12,
fromRouteId=main, routeId=http-call-route, nodeId=http-call, elapsed=0,
duration=19015]
2019-02-13 14:39:55.869 [:] [ - ShutdownTask] INFO
l.impl.DefaultShutdownStrategy - Route: main shutdown complete, was consuming
from: direct://start
2019-02-13 14:39:55.869 [490f8c58da7accf9:] [ntExecutorGroup] INFO
l.impl.DefaultShutdownStrategy - Graceful shutdown of 2 routes completed in 0
seconds
2019-02-13 14:39:55.876 [490f8c58da7accf9:] [ntExecutorGroup] WARN
impl.DefaultInflightRepository - Shutting down while there are still 1 inflight
exchanges.
2019-02-13 14:39:55.885 [490f8c58da7accf9:] [ntExecutorGroup] INFO
camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2)
uptime 19.621 seconds
2019-02-13 14:39:55.886 [490f8c58da7accf9:] [ntExecutorGroup] INFO
camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2) is
shutdown in 0.020 seconds
2019-02-13 14:39:55.889 [490f8c58da7accf9:] [ntExecutorGroup] ERROR
ssors.IntegrationFlowProcessor - 590: IntegrationFlowExecutor timeout after
20000 milliseconds
com.unit.u4ip.gmp.processors.ExecutorTimeoutException: IntegrationFlowExecutor
timeout after 20000 milliseconds
at
com.unit.u4ip.gmp.processors.IntegrationFlowExecutor.process(IntegrationFlowExecutor.java:98)
at
com.unit.u4ip.gmp.processors.IntegrationFlowProcessor.processExchange(IntegrationFlowProcessor.java:88)
at
com.unit.u4ip.gmp.processors.IntegrationFlowProcessor.process(IntegrationFlowProcessor.java:71)
at
org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at
org.apache.camel.component.netty4.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:141)
at
org.apache.camel.component.netty4.handlers.ServerChannelHandler.channelRead0(ServerChannelHandler.java:112)
at
org.apache.camel.component.netty4.http.handlers.HttpServerChannelHandler.channelRead0(HttpServerChannelHandler.java:195)
at
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at
org.apache.camel.component.netty4.http.handlers.HttpServerMultiplexChannelHandler.channelRead0(HttpServerMultiplexChannelHandler.java:143)
at
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at
io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38)
at
io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:353)
at
io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.TimeoutException: null
at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1771)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
at
com.unit.u4ip.gmp.processors.IntegrationFlowExecutor.process(IntegrationFlowExecutor.java:86)
... 20 common frames omitted
2019-02-13 14:40:22.321 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException)
caught when processing request to {s}->https://www.aeat.es:443: Connection reset
2019-02-13 14:40:22.321 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.http.impl.execchain.RetryExec - Retrying request to
{s}->https://www.aeat.es:443
2019-02-13 14:41:05.659 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException)
caught when processing request to {s}->https://www.aeat.es:443: Connection reset
2019-02-13 14:41:05.659 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.http.impl.execchain.RetryExec - Retrying request to
{s}->https://www.aeat.es:443
2019-02-13 14:41:49.021 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException)
caught when processing request to {s}->https://www.aeat.es:443: Connection reset
2019-02-13 14:41:49.021 [490f8c58da7accf9:] [pool-2-thread-1] INFO
.http.impl.execchain.RetryExec - Retrying request to
{s}->https://www.aeat.es:443
2019-02-13 14:42:32.457 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 175.253 save history time: 0
2019-02-13 14:42:32.457 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
pache.camel.processor.Pipeline - Message exchange has failed: so breaking out
of pipeline for exchange: Exchange[ff360297-c613-4653-a815-11a14b590f12]
Exception: java.net.SocketException: Connection reset
2019-02-13 14:42:32.458 [490f8c58da7accf9:] [pool-2-thread-1] INFO
ceptors.FlowHistoryInterceptor - Processing time: 175.255 save history time: 1
2019-02-13 14:42:32.458 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
pache.camel.processor.Pipeline - Message exchange has failed: so breaking out
of pipeline for exchange: Exchange[ff360297-c613-4653-a815-11a14b590f12]
Exception: java.net.SocketException: Connection reset
{code}
> Threads still running after Graceful shutdown
> ---------------------------------------------
>
> Key: CAMEL-13310
> URL: https://issues.apache.org/jira/browse/CAMEL-13310
> Project: Camel
> Issue Type: Bug
> Affects Versions: 2.23.1
> Reporter: storage
> Priority: Major
>
> In our project we are have a camel context and in certain situations we would
> like to terminate the context and all it routes immediately. For this we have
> the following code:
> {code:java}
> private void stopContextImmediately(CamelContext context) throws
> ExecutorException {
> try {
> ShutdownStrategy shutdownStrategy =
> context.getShutdownStrategy();
> shutdownStrategy.setTimeUnit(TimeUnit.MILLISECONDS);
> shutdownStrategy.setTimeout(1);
> shutdownStrategy.setShutdownNowOnTimeout(true);
> context.setShutdownStrategy(shutdownStrategy);
> for (Route route : context.getRoutes()) {
> System.out.println("context.stopRoute: " +
> route.getId()
> + " - " + route.getDescription());
> context.stopRoute(route.getId(), 1,
> TimeUnit.MILLISECONDS,
> false);
> }
> context.stop();
> } catch (Exception e) {
> error("Can''t stop camel for file {0} in archive {1}", e);
> }
> }
> {code}
> But after the graceful shutdown with a timeout of 1 milisec has be initiated
> we get a warning:
> {color:#707070}_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. (see stacktrace
> below){color}
> We notice that there still is a thread running with in this case contains a
> job of our http component which is trying to send a http post with a retry
> pattern.
> *Question*: How can we forcefully terminate the running routes and it's
> threads? (we also want to prevent that the whole java application is killed,
> SIGTERM not an option)
> {code:java}
> 2019-02-13 14:39:27.979 [:] [restartedMain ] INFO
> oyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
> 2019-02-13 14:39:27.996 [:] [restartedMain ] INFO
> mbedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8080 (http) with
> context path ''
> 2019-02-13 14:39:27.998 [:] [restartedMain ] INFO
> m.unit.u4ip.gmp.CamelApplication - Started CamelApplication in 5.461 seconds
> (JVM running for 6.91)
> 2019-02-13 14:39:28.009 [:] [restartedMain ] DEBUG
> oot.devtools.restart.Restarter - Creating new Restarter for thread
> Thread[main,5,main]
> 2019-02-13 14:39:28.009 [:] [restartedMain ] DEBUG
> oot.devtools.restart.Restarter - Immediately restarting application
> 2019-02-13 14:39:28.009 [:] [restartedMain ] DEBUG
> oot.devtools.restart.Restarter - Created RestartClassLoader
> org.springframework.boot.devtools.restart.classloader.RestartClassLoader@4316e59b
> 2019-02-13 14:39:28.010 [:] [restartedMain ] DEBUG
> oot.devtools.restart.Restarter - Starting application
> com.s.sdd.abv.CamelApplication with URLs
> [file:/C:/development/code/workspace-idea/gmp-project/gmp/target/classes/]
> 2019-02-13 14:39:28.435 [:] [on(2)-10.0.75.1] INFO
> rBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet
> 'dispatcherServlet'
> 2019-02-13 14:39:28.435 [:] [on(2)-10.0.75.1] INFO
> .web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
> 2019-02-13 14:39:28.449 [:] [on(2)-10.0.75.1] INFO
> .web.servlet.DispatcherServlet - Completed initialization in 14 ms
> 2019-02-13 14:39:34.857 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> curity.m2m.AccessTokenProvider - Fetching access token for scopes "ik" from
> "https://url.com/identity/connect/token"
> 2019-02-13 14:39:36.260 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> converter.DefaultTypeConverter - Type converters loaded (core: 195,
> classpath: 41)
> 2019-02-13 14:39:36.264 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2)
> is starting
> 2019-02-13 14:39:36.264 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> ment.ManagedManagementStrategy - JMX is enabled
> 2019-02-13 14:39:36.292 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'ConvertBodyTo[java.lang.String]'
> 2019-02-13 14:39:36.297 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'SetBody[simple{${body.replaceAll("\(|\)", "")}}]'
> 2019-02-13 14:39:36.302 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'Unmarshal[org.apache.camel.model.dataformat.XmlJsonDataFormat@62a53f37]'
> 2019-02-13 14:39:36.310 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'SetHeader[CamelHttpUri,
> constant{https://www7.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP}]'
> 2019-02-13 14:39:36.313 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'SetHeader[CamelHttpUri,
> constant{https://www.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP}]'
> 2019-02-13 14:39:36.314 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'Choice[[When[xpath{XPath: /root/e/TestMessage} -> [SetHeader[CamelHttpUri,
> constant{https://www7.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP}]]]]
> Otherwise[[SetHeader[CamelHttpUri,
> constant{https://www.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP}]]]]'
> 2019-02-13 14:39:36.323 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'To[xslt:xslt/requestInvoicesReceived.xsl]'
> 2019-02-13 14:39:36.325 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'SetProperty[SoapRequestBody, simple{${body}}]'
> 2019-02-13 14:39:36.327 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'To[direct:http-call-route]'
> 2019-02-13 14:39:36.328 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'To[xslt:xslt/concatSoapRequestResponse.xsl]'
> 2019-02-13 14:39:36.329 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'SetHeader[certHeaderName, constant{test1}]'
> 2019-02-13 14:39:36.331 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'SetHeader[Content-Type, constant{text/xml; charset=utf-8}]'
> 2019-02-13 14:39:36.345 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> .component.http4.HttpComponent - Created ClientConnectionManager
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager@65b98b52
> 2019-02-13 14:39:36.349 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'To[https://localhost?aliasHeader=certHeaderName&socketTimeout=5000&connectTimeout=5000&connectionRequestTimeout=5000]'
> 2019-02-13 14:39:36.350 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> sor.interceptor.DefaultChannel - Initialize channel for target:
> 'ConvertBodyTo[java.lang.String]'
> 2019-02-13 14:39:36.351 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> camel.impl.DefaultCamelContext - StreamCaching is not in use. If using
> streams then its recommended to enable stream caching. See more details at
> http://camel.apache.org/stream-caching.html
> 2019-02-13 14:39:36.357 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> camel.builder.xml.XPathBuilder - Created default XPathFactory
> org.apache.xpath.jaxp.XPathFactoryImpl@48dacf4f
> 2019-02-13 14:39:36.840 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> .processor.DefaultErrorHandler - Using ExecutorService:
> org.apache.camel.util.concurrent.SizedScheduledExecutorService@20f78b0a[ErrorHandlerRedeliveryTask]
> for redeliveries on error handler:
> DefaultErrorHandler[InstrumentProcessorAdvice]
> 2019-02-13 14:39:36.840 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> .processor.DefaultErrorHandler - Using ExecutorService:
> org.apache.camel.util.concurrent.SizedScheduledExecutorService@20f78b0a[ErrorHandlerRedeliveryTask]
> for redeliveries on error handler:
> DefaultErrorHandler[InstrumentProcessorAdvice]
> 2019-02-13 14:39:36.843 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> .processor.DefaultErrorHandler - Using ExecutorService:
> org.apache.camel.util.concurrent.SizedScheduledExecutorService@20f78b0a[ErrorHandlerRedeliveryTask]
> for redeliveries on error handler:
> DefaultErrorHandler[InstrumentProcessorAdvice]
> 2019-02-13 14:39:36.843 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> .processor.DefaultErrorHandler - Using ExecutorService:
> org.apache.camel.util.concurrent.SizedScheduledExecutorService@20f78b0a[ErrorHandlerRedeliveryTask]
> for redeliveries on error handler:
> DefaultErrorHandler[InstrumentProcessorAdvice]
> 2019-02-13 14:39:36.849 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> camel.impl.DefaultCamelContext - Route: main started and consuming from:
> direct://start
> 2019-02-13 14:39:36.850 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> camel.impl.DefaultCamelContext - Route: http-call-route started and consuming
> from: direct://http-call-route
> 2019-02-13 14:39:36.850 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> camel.impl.DefaultCamelContext - Total 2 routes, of which 2 are started
> 2019-02-13 14:39:36.850 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2)
> started in 0.586 seconds
> 2019-02-13 14:39:36.859 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> ceptors.FlowHistoryInterceptor - Processing time: 1 save history time: 2
> 2019-02-13 14:39:36.894 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> ceptors.FlowHistoryInterceptor - Processing time: 35 save history time: 0
> 2019-02-13 14:39:36.955 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> ceptors.FlowHistoryInterceptor - Processing time: 60 save history time: 0
> 2019-02-13 14:39:37.017 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> amel.processor.FilterProcessor - Filter matches: false for exchange:
> Exchange[ff360297-c613-4653-a815-11a14b590f12]
> 2019-02-13 14:39:37.018 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> ceptors.FlowHistoryInterceptor - Processing time: 1 save history time: 0
> 2019-02-13 14:39:37.018 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> ceptors.FlowHistoryInterceptor - Processing time: 63 save history time: 0
> 2019-02-13 14:39:37.019 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> .camel.processor.SendProcessor - >>>> xslt://xslt/requestInvoicesReceived.xsl
> Exchange[ff360297-c613-4653-a815-11a14b590f12]
> 2019-02-13 14:39:37.201 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> ceptors.FlowHistoryInterceptor - Processing time: 183 save history time: 0
> 2019-02-13 14:39:37.202 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> ceptors.FlowHistoryInterceptor - Processing time: 1 save history time: 0
> 2019-02-13 14:39:37.202 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> .camel.processor.SendProcessor - >>>> direct://http-call-route
> Exchange[ff360297-c613-4653-a815-11a14b590f12]
> 2019-02-13 14:39:37.203 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> ceptors.FlowHistoryInterceptor - Processing time: 0 save history time: 0
> 2019-02-13 14:39:37.203 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> ceptors.FlowHistoryInterceptor - Processing time: 0 save history time: 0
> 2019-02-13 14:39:37.204 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> .camel.processor.SendProcessor - >>>>
> https://localhost?aliasHeader=certHeaderName&connectTimeout=5000&socketTimeout=5000&connectionRequestTimeout=5000
> Exchange[ff360297-c613-4653-a815-11a14b590f12]
> 2019-02-13 14:39:37.220 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> curity.m2m.AccessTokenProvider - Fetching access token for scopes "ik
> ik-tsm-secret" from "https://url.com/identity/connect/token"
> context.stopRoute: main - null
> 2019-02-13 14:39:55.855 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> l.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes
> (timeout 1 milliseconds)
> 2019-02-13 14:39:55.858 [:] [ - ShutdownTask] INFO
> l.impl.DefaultShutdownStrategy - Waiting as there are still 1 inflight and
> pending exchanges to complete, timeout in 0 seconds. Inflights per route:
> [main = 1]
> 2019-02-13 14:39:55.859 [490f8c58da7accf9:] [ntExecutorGroup] WARN
> l.impl.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.
> 2019-02-13 14:39:55.861 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> l.impl.DefaultShutdownStrategy - There are 1 inflight exchanges:
> InflightExchange: [exchangeId=ff360297-c613-4653-a815-11a14b590f12,
> fromRouteId=main, routeId=http-call-route, nodeId=http-call, elapsed=0,
> duration=19007]
> 2019-02-13 14:39:55.861 [:] [ - ShutdownTask] INFO
> l.impl.DefaultShutdownStrategy - There are 1 inflight exchanges:
> InflightExchange: [exchangeId=ff360297-c613-4653-a815-11a14b590f12,
> fromRouteId=main, routeId=http-call-route, nodeId=http-call, elapsed=0,
> duration=19007]
> 2019-02-13 14:39:55.861 [:] [ - ShutdownTask] WARN
> l.impl.DefaultShutdownStrategy - Interrupted while waiting during graceful
> shutdown, will force shutdown now.
> 2019-02-13 14:39:55.861 [:] [ - ShutdownTask] INFO
> l.impl.DefaultShutdownStrategy - Route: main shutdown complete, was consuming
> from: direct://start
> 2019-02-13 14:39:55.862 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> l.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0
> seconds
> 2019-02-13 14:39:55.863 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> camel.impl.DefaultCamelContext - Route: main is stopped, was consuming from:
> direct://start
> context.stopRoute: http-call-route - null
> 2019-02-13 14:39:55.863 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> l.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes
> (timeout 1 milliseconds)
> 2019-02-13 14:39:55.864 [:] [ - ShutdownTask] INFO
> l.impl.DefaultShutdownStrategy - Waiting as there are still 1 inflight and
> pending exchanges to complete, timeout in 0 seconds. Inflights per route:
> [http-call-route = 1]
> 2019-02-13 14:39:55.865 [:] [ - ShutdownTask] WARN
> l.impl.DefaultShutdownStrategy - Interrupted while waiting during graceful
> shutdown, will force shutdown now.
> 2019-02-13 14:39:55.865 [490f8c58da7accf9:] [ntExecutorGroup] WARN
> l.impl.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.
> 2019-02-13 14:39:55.865 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> l.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0
> seconds
> 2019-02-13 14:39:55.865 [:] [ - ShutdownTask] INFO
> l.impl.DefaultShutdownStrategy - Route: http-call-route shutdown complete,
> was consuming from: direct://http-call-route
> 2019-02-13 14:39:55.866 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> camel.impl.DefaultCamelContext - Route: http-call-route is stopped, was
> consuming from: direct://http-call-route
> 2019-02-13 14:39:55.866 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2)
> is shutting down
> 2019-02-13 14:39:55.867 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> l.impl.DefaultShutdownStrategy - Starting to graceful shutdown 2 routes
> (timeout 1 milliseconds)
> 2019-02-13 14:39:55.868 [:] [ - ShutdownTask] INFO
> l.impl.DefaultShutdownStrategy - Waiting as there are still 2 inflight and
> pending exchanges to complete, timeout in 0 seconds. Inflights per route:
> [http-call-route = 1, main = 1]
> 2019-02-13 14:39:55.868 [:] [ - ShutdownTask] INFO
> l.impl.DefaultShutdownStrategy - There are 1 inflight exchanges:
> InflightExchange: [exchangeId=ff360297-c613-4653-a815-11a14b590f12,
> fromRouteId=main, routeId=http-call-route, nodeId=http-call, elapsed=0,
> duration=19014]
> 2019-02-13 14:39:55.869 [490f8c58da7accf9:] [ntExecutorGroup] WARN
> l.impl.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.
> 2019-02-13 14:39:55.869 [:] [ - ShutdownTask] WARN
> l.impl.DefaultShutdownStrategy - Interrupted while waiting during graceful
> shutdown, will force shutdown now.
> 2019-02-13 14:39:55.869 [:] [ - ShutdownTask] INFO
> l.impl.DefaultShutdownStrategy - Route: http-call-route shutdown complete,
> was consuming from: direct://http-call-route
> 2019-02-13 14:39:55.869 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> l.impl.DefaultShutdownStrategy - There are 1 inflight exchanges:
> InflightExchange: [exchangeId=ff360297-c613-4653-a815-11a14b590f12,
> fromRouteId=main, routeId=http-call-route, nodeId=http-call, elapsed=0,
> duration=19015]
> 2019-02-13 14:39:55.869 [:] [ - ShutdownTask] INFO
> l.impl.DefaultShutdownStrategy - Route: main shutdown complete, was consuming
> from: direct://start
> 2019-02-13 14:39:55.869 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> l.impl.DefaultShutdownStrategy - Graceful shutdown of 2 routes completed in 0
> seconds
> 2019-02-13 14:39:55.876 [490f8c58da7accf9:] [ntExecutorGroup] WARN
> impl.DefaultInflightRepository - Shutting down while there are still 1
> inflight exchanges.
> 2019-02-13 14:39:55.885 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2)
> uptime 19.621 seconds
> 2019-02-13 14:39:55.886 [490f8c58da7accf9:] [ntExecutorGroup] INFO
> camel.impl.DefaultCamelContext - Apache Camel 2.23.1 (CamelContext: camel-2)
> is shutdown in 0.020 seconds
> 2019-02-13 14:39:55.889 [490f8c58da7accf9:] [ntExecutorGroup] ERROR
> ssors.IntegrationFlowProcessor - 590: IntegrationFlowExecutor timeout after
> 20000 milliseconds
> com.s.sdd.abv.processors.ExecutorTimeoutException: IntegrationFlowExecutor
> timeout after 20000 milliseconds
> at
> com.s.sdd.abv.processors.IntegrationFlowExecutor.process(IntegrationFlowExecutor.java:98)
> at
> com.s.sdd.abv.processors.IntegrationFlowProcessor.processExchange(IntegrationFlowProcessor.java:88)
> at
> com.s.sdd.abv.processors.IntegrationFlowProcessor.process(IntegrationFlowProcessor.java:71)
> at
> org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> at
> org.apache.camel.component.netty4.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:141)
> at
> org.apache.camel.component.netty4.handlers.ServerChannelHandler.channelRead0(ServerChannelHandler.java:112)
> at
> org.apache.camel.component.netty4.http.handlers.HttpServerChannelHandler.channelRead0(HttpServerChannelHandler.java:195)
> at
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
> at
> org.apache.camel.component.netty4.http.handlers.HttpServerMultiplexChannelHandler.channelRead0(HttpServerMultiplexChannelHandler.java:143)
> at
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
> at
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
> at
> io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38)
> at
> io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:353)
> at
> io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
> at
> io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.util.concurrent.TimeoutException: null
> at
> java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1771)
> at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
> at
> com.s.sdd.abv.processors.IntegrationFlowExecutor.process(IntegrationFlowExecutor.java:86)
> ... 20 common frames omitted
> 2019-02-13 14:40:22.321 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> .http.impl.execchain.RetryExec - I/O exception (java.net.SocketException)
> caught when processing request to {s}->https://www.aeat.es:443: Connection
> reset
> 2019-02-13 14:40:22.321 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> .http.impl.execchain.RetryExec - Retrying request to
> {s}->https://www.aeat.es:443
> 2019-02-13 14:41:05.659 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> .http.impl.execchain.RetryExec - I/O exception (java.net.SocketException)
> caught when processing request to {s}->https://www.aeat.es:443: Connection
> reset
> 2019-02-13 14:41:05.659 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> .http.impl.execchain.RetryExec - Retrying request to
> {s}->https://www.aeat.es:443
> 2019-02-13 14:41:49.021 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> .http.impl.execchain.RetryExec - I/O exception (java.net.SocketException)
> caught when processing request to {s}->https://www.aeat.es:443: Connection
> reset
> 2019-02-13 14:41:49.021 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> .http.impl.execchain.RetryExec - Retrying request to
> {s}->https://www.aeat.es:443
> 2019-02-13 14:42:32.457 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> ceptors.FlowHistoryInterceptor - Processing time: 175.253 save history time: 0
> 2019-02-13 14:42:32.457 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> pache.camel.processor.Pipeline - Message exchange has failed: so breaking out
> of pipeline for exchange: Exchange[ff360297-c613-4653-a815-11a14b590f12]
> Exception: java.net.SocketException: Connection reset
> 2019-02-13 14:42:32.458 [490f8c58da7accf9:] [pool-2-thread-1] INFO
> ceptors.FlowHistoryInterceptor - Processing time: 175.255 save history time: 1
> 2019-02-13 14:42:32.458 [490f8c58da7accf9:] [pool-2-thread-1] DEBUG
> pache.camel.processor.Pipeline - Message exchange has failed: so breaking out
> of pipeline for exchange: Exchange[ff360297-c613-4653-a815-11a14b590f12]
> Exception: java.net.SocketException: Connection reset
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)