Open StreamBase JMX port for VisualVM

Open StreamBase JMX port for VisualVM

book

Article ID: KB0083641

calendar_today

Updated On:

Products Versions
TIBCO Streaming 7.6 and later including 10.x

Description

Java VisualVM (jvisualvm) is a graphical utility for viewing information about Java applications running in a Java Virtual Machine (JVM). It plots memory use, CPU use, garbage collection, and other parameters in real-time. It reports on static configuration (system properties) and can generate thread and Heap dumps on demand.

These reports are often useful for performance tuning and troubleshooting.

Issue/Introduction

How to open a specific TCP port for JMX connections to the StreamBase Java VM.

Resolution

The jvisualvm command is included in Java JDK included in the StreamBase install, under {StreamBase_Home}/jdk/bin and will be on your PATH if running from the StreamBase Command Prompt.

In most cases the running StreamBase Java process on the local system is automatically discovered when jvisualvm is launched, but sometimes the process and JMX port (if any) is not automatically discovered.

To configure a specific JMX port for your StreamBase server, add these Java system-property settings to the configuration:
-Dcom.sun.management.jmxremote.port=3333 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false
(You may use any unused port number, but we'll use 3333 for illustration.)

For StreamBase 7.x, add these to the sbd.sbconf, jvm-args parameter:
  <java-vm>
    <param name="jvm-args" value="            
      -Dcom.sun.management.jmxremote.port=3333 
      -Dcom.sun.management.jmxremote.ssl=false 
      -Dcom.sun.management.jmxremote.authenticate=false
    "/>
  </java-vm>
Add these settings in addition to any other arguments, separated by spaces.

The Java process will be called "sbd-java".

For StreamBase 10, the Java process will be called "DtmEngine".
In engine.conf (type = "com.tibco.ep.ldm.configuration.ldmengine") add:
jvmArgs =
  [
      "-Dcom.sun.management.jmxremote.port=3333"
      "-Dcom.sun.management.jmxremote.ssl=false"
      "-Dcom.sun.management.jmxremote.authenticate=false"
  ]
Add these settings in addition to any other arguments, separated by spaces and delimited by quotes.

When jvisualvm is started, manually add the JMX connection "localhost:3333" after starting StreamBase or Live Datamart. Then connect to it. This connection will be remembered for future sessions.

Additional Information

VisualVM - http://visualvm.java.net/releases.html