Reputation: 1918
I am running an application that uses Apache Camel for file processing. The application works perfectly on my Windows, and on a CentOS for testing.
However, when running on a RHEL I get a strange behavior that shows not much info. Here's an extract of the log:
Configured property: initialDelay on bean: org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@ad834fbd with value: 1000
2019-02-28 16:09:46,037 main TRACE org.apache.camel.util.IntrospectionSupport Configured property: delay on bean: org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@ad834fbd with value: 500
2019-02-28 16:09:46,037 main TRACE org.apache.camel.util.IntrospectionSupport Configured property: useFixedDelay on bean: org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@ad834fbd with value: true
2019-02-28 16:09:46,037 main TRACE org.apache.camel.util.IntrospectionSupport Configured property: scheduledExecutorService on bean: org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@ad834fbd with value:
2019-02-28 16:09:46,037 main TRACE org.apache.camel.util.IntrospectionSupport Configured property: timeUnit on bean: org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@ad834fbd with value: MILLISECONDS
2019-02-28 16:09:46,037 main TRACE org.apache.camel.support.ServiceSupport Starting service
2019-02-28 16:09:46,037 main DEBUG org.apache.camel.impl.DefaultExecutorServiceManager Created new ScheduledThreadPool for source: Consumer[file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/BASEII_FRIDA_OUTGOING_PROC/CORPORATION_8/TO_PROCESS_STX?charset=UTF-8&doneFileName=%24%7Bfile%3Aname%7D.stx&move=.done&moveFailed=.error&readLock=changed&readLockCheckInterval=1500] with name: file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/BASEII_FRIDA_OUTGOING_PROC/CORPORATION_8/TO_PROCESS_STX?charset=UTF-8&doneFileName=%24%7Bfile%3Aname%7D.stx&move=.done&moveFailed=.error&readLock=changed&readLockCheckInterval=1500 -> org.apache.camel.util.concurrent.SizedScheduledExecutorService@bac57329[file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/BASEII_FRIDA_OUTGOING_PROC/CORPORATION_8/TO_PROCESS_STX?charset=UTF-8&doneFileName=%24%7Bfile%3Aname%7D.stx&move=.done&moveFailed=.error&readLock=changed&readLockCheckInterval=1500]
2019-02-28 16:09:46,037 main DEBUG o.a.camel.impl.DefaultScheduledPollConsumerScheduler Scheduling poll (fixed delay) with initialDelay: 1000, delay: 500 (milliseconds) for: file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/BASEII_FRIDA_OUTGOING_PROC/CORPORATION_8/TO_PROCESS_STX?charset=UTF-8&doneFileName=%24%7Bfile%3Aname%7D.stx&move=.done&moveFailed=.error&readLock=changed&readLockCheckInterval=1500
2019-02-28 16:09:46,037 main TRACE o.a.c.util.concurrent.SizedScheduledExecutorService canScheduleOrExecute 0 < 1000 -> true
2019-02-28 16:09:46,038 main TRACE org.apache.camel.util.concurrent.CamelThreadFactory Created thread[Camel (CamelContext) thread #58 - file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/BASEII_FRIDA_OUTGOING_PROC/CORPORATION_8/TO_PROCESS_STX] -> Thread[Camel (CamelContext) thread #58 - file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/BASEII_FRIDA_OUTGOING_PROC/CORPORATION_8/TO_PROCESS_STX,5,main]
2019-02-28 16:09:46,038 main INFO org.apache.camel.spring.SpringCamelContext Route: FRIDABaseIIFileOutgoingTransport started and consuming from: file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/BASEII_FRIDA_OUTGOING_PROC/CORPORATION_8/TO_PROCESS_STX?charset=UTF-8&doneFileName=%24%7Bfile%3Aname%7D.stx&move=.done&moveFailed=.error&readLock=changed&readLockCheckInterval=1500
2019-02-28 16:09:46,038 main TRACE org.apache.camel.support.ServiceSupport Starting service
2019-02-28 16:09:46,038 main INFO org.apache.camel.spring.SpringCamelContext Apache Camel 2.21.1 (CamelContext: CamelContext) is shutting down
2019-02-28 16:09:46,038 main TRACE org.apache.camel.util.ServiceHelper Stopping service org.a down service org.apache.camel.impl.DefaultRouteController@36b5248f
2019-02-28 16:09:46,038 main TRACE org.apache.camel.support.ServiceSupport Servpache.camel.impl.DefaultRouteController@36b5248f
2019-02-28 16:09:46,038 main TRACE org.apache.camel.util.ServiceHelper Shuttingice already stopped
2019-02-28 16:09:46,039 main INFO org.apache.camel.impl.DefaultShutdownStrategy Starting to graceful shutdown 26 routes (timeout 300 seconds)
2019-02-28 16:09:46,039 main DEBUG org.apache.camel.impl.DefaultExecutorServiceManager Created new ThreadPool for source: org.apache.camel.impl.DefaultShutdownStrategy@1950c033 with name: ShutdownTask. -> org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@33d3ff79[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0][ShutdownTask]
2019-02-28 16:09:46,040 main TRACE org.apache.camel.util.concurrent.CamelThreadFactory Created thread[Camel (CamelContext) thread #59 - ShutdownTask] -> Thread[Camel (CamelContext) thread #59 - ShutdownTask,5,main]
2019-02-28 16:09:46,040 Camel (CamelContext) thread #59 - ShutdownTask DEBUG org.apache.camel.impl.DefaultShutdownStrategy There are 26 routes to shutdown
2019-02-28 16:09:46,041 Camel (CamelContext) thread #59 - ShutdownTask TRACE org.apache.camel.impl.DefaultShutdownStrategy Shutting down route: FRIDABaseIIFileOutgoingTransport with options [Default,CompleteCurrentTaskOnly]
2019-02-28 16:09:46,041 Camel (CamelContext) thread #59 - ShutdownTask TRACE org.apache.camel.impl.DefaultShutdownStrategy Suspending: Consumer[file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/BASEII_FRIDA_OUTGOING_PROC/CORPORATION_8/TO_PROCESS_STX?charset=UTF-8&doneFileName=%24%7Bfile%3Aname%7D.stx&move=.done&moveFailed=.error&readLock=changed&readLockCheckInterval=1500]
2019-02-28 16:09:46,041 Camel (CamelContext) thread #59 - ShutdownTask TRACE org.apache.camel.util.ServiceHelper Suspending service Consumer[file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/BASEII_FRIDA_OUTGOING_PROC/CORPORATION_8/TO_PROCESS_STX?charset=UTF-8&doneFileName=%24%7Bfile%3Aname%7D.stx&move=.done&moveFailed=.error&readLock=changed&readLockCheckInterval=1500]
2019-02-28 16:09:46,041 Camel (CamelContext) thread #59 - ShutdownTask TRACE org.apache.camel.impl.DefaultShutdownStrategy Suspend complete for: Consumer[file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/BASEII_FRIDA_OUTGOING_PROC/CORPORATION_8/TO_PROCESS_STX?charset=UTF-8&doneFileName=%24%7Bfile%3Aname%7D.stx&move=.done&moveFailed=.error&readLock=changed&readLockCheckInterval=1500]
2019-02-28 16:09:46,041 Camel (CamelContext) thread #59 - ShutdownTask DEBUG org.apache.camel.impl.DefaultShutdownStrategy Route: FRIDABaseIIFileOutgoingTransport suspended and shutdown deferred, was consuming from: file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/BASEII_FRIDA_OUTGOING_PROC/CORPORATION_8/TO_PROCESS_STX?charset=UTF-8&doneFileName=%24%7Bfile%3Aname%7D.stx&move=.done&moveFailed=.error&readLock=changed&readLockCheckInterval=1500
2019-02-28 16:09:46,041 Camel (CamelContext) thread #59 - ShutdownTask TRACE org.apache.camel.impl.DefaultShutdownStrategy Shutting down route: FileErrorsReportToDB with options [Default,CompleteCurrentTaskOnly]
2019-02-28 16:09:46,041 Camel (CamelContext) thread #59 - ShutdownTask DEBUG org.apache.camel.impl.DefaultShutdownStrategy
Before the first line it's basically the same thing repeating the log for each file consumer route.
The context never stops... it's stays up and the file consumers keep logging this:
2019-02-28 16:09:46,996 Camel (CamelContext) thread #37 - file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/LOGISTIC/CORPORATION_8/TO_PROCESS_STX/temp4 TRACE org.apache.camel.impl.ScheduledPollConsumer Cannot start to poll: file:///opt/IBM/WebSphere90/tmp/FILES/OUT/PROCESSED/LOGISTIC/CORPORATION_8/TO_PROCESS_STX/temp4?charset=UTF-8&exclude=TEMP_.*&move=.done&moveFailed=.error&readLock=rename as its suspended
Can't find why the issue is. Any idea? Thanks!
Upvotes: 0
Views: 155
Reputation: 2937
It appears as if your "main" is not staying up and running. So, when the app comes up, Camel initializes and configures the route. But, the "main" simply ends immediately. Would not explain why if would work on one OS and not another, but perhaps something else is different on those two environments?
Are you using Spring Boot?
See this: http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html
Upvotes: 1