I think the refresh itself is not the problem. Most of the time is wasted between " Adding features: hawtio/[2.14.0,2.14.0] " and "Changes to perform" (96s):
2021-12-07 08:02:07,355 | INFO | pipe-feature:install -t -v hawtio | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | Adding features: hawtio/[2.14.0,2.14.0] | 2021-12-07 08:03:43,140 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | Changes to perform: | 2021-12-07 08:03:43,141 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | Region: root | 2021-12-07 08:03:43,141 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | Bundles to update: | 2021-12-07 08:03:43,142 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | com.fasterxml.jackson.core.jackson-annotations/2.12.4 with mvn:com.fasterxml.jackson.core/jackson-annotations/2.12.3 | 2021-12-07 08:03:43,142 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | Bundles to install: | 2021-12-07 08:03:43,142 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | mvn:io.hawt/hawtio-log/2.14.0 | 2021-12-07 08:03:43,143 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | mvn:io.hawt/hawtio-log-osgi/2.14.0 | 2021-12-07 08:03:43,143 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | mvn:io.hawt/hawtio-osgi/2.14.0/war | 2021-12-07 08:03:43,143 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | mvn:io.hawt/hawtio-osgi-jmx/2.14.0 | 2021-12-07 08:03:43,144 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | Bundles to refresh: The problem is caused by different versions of jackson-annotations bundle in the system: 98 | Active | 35 | 2.11.4 | mvn:com.fasterxml.jackson.core/jackson-annotations/2.11.4 99 | Active | 80 | 2.12.4 | mvn:com.fasterxml.jackson.core/jackson-annotations/2.12.4 2.11.4 comes with feature cxf-jackson (version 3.4.5) into the system 2.12.4 comes activemq 5.16.3 into the system. When I patch the hawtio feature and set the version number of the jacksons bundle from 2.12.3 to 2.12.4 the installation of the hawtio feature takes 4 seconds. 2021-12-07 08:24:44,504 | INFO | pipe-feature:install -t -v hawtio | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | Adding features: hawtio/[2.14.0,2.14.0] | 2021-12-07 08:24:48,078 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | Changes to perform: | 2021-12-07 08:24:48,079 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | Region: root | 2021-12-07 08:24:48,080 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | Bundles to install: | 2021-12-07 08:24:48,080 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | mvn:io.hawt/hawtio-log/2.14.0 | 2021-12-07 08:24:48,080 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | mvn:io.hawt/hawtio-log-osgi/2.14.0 | 2021-12-07 08:24:48,081 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | mvn:io.hawt/hawtio-osgi/2.14.0/war | 2021-12-07 08:24:48,081 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | mvn:io.hawt/hawtio-osgi-jmx/2.14.0 | 2021-12-07 08:24:48,082 | INFO | features-3-thread-1 | org.apache.karaf.features.internal.service.FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.3 | Bundles to refresh: | Regards Richard Am Di., 7. Dez. 2021 um 05:45 Uhr schrieb Jean-Baptiste Onofré < [email protected]>: > Hi, > > When you do feature:install -v, do you see lot of refresh happening ? > > I will do feature:install -tv to check the resolver output (it could > depend of your runtime, what's installed in there). > > Regards > JB > > On 06/12/2021 17:33, Richard Hierlmeier wrote: > > > > I tried to install the hawtio 2.14.0 feature into Karaf 4.3.3 instance. > > It took more than two minutes until feature becomes available. > > When I am installing the hawtio feature into a blank Karaf 4.3.3 it > > takes around 2 seconds. > > > > I profiled the deployment process and found out that 98% of the time is > > consumed in the method > > > > org.apache.felix.resolver.ResolverImpl.calculatePackageSpaces > > (org.apache.felix.resolver.ResolverImpl.ResolveSession, > > org.apache.felix.resolver.Candidates, java.util.Collection) > > > > You can find an image of the profiling result here: > > > > https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7 > > <https://210922rtyenaavi3ide.nextcloud.hosting.zone/s/o2YG4D2Qrbp5Lo7> > > > > I think the cause of this problem lies somewhere in the bundles and > > feature that are already deploy in the Karaf instance. I have installed > > cxf, activemq, and some custom features. > > I have no glue howto solve this problem. > > And it is a problem, because when I add the hawtio feature to the boot > > feature list, than the startup of my Karaf instance takes also more than > > two minutes. > > > > Any idea? > > > > > > Regards > > > > Richard > > > > > > > > > > > > > > > > >
