Hi JB, Thanks for your answer.
>From my debug.log (see below) I can only see a lot of config updates before the exception, though it looks like the EventAdmin handles a configuration org.apache.felix.eventadmin.impl.-configuration update right before the exception, I think it's caused by Decanter, which adds some properties to the file. Can that explain the restart ? Anyway, isn't a restart always possible ? Or do we have to make sure eventAdmin is never restarted ? I did already post the karaf-maven-plugin configuration, what else might be useful to you ? 2023-03-20 08:56:39,724 - [o.a.f.configadmin ][CM Configuration Updater (Update: pid=org.apache.felix.hc.generalchecks.FrameworkStartCheck)] DEBUG - Updating configuration org.apache.felix.hc.generalchecks.FrameworkStartCheck to revision #2 2023-03-20 08:56:39,724 - [o.a.f.configadmin ][CM Configuration Updater (Update: pid=org.apache.felix.eventadmin.impl.EventAdmin)] DEBUG - Running task Update: pid=org.apache.felix.eventadmin.impl.EventAdmin 2023-03-20 08:56:39,724 - [o.a.f.configadmin ][CM Configuration Updater (Update: pid=org.apache.felix.eventadmin.impl.EventAdmin)] DEBUG - Updating configuration org.apache.felix.eventadmin.impl.EventAdmin to revision #2 2023-03-20 08:56:39,725 - [o.a.f.configadmin ][CM Configuration Updater (Update: pid=org.apache.felix.eventadmin.impl.EventAdmin)] DEBUG - canReceive=true; bundle=reference:file:/opt/jenkins-slave/home/workspace/cs/csf-vlabel/CSF_Build/karaf_assembler_it_trunk_0/csf-assembler-karaf-integration-tests/it-tests-ini/target/target/paxexam/186d19ae-7456-4daa-9563-66756537ad7f/system/org/apache/karaf/services/org.apache.karaf.services.eventadmin/4.4.3/org.apache.karaf.services.eventadmin-4.4.3.jar; configuration=? (no SecurityManager) 2023-03-20 08:56:39,726 - [o.a.f.configadmin ][CM Configuration Updater (Update: pid=org.apache.cxf.osgi)] DEBUG - Running task Update: pid=org.apache.cxf.osgi 2023-03-20 08:56:39,726 - [o.a.f.configadmin ][CM Configuration Updater (Update: pid=org.apache.cxf.osgi)] DEBUG - Updating configuration org.apache.cxf.osgi to revision #2 2023-03-20 08:56:39,726 - [o.a.f.configadmin ][CM Configuration Updater (Update: pid=service.config.epos.notify.dossier.listener)] DEBUG - Running task Update: pid=service.config.epos.notify.dossier.listener 2023-03-20 08:56:39,735 - [o.a.k.s.eventadmin ][CM Configuration Updater (Update: pid=service.config.epos.notify.dossier.listener)] WARN - EventAdmin: Exception: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@53b3ce21[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@17421564[Wrapped task = org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter@139a1914]] rejected from java.util.concurrent.ThreadPoolExecutor@488bf91e[Shutting down, pool size = 8, active threads = 0, queued tasks = 0, completed tasks = 95] java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@53b3ce21[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@17421564[Wrapped task = org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter@139a1914]] rejected from java.util.concurrent.ThreadPoolExecutor@488bf91e[Shutting down, pool size = 8, active threads = 0, queued tasks = 0, completed tasks = 95] Kind regards, Steven On Wed, Mar 22, 2023 at 9:43 AM Jean-Baptiste Onofré <[email protected]> wrote: > Hi Steven, > > The refresh doesn't occur on Karaf standard distribution, so I think > you have another feature that triggers the refresh. > > Can you please share the karaf.log and eventually your assembly pom.xml ? > > Thanks > Regards > JB > > On Tue, Mar 21, 2023 at 11:31 AM Steven Huypens > <[email protected]> wrote: > > > > Hi, > > > > When starting our custom Karaf distribution, we regularly see the error > below. I'm not sure I understand it OK, but it looks like the Felix > ConfigurationManager tries to log something, but an exception is thrown, > stopping the update-Thread. Maybe the eventAdmin bundle is restarted > somehow during boot, which makes it unavailable for a short period, but I > feel that a logLine should never have this kind of impact. At the bottom > you can find the configuration of our karaf-maven-plugin. > > > > Can I prevent the eventAdmin bundle from being restarted, or should the > exception be handled differently somewhere ? > > > > > > > > RejectedExecutionException: Task > > java.util.concurrent.FutureTask@616ff6e9[Not > completed, task = > java.util.concurrent.Executors$RunnableAdapter@35bad341[Wrapped > task = > org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter@6de671aa]] > rejected from java.util.concurrent.ThreadPoolExecutor@20fbc2ac[Shutting > down, pool size = 4, active threads = 0, queued tasks = 0, completed tasks > = 176] > > java.util.concurrent.RejectedExecutionException: Task > java.util.concurrent.FutureTask@616ff6e9[Not completed, task = > java.util.concurrent.Executors$RunnableAdapter@35bad341[Wrapped task = > org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter@6de671aa]] > rejected from java.util.concurrent.ThreadPoolExecutor@20fbc2ac[Shutting > down, pool size = 4, active threads = 0, queued tasks = 0, completed tasks > = 176] > > at > java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2055) > > at > java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:825) > > at > java.base/java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1350) > > at > java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118) > > at > org.apache.felix.eventadmin.impl.tasks.DefaultThreadPool.executeTask(DefaultThreadPool.java:134) > > at > org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks.execute(AsyncDeliverTasks.java:102) > > at > org.apache.felix.eventadmin.impl.handler.EventAdminImpl.postEvent(EventAdminImpl.java:180) > > at > org.apache.felix.eventadmin.impl.security.EventAdminSecurityDecorator.postEvent(EventAdminSecurityDecorator.java:79) > > at > org.ops4j.pax.logging.spi.support.EventAdminTracker.deliver(EventAdminTracker.java:103) > > at > org.ops4j.pax.logging.spi.support.EventAdminTracker.postEvent(EventAdminTracker.java:65) > > at > org.ops4j.pax.logging.log4j2.internal.PaxLoggingServiceImpl.handleEvents(PaxLoggingServiceImpl.java:417) > > at > org.ops4j.pax.logging.log4j2.internal.PaxLoggerImpl.doLog0(PaxLoggerImpl.java:1127) > > at > org.ops4j.pax.logging.log4j2.internal.PaxLoggerImpl.doLog(PaxLoggerImpl.java:1098) > > at > org.ops4j.pax.logging.log4j2.internal.PaxLoggerImpl.debug(PaxLoggerImpl.java:252) > > at > org.ops4j.pax.logging.log4j2.internal.PaxLoggingServiceImpl.logImpl(PaxLoggingServiceImpl.java:402) > > at > org.ops4j.pax.logging.log4j2.internal.PaxLoggingServiceImpl.access$000(PaxLoggingServiceImpl.java:70) > > at > org.ops4j.pax.logging.log4j2.internal.PaxLoggingServiceImpl$1ManagedPaxLoggingService.log(PaxLoggingServiceImpl.java:678) > > at org.apache.felix.cm.impl.Log.log(Log.java:186) > > at org.apache.felix.cm.impl.Log.log(Log.java:168) > > at > org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1383) > > at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122) > > at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:84) > > at java.base/java.lang.Thread.run(Thread.java:829) > > > > <plugin> > > <groupId>org.apache.karaf.tooling</groupId> > > <artifactId>karaf-maven-plugin</artifactId> > > <version>${karaf.plugin.version}</version> > > <configuration> > > > <includeBuildOutputDirectory>false</includeBuildOutputDirectory> > > <blacklistedFeatures> > > <!-- will be replaced by felix-http ( > http://blog.nanthrax.net/?p=1038) --> > > <feature>http</feature> > > <feature>pax-web-*</feature> > > > > <!-- diagnostic-feature results in > HealthCheck : WARN Inactive bundle 308 org.apache.karaf.diagnostic.boot: > RESOLVED --> > > <feature>diagnostic</feature> > > > > <!-- Blacklisting the Apache Aries > transaction-blueprint bundles to prevent a --> > > <!-- "Ignored XML validation warning > org.xml.sax.SAXParseException". Included by Cellar --> > > > <blacklistedFeature>transaction</blacklistedFeature> > > </blacklistedFeatures> > > > > <blacklistedBundles> > > <!-- Excluding this bundle from the > framework-feature, because of the > mvn:jakarta.xml.bind/jakarta.xml.bind-api/2.3.2 bundle from the cxf-feature > --> > > > > <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/2.9.0</bundle> > > </blacklistedBundles> > > <bootRepositories> > > > > <bootRepository>mvn:org.apache.karaf.features/spring/${karaf.runtime.version}/xml/features</bootRepository> > > </bootRepositories> > > <startupFeatures> > > <startupFeature>eventadmin</startupFeature> > > </startupFeatures> > > <bootFeatures> > > <bootFeature>scr</bootFeature> > > <bootFeature>standard</bootFeature> > > <bootFeature>webconsole</bootFeature> > > <bootFeature>felix-http</bootFeature> > > > > > <bootFeature>decanter-collector-jmx</bootFeature> > > > <bootFeature>decanter-appender-prometheus</bootFeature> > > </bootFeatures> > > <javase>11</javase> > > <archiveTarGz>false</archiveTarGz> > > <propertyFileEdits> > > > > ${project.build.directory}/maven-shared-archive-resources/propertyFileEdits/assembly-property-edits.xml > > </propertyFileEdits> > > <classifier>distribution</classifier> > > <useReferenceUrls>true</useReferenceUrls> > > </configuration> > > </plugin> > > > > Kind regards, > > Steven Huypens >
