Enabling the OSGi Console for an AppNode

The enableconsole command dynamically enables the OSGi console on the given port for a running AppNode. Advanced users can telnet to the port and execute native OSGi commands to get information about an AppNode's status. This is useful when collecting diagnostic data remotely. By default, the OSGi port is closed.

Note: Although an AppNode can be created with OSGi port details specified, this is not recommended. Keeping this port open when the console is not in use poses a security risk.

The enableconsole command can only be executed against a running AppNode. It should be issued from the bwadmin interactive mode, not from the command line.

Prerequisites

The following names are used in the following steps.

  • MyDomain is the domain name.
  • MyAppSpace is the AppSpace name.
  • MyAppNode is the AppNode name. It is running on the host JSMITH-W520.
  • The OSGi console port is defined as 9060.

Procedure

  1. In a terminal, navigate to BW_HOME\bin and type bwadmin.
  2. Go to MyDomain.
    bwadmin[admin]> cd MyDomain
  3. Go to MyAppSpace.
    bwadmin[admin@MyDomain]> cd MyAppSpace
  4. Start the AppNode, if it is not already running:
    bwamdin[admin@MyDomain/MyAppSpace]> start appnode MyAppNode
  5. Run the enableconsole command, passing the host and OSGi port number. For example:
    bwamdin[admin@MyDomain/MyAppSpace]> enableconsole -n MyAppNode JSMITH-W520 9060
    TIBCO-BW-ADMIN-CLI-300304: Console enabled for AppNode [MyAppNode] in Domain [MyDomain]

Result

Use the telnet command to access the OSGi console where you can run commands to get information about running AppNodes and applications.

telnet JSMITH-W520 9060
admin@MyAppNode> 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
Note: Some of the statistics retrieval commands such as laes, lpes, lpis, and lais require statistics activation commands (startaesc, startpesc, startpisc) to be executed first.

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.

Note: Do not use the exit command as this will shut down the AppNode.