Debugging is a very helpful process to identify why some issue/error happened. We need to get detailed messages that can help us trace through to the cause of an issue. In some software, we can adjust logging levels to capture different types of messages for different loggers.
Starting in Eclipse V3.0 and further releases developers chose Open Services Gateway Initiative (OSGi) to replace the rickety Eclipse plug-in technology found in earlier versions.
Architecture changes made in TIBCO BusinessWorks 6 is that it is OSGi-based. The OSGi console helps us monitor the application during deployment and gives us a clear picture of what is happening with the deployed application.
Problem
During our investigation of certain issues that may appear on BW6 applications, we tried to debug them directly on the domain/app node where the application is deployed.
Implementation
Here is the process that we follow to enable/disable debugging in one BW6 application with OSGi Console on a UNIX machine.
- Log in with your UNIX credentials and sudo as TIBCO to the machine where the application is deployed
Ex: localhost
- Navigate to the BW6 bin folder
Ex: [user@localhost bin]$ cd /opt/tibco/bw6/bw/6.3/bin/
- Enter to the BusinessWorks Administration Console
Ex: [user@localhost bin]$ ./bwadmin –propFile /opt/tibco/config/bw6/test/bwadmin/bwadmin.tra
- Enter in the domain
Ex: bwadmin[admin]> cd TESTDOMAIN
- Enter in the appspace where application is deployed
Ex: bwadmin[admin@TESTDOMAIN]> cd TESTDOMAIN-AppSpace-TEST
- Enabling the OSGi Console
Ex: bwadmin[admin@TESTDOMAIN/TESTDOMAIN-AppSpace-TEST]> enableconsole -n TESTDOMAIN-AppNode-TEST localhost 9060
NOTE: Once the console is enabled you should see the following message “TIBCO-BW-ADMIN-CLI-300304: Console enabled for AppNode [TESTDOMAIN-AppNode-TEST] in Domain [TESTDOMAIN].”
- Use the telnet command to access the OSGi console:
Ex: [user@localhost]$ telnet localhost 9060
admin@TESTDOMAIN-AppNode-TEST> help
bw:dsr
bw:laes
bw:lais
bw:lapi
bw:lapic
bw:las
bw:lat
bw:le
bw:lec
bw:lendpoints
bw:les
bw:lfpic
bw:lpes
bw:lpis
bw:lr
bw:lrhandlers
bw:lrproxies
bw:lsel
bw:ltpic
bw:startaesc
bw:startpesc
bw:startpisc
bw:stopaesc
bw:stoppesc
bw:stoppisc
bwadmin:install
bwadmin:restart
bwadmin:shutdown
bwadmin:uninstall
bwadmin:version
On the following link: https://docs.tibco.com/pub/activematrix_businessworks/6.2.2/doc/html/GUID-4AC8019F-701F-48BD-BC44-2A293E4C3796.html, you can find a description for all commands and what kind of information you can get for the application/appnode.
Use the disconnect command to gracefully quit the telnet session, and leave the OSGi port open for reentry. Use the telnet stop command to close the connection after the debugging session is complete.