[ https://issues.apache.org/jira/browse/KARAF-4158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15677636#comment-15677636 ]
Niten Aggarwal edited comment on KARAF-4158 at 11/18/16 8:18 PM: ----------------------------------------------------------------- Hi Christian, It's not just about config, startup order is not preserved during first startup. I tried setting below flag to true, but still don't see much difference. Just to make sure is it a custom distribution issue or karaf startup, i started few features on clean karaf. You can see starting order is different that installation order. Problem gets more worse when we have custom features where featureA depends on featureB, and if order gets change during startup, featureA will never start as featureB never got into STARTED state. Bundles have ranking but is there any way we can force Karaf to follow strict order of features defined in bootFeatures? # # Defines if the boot features are started in asynchronous mode (in a dedicated thread) # featuresBootAsynchronous=true C:\apache-karaf-4.0.7\bin>karaf clean __ __ ____ / //_/____ __________ _/ __/ / ,< / __ `/ ___/ __ `/ /_ / /| |/ /_/ / / / /_/ / __/ /_/ |_|\__,_/_/ \__,_/_/ Karaf (4.0.7) Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Karaf. karaf@root>feature:install -v standard feature webconsole Adding features: standard/[4.0.7,4.0.7], feature/[4.0.7,4.0.7], webconsole/[4.0.7,4.0.7] Changes to perform: Region: root Bundles to install: mvn:javax.mail/mail/1.4.4 mvn:javax.servlet/javax.servlet-api/3.1.0 mvn:javax.websocket/javax.websocket-api/1.1 mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/1.0.1 mvn:org.apache.geronimo.specs/geronimo-jaspic_1.0_spec/1.1 mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1 mvn:org.apache.karaf.http/org.apache.karaf.http.core/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.http/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.instance/4.0.7 mvn:org.apache.xbean/xbean-bundleutils/4.1 mvn:org.apache.xbean/xbean-finder/4.1 mvn:org.eclipse.jetty/jetty-client/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-continuation/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-http/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-io/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jaas/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jaspi/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jmx/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jndi/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-plus/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-rewrite/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-security/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-server/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-servlet/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-servlets/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-util/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-util-ajax/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-webapp/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-api/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-client/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-common/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/javax-websocket-client-impl/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/javax-websocket-server-impl/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-server/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-servlet/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-xml/9.2.19.v20160908 mvn:org.ops4j.pax.web/pax-web-api/4.3.0 mvn:org.ops4j.pax.web/pax-web-jetty/4.3.0 mvn:org.ops4j.pax.web/pax-web-runtime/4.3.0 mvn:org.ops4j.pax.web/pax-web-spi/4.3.0 Installing bundles: mvn:javax.mail/mail/1.4.4 mvn:javax.servlet/javax.servlet-api/3.1.0 mvn:javax.websocket/javax.websocket-api/1.1 mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/1.0.1 mvn:org.apache.geronimo.specs/geronimo-jaspic_1.0_spec/1.1 mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1 mvn:org.apache.karaf.http/org.apache.karaf.http.core/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.http/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.instance/4.0.7 mvn:org.apache.xbean/xbean-bundleutils/4.1 mvn:org.apache.xbean/xbean-finder/4.1 mvn:org.eclipse.jetty/jetty-client/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-continuation/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-http/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-io/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jaas/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jaspi/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jmx/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jndi/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-plus/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-rewrite/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-security/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-server/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-servlet/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-servlets/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-util/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-util-ajax/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-webapp/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-api/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-client/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-common/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/javax-websocket-client-impl/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/javax-websocket-server-impl/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-server/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-servlet/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-xml/9.2.19.v20160908 mvn:org.ops4j.pax.web/pax-web-api/4.3.0 mvn:org.ops4j.pax.web/pax-web-jetty/4.3.0 mvn:org.ops4j.pax.web/pax-web-runtime/4.3.0 mvn:org.ops4j.pax.web/pax-web-spi/4.3.0 Stopping bundles: org.ops4j.pax.logging.pax-logging-service/1.8.5 Refreshing bundles: org.ops4j.pax.logging.pax-logging-service/1.8.5 (Should be wired to: javax.mail/1.4.4 (through [org.ops4j.pax.logging.pax-logging-service/1.8.5] osgi.wiring.package; filter:="(osgi.wiring.package=java Starting bundles: org.ops4j.pax.logging.pax-logging-service/1.8.5 org.apache.xbean.bundleutils/4.1.0 org.apache.xbean.finder/4.1.0 javax.servlet-api/3.1.0 org.eclipse.jetty.util/9.2.19.v20160908 org.eclipse.jetty.http/9.2.19.v20160908 org.eclipse.jetty.io/9.2.19.v20160908 org.eclipse.jetty.jmx/9.2.19.v20160908 org.eclipse.jetty.server/9.2.19.v20160908 org.eclipse.jetty.security/9.2.19.v20160908 org.eclipse.jetty.servlet/9.2.19.v20160908 org.apache.geronimo.specs.geronimo-jaspic_1.0_spec/1.1.0 org.apache.aries.spifly.dynamic.bundle/1.0.1 org.eclipse.jetty.jaspi/9.2.19.v20160908 org.eclipse.jetty.xml/9.2.19.v20160908 org.eclipse.jetty.jaas/9.2.19.v20160908 org.eclipse.jetty.websocket.api/9.2.19.v20160908 org.eclipse.jetty.websocket.common/9.2.19.v20160908 org.eclipse.jetty.websocket.client/9.2.19.v20160908 javax.websocket-api/1.1.0 org.eclipse.jetty.websocket.javax.websocket/9.2.19.v20160908 org.eclipse.jetty.websocket.servlet/9.2.19.v20160908 org.eclipse.jetty.websocket.server/9.2.19.v20160908 org.eclipse.jetty.websocket.javax.websocket.server/9.2.19.v20160908 org.apache.karaf.webconsole.console/4.0.7 org.eclipse.jetty.continuation/9.2.19.v20160908 org.eclipse.jetty.webapp/9.2.19.v20160908 org.apache.karaf.webconsole.features/4.0.7 org.apache.geronimo.specs.geronimo-jta_1.1_spec/1.1.1 org.eclipse.jetty.plus/9.2.19.v20160908 org.eclipse.jetty.client/9.2.19.v20160908 org.apache.karaf.http.core/4.0.7 org.apache.karaf.webconsole.instance/4.0.7 org.apache.karaf.webconsole.http/4.0.7 org.eclipse.jetty.servlets/9.2.19.v20160908 org.apache.karaf.webconsole.gogo/4.0.7 org.eclipse.jetty.util.ajax/9.2.19.v20160908 org.eclipse.jetty.rewrite/9.2.19.v20160908 javax.mail/1.4.4 org.eclipse.jetty.jndi/9.2.19.v20160908 org.ops4j.pax.web.pax-web-jetty/4.3.0 org.ops4j.pax.web.pax-web-runtime/4.3.0 org.ops4j.pax.web.pax-web-api/4.3.0 org.ops4j.pax.web.pax-web-spi/4.3.0 Done. karaf@root> was (Author: nitina82): Hi Christian, It's not just about config, startup order is not preserved during first startup. I tried setting below flag to true, but still don't see much difference. Just to make sure is it a custom distribution issue or karaf startup, i started few features on clean karaf. You can see starting order is different that installation order. Problem gets more worse when we have custom features where featureA depends on featureB, and if order gets change during startup, featureA will never start as featureB never got into STARTED state. Bundles have ranking but is there any way we can force Karaf to follow strict order of features defined in bootFeatures? # # Defines if the boot features are started in asynchronous mode (in a dedicated thread) # featuresBootAsynchronous=true C:\CCC\apache-karaf-4.0.7\bin>karaf clean __ __ ____ / //_/____ __________ _/ __/ / ,< / __ `/ ___/ __ `/ /_ / /| |/ /_/ / / / /_/ / __/ /_/ |_|\__,_/_/ \__,_/_/ Karaf (4.0.7) Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Karaf. karaf@root>feature:install -v standard feature webconsole Adding features: standard/[4.0.7,4.0.7], feature/[4.0.7,4.0.7], webconsole/[4.0.7,4.0.7] Changes to perform: Region: root Bundles to install: mvn:javax.mail/mail/1.4.4 mvn:javax.servlet/javax.servlet-api/3.1.0 mvn:javax.websocket/javax.websocket-api/1.1 mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/1.0.1 mvn:org.apache.geronimo.specs/geronimo-jaspic_1.0_spec/1.1 mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1 mvn:org.apache.karaf.http/org.apache.karaf.http.core/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.http/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.instance/4.0.7 mvn:org.apache.xbean/xbean-bundleutils/4.1 mvn:org.apache.xbean/xbean-finder/4.1 mvn:org.eclipse.jetty/jetty-client/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-continuation/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-http/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-io/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jaas/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jaspi/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jmx/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jndi/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-plus/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-rewrite/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-security/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-server/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-servlet/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-servlets/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-util/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-util-ajax/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-webapp/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-api/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-client/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-common/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/javax-websocket-client-impl/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/javax-websocket-server-impl/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-server/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-servlet/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-xml/9.2.19.v20160908 mvn:org.ops4j.pax.web/pax-web-api/4.3.0 mvn:org.ops4j.pax.web/pax-web-jetty/4.3.0 mvn:org.ops4j.pax.web/pax-web-runtime/4.3.0 mvn:org.ops4j.pax.web/pax-web-spi/4.3.0 Installing bundles: mvn:javax.mail/mail/1.4.4 mvn:javax.servlet/javax.servlet-api/3.1.0 mvn:javax.websocket/javax.websocket-api/1.1 mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/1.0.1 mvn:org.apache.geronimo.specs/geronimo-jaspic_1.0_spec/1.1 mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1 mvn:org.apache.karaf.http/org.apache.karaf.http.core/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.http/4.0.7 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.instance/4.0.7 mvn:org.apache.xbean/xbean-bundleutils/4.1 mvn:org.apache.xbean/xbean-finder/4.1 mvn:org.eclipse.jetty/jetty-client/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-continuation/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-http/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-io/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jaas/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jaspi/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jmx/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-jndi/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-plus/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-rewrite/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-security/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-server/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-servlet/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-servlets/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-util/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-util-ajax/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-webapp/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-api/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-client/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-common/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/javax-websocket-client-impl/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/javax-websocket-server-impl/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-server/9.2.19.v20160908 mvn:org.eclipse.jetty.websocket/websocket-servlet/9.2.19.v20160908 mvn:org.eclipse.jetty/jetty-xml/9.2.19.v20160908 mvn:org.ops4j.pax.web/pax-web-api/4.3.0 mvn:org.ops4j.pax.web/pax-web-jetty/4.3.0 mvn:org.ops4j.pax.web/pax-web-runtime/4.3.0 mvn:org.ops4j.pax.web/pax-web-spi/4.3.0 Stopping bundles: org.ops4j.pax.logging.pax-logging-service/1.8.5 Refreshing bundles: org.ops4j.pax.logging.pax-logging-service/1.8.5 (Should be wired to: javax.mail/1.4.4 (through [org.ops4j.pax.logging.pax-logging-service/1.8.5] osgi.wiring.package; filter:="(osgi.wiring.package=java Starting bundles: org.ops4j.pax.logging.pax-logging-service/1.8.5 org.apache.xbean.bundleutils/4.1.0 org.apache.xbean.finder/4.1.0 javax.servlet-api/3.1.0 org.eclipse.jetty.util/9.2.19.v20160908 org.eclipse.jetty.http/9.2.19.v20160908 org.eclipse.jetty.io/9.2.19.v20160908 org.eclipse.jetty.jmx/9.2.19.v20160908 org.eclipse.jetty.server/9.2.19.v20160908 org.eclipse.jetty.security/9.2.19.v20160908 org.eclipse.jetty.servlet/9.2.19.v20160908 org.apache.geronimo.specs.geronimo-jaspic_1.0_spec/1.1.0 org.apache.aries.spifly.dynamic.bundle/1.0.1 org.eclipse.jetty.jaspi/9.2.19.v20160908 org.eclipse.jetty.xml/9.2.19.v20160908 org.eclipse.jetty.jaas/9.2.19.v20160908 org.eclipse.jetty.websocket.api/9.2.19.v20160908 org.eclipse.jetty.websocket.common/9.2.19.v20160908 org.eclipse.jetty.websocket.client/9.2.19.v20160908 javax.websocket-api/1.1.0 org.eclipse.jetty.websocket.javax.websocket/9.2.19.v20160908 org.eclipse.jetty.websocket.servlet/9.2.19.v20160908 org.eclipse.jetty.websocket.server/9.2.19.v20160908 org.eclipse.jetty.websocket.javax.websocket.server/9.2.19.v20160908 org.apache.karaf.webconsole.console/4.0.7 org.eclipse.jetty.continuation/9.2.19.v20160908 org.eclipse.jetty.webapp/9.2.19.v20160908 org.apache.karaf.webconsole.features/4.0.7 org.apache.geronimo.specs.geronimo-jta_1.1_spec/1.1.1 org.eclipse.jetty.plus/9.2.19.v20160908 org.eclipse.jetty.client/9.2.19.v20160908 org.apache.karaf.http.core/4.0.7 org.apache.karaf.webconsole.instance/4.0.7 org.apache.karaf.webconsole.http/4.0.7 org.eclipse.jetty.servlets/9.2.19.v20160908 org.apache.karaf.webconsole.gogo/4.0.7 org.eclipse.jetty.util.ajax/9.2.19.v20160908 org.eclipse.jetty.rewrite/9.2.19.v20160908 javax.mail/1.4.4 org.eclipse.jetty.jndi/9.2.19.v20160908 org.ops4j.pax.web.pax-web-jetty/4.3.0 org.ops4j.pax.web.pax-web-runtime/4.3.0 org.ops4j.pax.web.pax-web-api/4.3.0 org.ops4j.pax.web.pax-web-spi/4.3.0 Done. karaf@root> > Unexpected behavior on first startup > ------------------------------------ > > Key: KARAF-4158 > URL: https://issues.apache.org/jira/browse/KARAF-4158 > Project: Karaf > Issue Type: Bug > Components: karaf-core > Affects Versions: 4.0.3 > Environment: RHEL 6.2 x32, Java 1.8.0_72-ea-b05 > Reporter: Jean-Philippe CLEMENT > Assignee: Christian Schneider > Fix For: 4.1.0, 4.0.6 > > > This problem only occurs on the very first startup of a custom assembly. This > means unpacking the assembly .tar.gz then run karaf. This issue is not 100% > reproducible. Several untar/run might be necessary to reproduce the issue. > The problem comes with Blueprint property-placeholders. User bundles might be > started and not get .cfg replaced properties but the "$(PARAM_NAME)" itself > (String property). > I suspect user bundles to be started before the .cfg files are populated in > the /etc directory. -- This message was sent by Atlassian JIRA (v6.3.4#6332)