Monitoring Liberty in Bluemix with JConsole

Share this post:

To monitor the Bluemix Liberty runtime with JConsole, you must complete the following steps:

  1. Push your application within a server package containing an appropriate server.xml.
  2. Start the JConsole application with the appropriate system properties on the command line.
  3. Provide the proper Remote Process url, Username, and Password to JConsole.

Here is more detail on each of the above steps.

1. Push the server package containing your application limiting it to a single instance.  This is the default (-i=1).  Your server.xml must contain the monitor-1.0 and restConnector-1.0 features.  It also must contain a basicRegistry element and administrator-role element as shown below:

<user name="jconuser" password="jconpassw0rd"/>
NOTE: The password should be encoded with the securityUtility tool provided with Liberty.

2.  JConsole is included with your java installation.  Go to <java-home>/bin (java 1.7 or higher) and run this command:
jconsole -J-Djava.class.path=<java-home>/lib/jconsole.jar;<liberty-home>/wlp/clients/restConnector.jar

The truststore parameters will take the following defaults that should work in most cases:<java-home>/jre/lib/security/cacerts
Specify appropriate truststore parameters if necessary.

3. Fill in the Remote Process field with this url:  service:jmx:rest://<appName>  Also fill in the Username and Password fields with an administrator-role role user and password from the server.xml.  Click Connect.

The connection should succeed and JConsole will start monitoring.


If your connection fails, you can produce logs to help diagnose the problem.  First, try collecting client side trace by adding this to the jconsole command: -J-Djava.util.logging.config.file=c:/tmp/

Here is a sample file:
handlers= java.util.logging.FileHandler
java.util.logging.FileHandler.pattern = /tmp/jmxtrace.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter

You can also add this to the jconsole comand:, which will produce SSL diagnostic tracing in a separate JConsole output window.  Lastly, you can enable tracing on the server side by adding this to your server.xml: <logging traceSpecification="*=all"/>

Add Comment

Leave a Reply

Your email address will not be published.Required fields are marked *


Hi Chris, great article… but I can’t access this service in my Liberty Server on Bluemix. I always get the same error:

mar 01, 2016 9:38:35 AM loadJMXServerInfo
GRAVE: CWWKX0203E: O cliente REST do Java Management Extensions do WebSphere recebeu um código de resposta 404 inesperado com a mensagem ‘Not Found’ a partir do servidor para a URL na conexão




Thanks for this great article. This really helps.

Wanted to ask you, if there is a JMX endpoint exposed by Bluemix platform using which the performance of all the individual infrastructure components of the Bluemix platform such as the Cloud Controller, HAA etc could be monitored using JConsole or JMX ?

More How-tos stories

IBM Cloud and VMware Resiliency: Your Cloud for Business

Raising IT to Today’s Business Challenges In business there has always been a drive to do more with less and the age of IT is a perfect example of this with automated systems and online purchasing. But, as IT has become more and more prolific in the way we live and do business, we have […]

Continue reading

5 Steps to Link your IaaS and PaaS Accounts

A couple of months ago, we released a way for you to streamline your IBM Cloud experience. Essentially, IaaS customers, who also have PaaS accounts, can now link IaaS and PaaS for an easy to navigate, single view of your accounts. When you merge your accounts, you only manage one invoice through one login giving you […]

Continue reading

Anomaly detection in mobile sensor data using Machine Learning

This blog post is an excerpt from our solution tutorial - "Gather, visualize, and analyze IoT data". The tutorial walks you through setting up an IoT device, gathering mobile sensor data in the Watson IoT Platform, exploring data and creating visualizations and then using advanced machine learning services to analyze data and detect anomalies in the historical data.

Continue reading