How to enable osgi bundle resolver tracing

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How to enable osgi bundle resolver tracing

ntle
This post was updated on .
Hello,

I;m using karaf 4.2.6 with equinox, 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
Reply | Threaded
Open this post in threaded view
|

RE: How to enable osgi bundle resolver tracing

AoteaSteve
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: How to enable osgi bundle resolver tracing

jbonofre
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, [hidden email] 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 <[hidden email]>
> Sent: Thursday, 13 June 2019 1:25 PM
> To: [hidden email]
> 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é
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: How to enable osgi bundle resolver tracing

ntle
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
Reply | Threaded
Open this post in threaded view
|

Re: How to enable osgi bundle resolver tracing

jbonofre
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é
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: How to enable osgi bundle resolver tracing

ntle
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
Reply | Threaded
Open this post in threaded view
|

Re: How to enable osgi bundle resolver tracing

jbonofre
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é
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: How to enable osgi bundle resolver tracing

ntle
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