You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by ntle <nt...@castortech.com> on 2019/06/13 01:25:08 UTC

How to enable osgi bundle resolver tracing

Hello,

I;m using karaf 4.2.6, installing my feature (contains a few hundreds
bundles) is fine but when i start my feature, karaf never finish. I suspect
something wrong with the bundle resolution so i want to see how karaf
resolve bundle dependencies. Is there a setting in org.ops4j.pax.logging.cfg
for this? 

Thai Le



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: How to enable osgi bundle resolver tracing

Posted by ntle <nt...@castortech.com>.
Hi guys,

After fixing some dependencies issue in my bundles (base on the errors i got
from the log) I am now back to a state where starting my feature never
finish but i got no error in the log or console. Many bundles in my feature
are in Starting state but bundle:diag does not show why they are not
started. Is there some other log config i can use to see what is happening?

Thai



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: How to enable osgi bundle resolver tracing

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Yes, just add org.apache.karaf.kar logger.

Regards
JB

On 13/06/2019 17:06, ntle wrote:
> Thanks JB,
> 
> I see the logger for features now. Is there a logger for kar installer?
> 
> Thai
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: How to enable osgi bundle resolver tracing

Posted by ntle <nt...@castortech.com>.
Thanks JB,

I see the logger for features now. Is there a logger for kar installer?

Thai



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: How to enable osgi bundle resolver tracing

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Sorry, the logger name is org.apache.karaf.features.

See the configuration:

# Feature logger
log4j2.logger.kfeature.name=org.apache.karaf.features
log4j2.logger.kfeature.level=TRACE

Regards
JB

On 13/06/2019 16:48, ntle wrote:
> Thanks guys
> 
> In addition to the block Steve gave, I tried this per JB:
> 
> log4j2.logger.karaf-feature.name = org.apache.karaf.feature
> log4j2.logger.karaf-feature.level = TRACE
> 
> But when i list logger, i only see:
> karaf@root()> log:list
> Logger                    | Level
> --------------------------+---------------------------
> ROOT                      | TRACE, out, stdout, osgi:*
> audit                     | TRACE
> org.apache.aries.spifly   | WARN
> org.apache.sshd           | INFO
> org.ops4j.pax.url.mvn     | TRACE
> shaded.org.eclipse.aether | TRACE
> 
> Anyway, even the karaf.feature logger is not shown, when i install my
> feature , i see exception from the resolver now on the console.
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: How to enable osgi bundle resolver tracing

Posted by ntle <nt...@castortech.com>.
Thanks guys

In addition to the block Steve gave, I tried this per JB:

log4j2.logger.karaf-feature.name = org.apache.karaf.feature
log4j2.logger.karaf-feature.level = TRACE

But when i list logger, i only see:
karaf@root()> log:list
Logger                    | Level
--------------------------+---------------------------
ROOT                      | TRACE, out, stdout, osgi:*
audit                     | TRACE
org.apache.aries.spifly   | WARN
org.apache.sshd           | INFO
org.ops4j.pax.url.mvn     | TRACE
shaded.org.eclipse.aether | TRACE

Anyway, even the karaf.feature logger is not shown, when i install my
feature , i see exception from the resolver now on the console.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: How to enable osgi bundle resolver tracing

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

It will log the artifacts resolution (download). I would also add
org.apache.karaf.feature logger to have some details about the resolver.

It will provide log messages similar to what we have with
feature:install -t -v.

Regards
JB

On 13/06/2019 05:50, steve.g.chapman@gmail.com wrote:
> I was given the following log settings in the past from JB - this caused
> enough log noise to see what it happening in the background:
> 
> In etc/org.ops4j.pax.logging.cfg, you can enable trace on Pax URL and
> Aether:
> 
> log4j2.logger.aether.name = shaded.org.eclipse.aether 
> log4j2.logger.aether.level = TRACE 
> log4j2.logger.http-headers.name = shaded.org.apache.http.headers 
> log4j2.logger.http-headers.level = DEBUG 
> log4j2.logger.maven.name = org.ops4j.pax.url.mvn 
> log4j2.logger.maven.level = TRACE
> 
> -----Original Message-----
> From: ntle <nt...@castortech.com> 
> Sent: Thursday, 13 June 2019 1:25 PM
> To: user@karaf.apache.org
> Subject: How to enable osgi bundle resolver tracing
> 
> Hello,
> 
> I;m using karaf 4.2.6, installing my feature (contains a few hundreds
> bundles) is fine but when i start my feature, karaf never finish. I suspect
> something wrong with the bundle resolution so i want to see how karaf
> resolve bundle dependencies. Is there a setting in org.ops4j.pax.logging.cfg
> for this? 
> 
> Thai Le
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

RE: How to enable osgi bundle resolver tracing

Posted by st...@gmail.com.
I was given the following log settings in the past from JB - this caused
enough log noise to see what it happening in the background:

In etc/org.ops4j.pax.logging.cfg, you can enable trace on Pax URL and
Aether:

log4j2.logger.aether.name = shaded.org.eclipse.aether 
log4j2.logger.aether.level = TRACE 
log4j2.logger.http-headers.name = shaded.org.apache.http.headers 
log4j2.logger.http-headers.level = DEBUG 
log4j2.logger.maven.name = org.ops4j.pax.url.mvn 
log4j2.logger.maven.level = TRACE

-----Original Message-----
From: ntle <nt...@castortech.com> 
Sent: Thursday, 13 June 2019 1:25 PM
To: user@karaf.apache.org
Subject: How to enable osgi bundle resolver tracing

Hello,

I;m using karaf 4.2.6, installing my feature (contains a few hundreds
bundles) is fine but when i start my feature, karaf never finish. I suspect
something wrong with the bundle resolution so i want to see how karaf
resolve bundle dependencies. Is there a setting in org.ops4j.pax.logging.cfg
for this? 

Thai Le



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html