How to detect bundle starts faliure(WSO2 Carbon) and how to fix it simply

WSO2 Carbon is based on set of OSGI bundles. when server starts those bundles must starts. But in some cases those may not start due to some reason. In most of issues we ask people to check weather bundles started or not. here i will briefly describe how to detect bundle start  failure and how to fix it without having any previous knowledge about osgi(I'm also not expert in osgi)Most of cases bundles will not start automatically may be they depend on some other bundle that did not started successfully or they may not included in bundledef file.we will see how to detect it

01.start wso2server in diagnose mode with osgi console by typing following  command in the command line
 sh wso2server.sh -DosgiConsole

you can get all osgi bundles information by typing ss in command line so you will be able to view bundles infomation

check weather your bundles state in order to use it, it must be activated.In cases it installed only we can start them manually by typing start command


if you see dependency or not listed in bundles list you have to manually add them to bundleinfo file.

in this case you can see we cant start this bundle because it depend on some other bundle that not listed so we have to manually add them to bundleinfo file.
Now you can see where is the root of error and we can fix it now

you can see file inside this filder

wso2stratos-manager-1.1.0-SNAPSHOT/repository/components/configuration/org.eclipse.equinox.simpleconfigurator/bunldles.info
This file contains all bundles that should be started


org.wso2.carbon.tenant.reg.agent.client,1.1.0.SNAPSHOT,plugins/org.wso2.carbon.tenant.reg.agent.client-1.1.0.SNAPSHOT.jar,4,true
org.wso2.carbon.tenant.reg.agent.service,1.1.0.SNAPSHOT,plugins/org.wso2.carbon.tenant.reg.agent.service-1.1.0.SNAPSHOT.jar,4,true
org.wso2.carbon.tenant.register.stub,3.2.0.SNAPSHOT,plugins/org.wso2.carbon.tenant.register.stub-3.2.0.SNAPSHOT.jar,4,true


so we will add new bundle that need to start as follows and put corressponding jar file in to repositary/components/pluggings folder

then you can start server again and you can check weather bundles started or not

No comments:

Post a Comment

Empowering the Future of API Management: Unveiling the Journey of WSO2 API Platform for Kubernetes (APK) Project and the Anticipated Alpha Release

  Introduction In the ever-evolving realm of API management, our journey embarked on the APK project eight months ago, and now, with great a...