Enabling the use of real-time JVM monitoring tools like jconsole and VisualVM can be extremely beneficial when troubleshooting issues. These tools work by enabling a JMX/RMI communication channel to the JVM.
These are typically thought of as local development tools, but they can also be used on remote CF containers running Java. In this article, I’ll show you how to enable JMX/RMI to your remote Cloud Foundry container.
Continue reading “CloudFoundry: Enabling Java JMX/RMI access for remote containers”
Java thread and heap dumps are valuable tools for troubleshooting local development, but they can also be used on remote CF containers running a JVM. In this article, we’ll go through various method of gathering this data from a Cloud Foundry container and then tools for analyzing this data.
Now matter how uniform your environments, whether using Cloud Foundry stemcells/containers, configuration management tools, or Docker images, there are always real-world issues that show up only in certain environments (especially production!). There are unique corner cases that get exposed by end user experimentation, unexpected thread locking, generational memory issues, etc… and thread and heap dump analysis tools can assist.
Continue reading “CloudFoundry: Java thread and heap dump analysis on remote containers”
Java JMX (Java Management Extensions) is a standardized way of monitoring Java based applications. The managed resources (MBeans) are defined and exposed by the JVM, application server, and application – and offer a view into these layers that can provide invaluable monitoring data.
But in order to report back the JMX data you must know the fully expanded path of the MBean and it’s available attributes/operations. If you are on a desktop, tools like jsonsole provide a nice GUI interface for drilling down into the MBean hierarchy. But, if you are in a server environment and JMX is not enabled for remote access on a desktop, you may need a console alternative.
An open-source project call jmxterm comes packaged as a single uber jar that makes it easy to enumerate and explore the available MBean exposed in a Java based application.
Continue reading “Monitoring: Java JMX exploration from the console using jmxterm”