[ 
https://issues.apache.org/jira/browse/FELIX-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15658927#comment-15658927
 ] 

Alexander Klimetschek edited comment on FELIX-5410 at 11/12/16 3:45 AM:
------------------------------------------------------------------------

Attached ([^FELIX-5410.patch]) is a first version I threw together quickly, for 
bundles only, and that still needs some work to look nicer and handle more 
cases.

My focus was on an intuitive understanding - so I am deliberately using 
easy-to-understand language like "dependency too old" instead of the rather 
complex logging of the osgi.wiring.package BundleException (which many folks 
have a hard time parsing and understanding).

In this patch:
* new "Troubleshoot" plugin at {{/system/console/troubleshoot}} in the OSGi 
category
* looks at package imports only so far
* shows red error for imports where the version mismatches (with "too new" / 
"too old" hints)
* shows red error for imports with no bundle exporting them
* shows a note if a depending bundle is inactive (but otherwise import is 
satisfied)

Todo:
* ensure the sources (of the "error graph") are shown at the top - it seems to 
be implicitly the case in my tests due to the lower dependencies having lower 
bundle ids and thus coming first in the list, but I am not sure if that is 
always true
* require bundle directive
* better UI layout
* separate out "notes" into a separate, collapsed by default section, to focus 
on the real errors
* services/components

Screenshot:
!webconsole-troubleshoot.png|width=600!


was (Author: alexander.klimetschek):
Attached ([^FELIX-5410.patch]) is a first version I threw together quickly, for 
bundles only, and that still needs some work to look nicer and handle more 
cases.

My focus was on an intuitive understanding - so I am deliberately using 
easy-to-understand language like "dependency too old" instead of the rather 
complex logging of the osgi.wiring.package BundleException (which many folks 
have a hard time parsing and understanding).

In this patch:
* new "Troubleshoot" plugin at {{/system/console/troubleshoot}} in the OSGi 
category
* looks at package imports only so far
* shows red error for imports where the version mismatches (with "too new" / 
"too old" hints)
* shows red error for imports with no bundle exporting them
* shows a note if a depending bundle is inactive (but otherwise import is 
satisfied)

Todo:
* ensure the sources (of the "error graph") are shown at the top - it seems to 
be implicitly the case in my tests due to the lower dependencies having lower 
bundle ids and thus coming first in the list, but I am not sure if that is 
always true
* require bundle directive
* better UI layout
* separate out "notes" into a separate, collapsed by default section, to focus 
on the real errors
* services/components

Screenshot:
!webconsole-troubleshoot.png|thumbnail!

> Web console plugin for troubleshooting wiring issues
> ----------------------------------------------------
>
>                 Key: FELIX-5410
>                 URL: https://issues.apache.org/jira/browse/FELIX-5410
>             Project: Felix
>          Issue Type: New Feature
>          Components: Web Console
>            Reporter: Alexander Klimetschek
>         Attachments: FELIX-5410.patch, webconsole-troubleshoot.png
>
>
> h4. Feature
> Add a new view/plugin to the standard webconsole that helps to pin point 
> which bundles, services or components are the true source for inactive 
> bundles or services.
> * For *bundles* the underlying assumption would be a healthy system with all 
> bundles active, and thus any inactive can be shown and analyzed as being 
> problematic.
> * For *services/components* one can look at inactive _immediate_ services 
> that fail because of unsatisfied references. For others, the user might need 
> to enter the "problematic" service or component they expect to be running to 
> start the analysis.
> h4. Motivation
> In a larger OSGi application with many bundles and components, it can be 
> difficult to find out the root cause why certain bundles do not start or why 
> a service is not active, especially for folks new to OSGi or with limited 
> knowledge about the application. I have seen many people fail, and thus "not 
> like" OSGi because of such hurdles during development, where it is easy to 
> update on bundle but miss out on crucial dependencies.
> Figuring out is possible through the current web console, but only for 
> experts, if you click through the bundle or service details. This is usually 
> tedious work, if for example a lower level bundle is the problem, and 200 
> others are not active because of it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to