Re: Configuring MDC logging karaf 4 camel 3.7.0
Hi Michael, Happy new year too ! I forgot during end of year vacation. I’m busy with ActiveMQ release preparation now, but I will switch back to test on Windows tomorrow. Regards JB > Le 6 janv. 2021 à 17:07, michael e a écrit : > > Hello JB, > > Happy new year, any news about this ? > > Thanks, > Michael. > > De : JB Onofré > Envoyé : jeudi 24 décembre 2020 17:00 > À : user@karaf.apache.org > Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 > > I would consider as a big if I have the error on Windows. > > I’m suspecting an issue on Windows only (I hate this os ;) ). > > Let me setup a vm (just need time). > > Regard > JB > >> Le 24 déc. 2020 à 16:36, michael e a écrit : >> >> >> Ok thanks so is a bug ? Or i just have to change something ? (This is the >> provided configuration i didn't change anythin expect fileName pattern) >> >> Regards, >> Michael. >> >> De : JB Onofré >> Envoyé : jeudi 24 décembre 2020 16:23 >> À : user@karaf.apache.org >> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >> >> Understood. I don’t have any error. The error you have seems related to the >> rolling file configuration. >> >> Regards >> JB >> >>> Le 24 déc. 2020 à 15:16, michael e a écrit : >>> >>> >>> Ok thanks 'All log files are created and populated' for me also just then >>> in the karaf i see ERROR logs >>> >>> Thanks, >>> Regards, >>> Michael. >>> >>> De : JB Onofré >>> Envoyé : jeudi 24 décembre 2020 15:05 >>> À : user@karaf.apache.org >>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >>> >>> Yeah. I tried with the karaf camel examples. All log files are created and >>> populated. >>> >>> I will bootstrap a Windows vm to test. >>> >>> Regards >>> JB >>> Le 24 déc. 2020 à 14:52, michael e a écrit : No it is a last fresh download version ok Karaf (4.3.0) did you try with camel MDC properties ? And no permission issues. Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 14:42 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 By the way, you don’t have any permission issue ? > Le 24 déc. 2020 à 14:42, JB Onofré a écrit : > > > Do you use karaf vanilla or a custom distribution ? > > I confirm that it works fine for me on Karaf vanilla (at least on Linux). > > Regards > JB > >> Le 24 déc. 2020 à 14:02, michael e a écrit : >> >> >> I also add the absolute path i also get exception >> >> my configuration: >> >> # Sift - MDC routing >> log4j2.appender.routing.type = Routing >> log4j2.appender.routing.name = Routing >> log4j2.appender.routing.routes.type = Routes >> log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} >> log4j2.appender.routing.routes.bundle.type = Route >> log4j2.appender.routing.routes.bundle.appender.type = >> RollingRandomAccessFile >> log4j2.appender.routing.routes.bundle.appender.name = >> Bundle-\$\\\{ctx:bundle.name\} >> log4j2.appender.routing.routes.bundle.appender.fileName = >> D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log >> log4j2.appender.routing.routes.bundle.appender.filePattern = >> ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i >> log4j2.appender.routing.routes.bundle.appender.append = true >> log4j2.appender.routing.routes.bundle.appender.layout.type = >> PatternLayout >> log4j2.appender.routing.routes.bundle.appender.layout.pattern = >> ${log4j2.pattern} >> log4j2.appender.routing.routes.bundle.appender.policies.type = Policies >> log4j2.appender.routing.routes.bundle.appender.policies.size.type = >> SizeBasedTriggeringPolicy >> log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB >> >> Exception: >> >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access >> RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de >> répertoire ou de volume est incorrecte >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not >> create plugin of type class >> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender >> for element RollingRandomAccessFile: java.lang.IllegalStateException: >> ManagerFactory >> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] >> unable to create manager for >> [D:/karaf/apache-karaf-4.3.0/data/log/bundle-${ctx:camel.contextId}.log] >> with data >> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@3219c6e6] >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to >> invoke factory method in class >> org.apache.logging.log4j.core.appender.RollingRandomA
RE: Configuring MDC logging karaf 4 camel 3.7.0
Hello JB, Happy new year, any news about this ? Thanks, Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 17:00 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 I would consider as a big if I have the error on Windows. I’m suspecting an issue on Windows only (I hate this os ;) ). Let me setup a vm (just need time). Regard JB Le 24 déc. 2020 à 16:36, michael e a écrit : Ok thanks so is a bug ? Or i just have to change something ? (This is the provided configuration i didn't change anythin expect fileName pattern) Regards, Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 16:23 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Understood. I don’t have any error. The error you have seems related to the rolling file configuration. Regards JB Le 24 déc. 2020 à 15:16, michael e a écrit : Ok thanks 'All log files are created and populated' for me also just then in the karaf i see ERROR logs Thanks, Regards, Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 15:05 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Yeah. I tried with the karaf camel examples. All log files are created and populated. I will bootstrap a Windows vm to test. Regards JB Le 24 déc. 2020 à 14:52, michael e a écrit : No it is a last fresh download version ok Karaf (4.3.0) did you try with camel MDC properties ? And no permission issues. Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 14:42 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 By the way, you don’t have any permission issue ? Le 24 déc. 2020 à 14:42, JB Onofré a écrit : Do you use karaf vanilla or a custom distribution ? I confirm that it works fine for me on Karaf vanilla (at least on Linux). Regards JB Le 24 déc. 2020 à 14:02, michael e a écrit : I also add the absolute path i also get exception my configuration: # Sift - MDC routing log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB Exception: org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] unable to create manager for [D:/karaf/apache-karaf-4.3.0/data/log/bundle-${ctx:camel.contextId}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@3219c6e6] org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create Appender of type RollingRandomAccessFile Regards, Michael. De : Jean-Baptiste Onofre Envoyé : jeudi 24 décembre 2020 07:13 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi, I just tested the configuration I provided in etc/org.ops4j.pax.logging.cfg. Here’s my config (in etc/org.ops4j.pax.logging.cfg): First, I’ve enabled sift appender: log4j2.rootLogger.appenderRef.Sift.ref = Routing Then, I added the appender: log4j2.appender.routing.typ
Re: Bundle restart on feature install with wrong order
Yes, I think the problem is in pax-jdbc-config or pax-jdbc-core bundles. Probably an optional or range here. Let me take a look. By the way, I will share on the mailing list (and blog) soon: 1. The new option to disable auto refresh on the current features service 2. The new "simple" features service (optional) Regards JB > Le 6 janv. 2021 à 09:46, Andre Schlegel-Tylla a > écrit : > > Hi JB, > > thank you for the fast response. > > It's not only the pax-jdbc-sqlite feature. We have faced this issue with all > tested pax-jdbc-* features. At least oracle, mysql, postgresql and derby. > > Regards > Andre > > Am Mi., 6. Jan. 2021 um 07:51 Uhr schrieb Jean-Baptiste Onofre > mailto:j...@nanthrax.net>>: > Hi > > According to the resolver output, it seems you install a new jetty version, > causing refresh of jetty.security, cascading refresh of CXF and your bundles. > > The start level doesn’t matter here: whatever the start level is, you will > have the refresh happening. > > The refresh can be caused: > > 1. By an optional import > 2. By a "bad" import range > > I will check pax-jdbc-sqlite feature and bundles to see the optional import > and the range. > > Anyway, just to let you know that I’ve worked on a new features service to > avoid this case (automatic cascading refresh) and Karaf5 extension > (alternative to features) will not cause this kind of refresh. > > Regards > JB > >> Le 6 janv. 2021 à 06:37, Andre Schlegel-Tylla >> mailto:andre.schlegel-ty...@virtimo.de>> a >> écrit : >> >> Hello, >> >> we have noticed when switching from Karaf 4.0.10 to 4.2.8 that when >> installing PAX JDBC features, significantly more bundles are restarted. This >> causes problems for us because our bundles are also restarted and then an >> error occurs because the CXF is not yet available. >> >> 1) Why are now significantly more bundles restarted? >> 2) Shouldn't the start level of the bundles prevent the problem at that >> point? >> 3) Do we need to specify the dependency on CXF differently? >> >> Here for comparison: >> >> Karaf 4.0.10 >> virtimo@bpc()> feature:install -v pax-jdbc-sqlite >> Adding features: pax-jdbc-sqlite/[1.0.1,1.0.1] >> Changes to perform: >> Region: root >> Bundles to install: >> mvn:org.ops4j.pax.jdbc/pax-jdbc-sqlite/1.0.1 >> mvn:org.xerial/sqlite-jdbc/3.16.1 >> Installing bundles: >> mvn:org.ops4j.pax.jdbc/pax-jdbc-sqlite/1.0.1 >> mvn:org.xerial/sqlite-jdbc/3.16.1 >> Starting bundles: >> org.xerial.sqlite-jdbc/3.16.1 >> org.ops4j.pax.jdbc.sqlite/1.0.1 >> Done. >> >> Karaf 4.2.8 >> >> virtimo@bpc()> feature:install -v pax-jdbc-sqlite >> Adding features: pax-jdbc-sqlite/[1.4.4,1.4.4] >> Changes to perform: >> Region: root >> Bundles to install: >> mvn:org.ops4j.pax.jdbc/pax-jdbc-sqlite/1.4.4 >> mvn:org.xerial/sqlite-jdbc/3.28.0 >> Stopping bundles: >> de.virtimo.bpc-be-analysis/4.0.0.SNAPSHOT >> de.virtimo.bpc-be-core/4.0.0.SNAPSHOT >> org.apache.cxf.karaf.cxf-karaf-commands/3.3.5 >> org.apache.cxf.cxf-rt-wsdl/3.3.5 >> org.apache.cxf.cxf-rt-ws-security/3.3.5 >> org.apache.cxf.cxf-rt-ws-rm/3.3.5 >> org.apache.cxf.cxf-rt-ws-policy/3.3.5 >> org.apache.cxf.cxf-rt-ws-mex/3.3.5 >> org.apache.cxf.cxf-rt-ws-addr/3.3.5 >> org.apache.cxf.cxf-rt-transports-udp/3.3.5 >> org.apache.cxf.cxf-rt-transports-local/3.3.5 >> org.apache.cxf.cxf-rt-transports-jms/3.3.5 >> org.apache.cxf.cxf-rt-transports-http-jetty/3.3.5 >> org.apache.cxf.cxf-rt-security-saml/3.3.5 >> org.apache.cxf.cxf-rt-security/3.3.5 >> org.apache.cxf.cxf-rt-rs-service-description/3.3.5 >> org.apache.cxf.cxf-rt-rs-json-basic/3.3.5 >> org.apache.cxf.cxf-rt-rs-extension-search/3.3.5 >> org.apache.cxf.cxf-rt-rs-extension-providers/3.3.5 >> org.apache.cxf.cxf-rt-rs-client/3.3.5 >> org.apache.cxf.cxf-rt-management/3.3.5 >> org.apache.cxf.cxf-rt-javascript/3.3.5 >> org.apache.cxf.cxf-rt-frontend-simple/3.3.5 >> org.apache.cxf.cxf-rt-frontend-js/3.3.5 >> org.apache.cxf.cxf-rt-frontend-jaxws/3.3.5 >> org.apache.cxf.cxf-rt-frontend-jaxrs/3.3.5 >> org.apache.cxf.cxf-rt-features-throttling/3.3.5 >> org.apache.cxf.cxf-rt-features-metrics/3.3.5 >> org.apache.cxf.cxf-rt-features-logging/3.3.5 >> org.apache.cxf.cxf-rt-features-clustering/3.3.5 >> org.apache.cxf.cxf-rt-databinding-jaxb/3.3.5 >> org.apache.cxf.cxf-rt-databinding-aegis/3.3.5 >> org.apache.cxf.cxf-rt-bindings-xml/3.3.5 >> org.apache.cxf.cxf-rt-bindings-soap/3.3.5 >> org.apache.cxf.cxf-rt-bindings-corba/3.3.5 >> org.apache.cxf.cxf-rt-bindings-coloc/3.3.5 >> org.apache.cxf.cxf-core/3.3.5 >> org.apache.cxf.cxf-rt-transports-http/3.3.5 >> org.ops4j.pax.web.pax-web-jetty/7.2.14 >> org.eclipse.jetty.websocket.server/9.4.22.v20191022 >> org.eclipse.jetty.websocket.javax.websocket.server/9.4.22.v20191022 >> org.eclipse.jetty.websocket.javax.websocket/9.4.22.v20191022 >> org.eclipse.jetty.websocket.client/9.4.22.v20191022 >> org.eclipse.jetty.w
Re: Bundle restart on feature install with wrong order
Hi JB, thank you for the fast response. It's not only the pax-jdbc-sqlite feature. We have faced this issue with all tested pax-jdbc-* features. At least oracle, mysql, postgresql and derby. Regards Andre Am Mi., 6. Jan. 2021 um 07:51 Uhr schrieb Jean-Baptiste Onofre < j...@nanthrax.net>: > Hi > > According to the resolver output, it seems you install a new jetty > version, causing refresh of jetty.security, cascading refresh of CXF and > your bundles. > > The start level doesn’t matter here: whatever the start level is, you will > have the refresh happening. > > The refresh can be caused: > > 1. By an optional import > 2. By a "bad" import range > > I will check pax-jdbc-sqlite feature and bundles to see the optional > import and the range. > > Anyway, just to let you know that I’ve worked on a new features service to > avoid this case (automatic cascading refresh) and Karaf5 extension > (alternative to features) will not cause this kind of refresh. > > Regards > JB > > Le 6 janv. 2021 à 06:37, Andre Schlegel-Tylla < > andre.schlegel-ty...@virtimo.de> a écrit : > > Hello, > > we have noticed when switching from Karaf 4.0.10 to 4.2.8 that when > installing PAX JDBC features, significantly more bundles are restarted. > This causes problems for us because our bundles are also restarted and then > an error occurs because the CXF is not yet available. > > 1) Why are now significantly more bundles restarted? > 2) Shouldn't the start level of the bundles prevent the problem at that > point? > 3) Do we need to specify the dependency on CXF differently? > > Here for comparison: > > Karaf 4.0.10 > >> virtimo@bpc()> feature:install -v pax-jdbc-sqlite >> Adding features: pax-jdbc-sqlite/[1.0.1,1.0.1] >> Changes to perform: >> Region: root >> Bundles to install: >> mvn:org.ops4j.pax.jdbc/pax-jdbc-sqlite/1.0.1 >> mvn:org.xerial/sqlite-jdbc/3.16.1 >> Installing bundles: >> mvn:org.ops4j.pax.jdbc/pax-jdbc-sqlite/1.0.1 >> mvn:org.xerial/sqlite-jdbc/3.16.1 >> Starting bundles: >> org.xerial.sqlite-jdbc/3.16.1 >> org.ops4j.pax.jdbc.sqlite/1.0.1 >> Done. > > > Karaf 4.2.8 > > virtimo@bpc()> feature:install -v pax-jdbc-sqlite >> Adding features: pax-jdbc-sqlite/[1.4.4,1.4.4] >> Changes to perform: >> Region: root >> Bundles to install: >> mvn:org.ops4j.pax.jdbc/pax-jdbc-sqlite/1.4.4 >> mvn:org.xerial/sqlite-jdbc/3.28.0 >> Stopping bundles: >> de.virtimo.bpc-be-analysis/4.0.0.SNAPSHOT >> de.virtimo.bpc-be-core/4.0.0.SNAPSHOT >> org.apache.cxf.karaf.cxf-karaf-commands/3.3.5 >> org.apache.cxf.cxf-rt-wsdl/3.3.5 >> org.apache.cxf.cxf-rt-ws-security/3.3.5 >> org.apache.cxf.cxf-rt-ws-rm/3.3.5 >> org.apache.cxf.cxf-rt-ws-policy/3.3.5 >> org.apache.cxf.cxf-rt-ws-mex/3.3.5 >> org.apache.cxf.cxf-rt-ws-addr/3.3.5 >> org.apache.cxf.cxf-rt-transports-udp/3.3.5 >> org.apache.cxf.cxf-rt-transports-local/3.3.5 >> org.apache.cxf.cxf-rt-transports-jms/3.3.5 >> org.apache.cxf.cxf-rt-transports-http-jetty/3.3.5 >> org.apache.cxf.cxf-rt-security-saml/3.3.5 >> org.apache.cxf.cxf-rt-security/3.3.5 >> org.apache.cxf.cxf-rt-rs-service-description/3.3.5 >> org.apache.cxf.cxf-rt-rs-json-basic/3.3.5 >> org.apache.cxf.cxf-rt-rs-extension-search/3.3.5 >> org.apache.cxf.cxf-rt-rs-extension-providers/3.3.5 >> org.apache.cxf.cxf-rt-rs-client/3.3.5 >> org.apache.cxf.cxf-rt-management/3.3.5 >> org.apache.cxf.cxf-rt-javascript/3.3.5 >> org.apache.cxf.cxf-rt-frontend-simple/3.3.5 >> org.apache.cxf.cxf-rt-frontend-js/3.3.5 >> org.apache.cxf.cxf-rt-frontend-jaxws/3.3.5 >> org.apache.cxf.cxf-rt-frontend-jaxrs/3.3.5 >> org.apache.cxf.cxf-rt-features-throttling/3.3.5 >> org.apache.cxf.cxf-rt-features-metrics/3.3.5 >> org.apache.cxf.cxf-rt-features-logging/3.3.5 >> org.apache.cxf.cxf-rt-features-clustering/3.3.5 >> org.apache.cxf.cxf-rt-databinding-jaxb/3.3.5 >> org.apache.cxf.cxf-rt-databinding-aegis/3.3.5 >> org.apache.cxf.cxf-rt-bindings-xml/3.3.5 >> org.apache.cxf.cxf-rt-bindings-soap/3.3.5 >> org.apache.cxf.cxf-rt-bindings-corba/3.3.5 >> org.apache.cxf.cxf-rt-bindings-coloc/3.3.5 >> org.apache.cxf.cxf-core/3.3.5 >> org.apache.cxf.cxf-rt-transports-http/3.3.5 >> org.ops4j.pax.web.pax-web-jetty/7.2.14 >> org.eclipse.jetty.websocket.server/9.4.22.v20191022 >> org.eclipse.jetty.websocket.javax.websocket.server/9.4.22.v20191022 >> org.eclipse.jetty.websocket.javax.websocket/9.4.22.v20191022 >> org.eclipse.jetty.websocket.client/9.4.22.v20191022 >> org.eclipse.jetty.webapp/9.4.22.v20191022 >> org.eclipse.jetty.servlets/9.4.22.v20191022 >> org.eclipse.jetty.servlet/9.4.22.v20191022 >> org.eclipse.jetty.server/9.4.22.v20191022 >> org.eclipse.jetty.security.jaspi/9.4.22.v20191022 >> org.eclipse.jetty.security/9.4.22.v20191022 >> org.eclipse.jetty.rewrite/9.4.22.v20191022 >> org.eclipse.jetty.proxy/9.4.22.v20191022 >> org.eclipse.jetty.plus/9.4.22.v20191022 >> org.eclipse.jetty.jndi/9.4.22.v20191022 >> org.eclipse.jetty