{"id":21559,"date":"2016-06-01T10:16:44","date_gmt":"2016-06-01T17:16:44","guid":{"rendered":"https:\/\/www.jamasoftware.com\/?p=21559"},"modified":"2026-06-29T09:44:32","modified_gmt":"2026-06-29T16:44:32","slug":"monitoring-java-applications","status":"publish","type":"post","link":"https:\/\/www.jamasoftware.com\/legacy\/blog\/2016\/06\/01\/monitoring-java-applications\/","title":{"rendered":"Monitoring Java Applications Running Inside Docker Containers"},"content":{"rendered":"<p>Java developers need to monitor and trouble-shoot Java applications from time to time. It&#8217;s usually straightforward to do that if an applications is running as a Java processes on your local machine. But when the Java application runs inside a <a href=\"https:\/\/www.docker.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Docker<\/a> container on a Docker host, it becomes challenging to monitor them using tools running locally, even when the Docker host is just a virtual machine running on your desktop. In this blog post, I will describe a couple of ways to monitor such Java applications.<\/p>\n<h3>Connect VisualVM to an Application through JMX agents<\/h3>\n<p><a href=\"https:\/\/visualvm.java.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">VisualVM<\/a> is a GUI tool that monitors and profiles a JVM. It comes with JDK and can be start by running &#8220;<a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/technotes\/tools\/unix\/jvisualvm.html\" target=\"_blank\" rel=\"noopener noreferrer\">jvisualvm<\/a>&#8221; command. You can also install it as a separate application. The tool connects to local Java processes directly, but in order to connect to a Java application running inside a <a href=\"https:\/\/www.jamasoftware.com\/blog\/long-road-docker\/\" target=\"_blank\" rel=\"noopener noreferrer\">Docker container<\/a>, it needs to connect through a JMX port.<\/p>\n<p>To enable remote JMX connection, you need to run your Java application in the Docker container with JVM options like these:<\/p>\n<p style=\"font: 14px\/21px 'Helvetica Neue'; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 12px; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">-Dcom.sun.management.jmxremote.rmi.port=9090<\/span><\/p>\n<p style=\"font: 14px\/21px 'Helvetica Neue'; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 12px; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">-Dcom.sun.management.jmxremote=true<\/span><\/p>\n<p style=\"font: 14px\/21px 'Helvetica Neue'; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 12px; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">-Dcom.sun.management.jmxremote.port=9090\u00a0<\/span><\/p>\n<p style=\"font: 14px\/21px 'Helvetica Neue'; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 12px; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">-Dcom.sun.management.jmxremote.ssl=false<\/span><\/p>\n<p style=\"font: 14px\/21px 'Helvetica Neue'; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 12px; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">-Dcom.sun.management.jmxremote.authenticate=false<\/span><\/p>\n<p style=\"font: 14px\/21px 'Helvetica Neue'; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 12px; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">-Dcom.sun.management.jmxremote.local.only=false<\/span><\/p>\n<p style=\"font: 14px\/21px 'Helvetica Neue'; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 12px; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">-Djava.rmi.server.hostname=192.168.99.100<\/span><\/p>\n<p>Where <span style=\"font: 14px\/21px 'courier new', courier; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">java.rmi.server.host.name<\/span><span style=\"font: 14px\/21px 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span class=\"Apple-converted-space\">\u00a0<\/span><\/span>specifies the host name or IP address that your JMX client uses to connect to the target Java application.<\/p>\n<p>Make sure to publish container&#8217;s port 9090 as the Docker host port 9090 when starting the Docker container:<br \/>\n<span style=\"font: 12px\/18px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #f6f6f6; -webkit-text-stroke-width: 0px;\">$ docker run -p 9090:9090 {your_docker_image}<\/span><\/p>\n<p>If your Docker host runs behind a firewall, you could use a SSH tunnel to connect to port 9090 of your Docker host. This time, you may need to set your RMI server host name to be <span style=\"font: 14px\/21px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">localhost:<\/span><br \/>\n<span style=\"font: 13.33px\/20px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #f6f6f6; -webkit-text-stroke-width: 0px;\">-Djava.rmi.server.hostname=localhost<\/span><\/p>\n<p>Then ssh to Docker host using an SSH tunnel:<br \/>\n<span style=\"font: 13.33px\/20px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #f6f6f6; -webkit-text-stroke-width: 0px;\">$ ssh -L 9090:localhost:9090 {your_docker_host}<\/span><\/p>\n<p>This will forward the connection from your local port 9090 to <span style=\"font: 14px\/21px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">localhost<\/span>port 9090 on your Docker host server.<\/p>\n<p>As a best practice, these JVM arguments should be passed as an environment variable that could be used by an entry script to start the Java application. For example:<br \/>\n<span style=\"font: 13.33px\/20px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #f6f6f6; -webkit-text-stroke-width: 0px;\">$ docker run -p 9090:9090 -e MY_JAVA_OPTS=&#8221;&#8230;&#8221;\u00a0 {your_docker_image}<\/span><\/p>\n<p>Once your application is running with the the right options, you can connect your VisualVM to the application with the following steps:<\/p>\n<p>1. Run VisualVM<br \/>\n<span style=\"font: 13.33px\/20px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #f6f6f6; -webkit-text-stroke-width: 0px;\">$ jvisualvm<\/span><\/p>\n<p>2. Add a remote host<\/p>\n<p><span style=\"color: #ff0000;\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-21561\" src=\"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/Sean-1.png\" alt=\"Sean 1\" width=\"778\" height=\"336\" \/><\/span><\/p>\n<p>3. Add a JMX connection<br \/>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-21562\" src=\"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/2-sean.png\" alt=\"2 sean\" width=\"1762\" height=\"860\" \/><\/p>\n<p>3. Click on your JMS connection to connect to your application<br \/>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-21563\" src=\"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/sean-3.png\" alt=\"sean 3\" width=\"1770\" height=\"1080\" \/><\/p>\n<h3>Running Java Mission Control and Java Flight Recorder<\/h3>\n<p><a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javaseproducts\/mission-control\/java-mission-control-1998576.html\" target=\"_blank\" rel=\"noopener noreferrer\">Java Mission Control (JMC)<\/a> is a monitoring and performance tool offered by Oracle as a commercial feature of JDK 7 and 8. A key feature of JMC is Java Flight Recorder (JFR) that can be used to record event history for performance diagnosis and tuning. JMC is free to use for development.<\/p>\n<p>To enable Java Mission Control, specify the following JVM options when starting your Java application in the Docker container, in addition to the same JMX-related options described above:<\/p>\n<p style=\"margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Helvetica Neue'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 10pt; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">-XX:+UnlockCommercialFeatures<\/span><\/p>\n<p style=\"margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Helvetica Neue'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 10pt; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">-XX:+FlightRecorder<\/span><\/p>\n<p>Here are the steps to connect your JMC GUI client to a Java application that that has JMC\/JFR feature enabled:<\/p>\n<p>1. Run the Java Mission Control GUI that comes with Java JDK 7 or 8:<br \/>\n<span style=\"font: 13.33px\/20px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #f6f6f6; -webkit-text-stroke-width: 0px;\">$ jmc<\/span><\/p>\n<p>2. Set up a remote connection<br \/>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-21564\" src=\"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/sean-4.png\" alt=\"sean 4\" width=\"770\" height=\"386\" \/> <img decoding=\"async\" class=\"aligncenter wp-image-21565\" src=\"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/sean-5.png\" alt=\"sean 5\" width=\"779\" height=\"597\" \/>\u00a0<img decoding=\"async\" class=\"aligncenter size-full wp-image-21566\" src=\"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/sean-6.png\" alt=\"sean 6\" width=\"796\" height=\"358\" \/><\/p>\n<p><span style=\"color: #ff0000;\">\u00a0<\/span><\/p>\n<p>4. Click on 192.168.99.100:9090, then &#8220;MBean Server&#8221;, to monitor the application, or click on &#8220;192.168.99.100:9090&#8221; to start a flight recording session.<br \/>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-21567\" src=\"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/sean-7.png\" alt=\"sean 7\" width=\"1830\" height=\"1080\" \/><\/p>\n<hr \/>\n<p><span style=\"color: #ff6600;\"><strong>RELATED POST:<\/strong> <a href=\"https:\/\/www.jamasoftware.com\/blog\/checklist-selecting-a-requirements-management-tool\/?utm_campaign=related+blog\" target=\"_blank\" rel=\"noopener noreferrer\">Checklist: Selecting a Requirements Management Tool<\/a><\/span><\/p>\n<hr \/>\n<h3>Setting up New Relic<\/h3>\n<p><a href=\"https:\/\/newrelic.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">New Relic<\/a> is a hosted solution for application monitoring. To enable New Relic for your Java application, you need to have a New Relic account and install New Relic Java agent with your application. Here are the key steps to set it up. For more details, see the <a href=\"https:\/\/docs.newrelic.com\/docs\/agents\/java-agent\/getting-started\/new-relic-java\" target=\"_blank\" rel=\"noopener noreferrer\">New Relic Documentation<\/a>.<\/p>\n<p>1. Download New Relic Agent ZIP file from <a href=\"https:\/\/docs.newrelic.com\/docs\/agents\/java-agent\/installation\/install-java-agent#h2-download-files\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/docs.newrelic.com\/docs\/agents\/java-agent\/installation\/install-java-agent.<\/a><\/p>\n<p>2. Unzip the downloaded file. The unzipped file folder should contain files <span style=\"font: 14px\/21px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">newrelic.jar<\/span> and <span style=\"font: 14px\/21px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">newrelic.yml<\/span><\/p>\n<p>3. Edit <span style=\"font: 14px\/21px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">newrelic.yml<\/span>file to configure your license key and application name<\/p>\n<p style=\"font: 14px\/21px 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 10pt; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">&#8230;<\/span><\/p>\n<p style=\"font: 14px\/21px 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 10pt; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">license_key: &#8216;{your_newrelic_license_key}&#8217;<\/span><\/p>\n<p style=\"font: 14px\/21px 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 10pt; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">&#8230;<\/span><\/p>\n<p style=\"font: 14px\/21px 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 10pt; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">app_name: &#8216;{your_app_name}&#8217;<\/span><\/p>\n<p style=\"font: 14px\/21px 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; margin: 0px; padding: 0px; border: 0px currentColor; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px;\"><span style=\"margin: 0px; padding: 0px; border: 0px currentColor; font-family: 'courier new', courier; font-size: 10pt; font-style: inherit; font-weight: inherit; vertical-align: baseline;\">&#8230;<\/span><\/p>\n<p>4. Include the unzipped folder in your Docker image<\/p>\n<p>5. Start your Java application inside the container with the following JVM option:<br \/>\n<span style=\"font: 13.33px\/20px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #f6f6f6; -webkit-text-stroke-width: 0px;\">-javaagent:\/path\/to\/newrelic.jar<\/span><\/p>\n<p>6. Log in to your New Relic account and your should see your application shows up in the application list.<\/p>\n<h3>Debug Java Application Remotely<\/h3>\n<p>To debug your Java application remotely using your favorite IDE, use the following JVM option to start your application assuming the debugging agent is running at port 5005:<\/p>\n<p><span style=\"font: 14px\/21px 'courier new', courier; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #f6f6f6; -webkit-text-stroke-width: 0px;\">-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005<\/span><\/p>\n<p>Make sure your publish port 5005 to your Docker host when starting your Docker container.<\/p>\n<p>As an example, if you use <a href=\"https:\/\/www.jetbrains.com\/idea\/\">IntelliJ <\/a>as your Java IDE to debug, you can start by opening the project that contains the source code of your Java application.<\/p>\n<p>Then, use &#8220;Run\/Debug Configuration&#8221; Dialog to create a remote run\/debug configuration.<br \/>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-21568\" src=\"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/sean-8.png\" alt=\"sean 8\" width=\"1586\" height=\"1080\" \/><\/p>\n<p>Now you can run &#8220;MyRemoteApp&#8221; application configuration to start remote debugging.<\/p>\n<h3>Summary<\/h3>\n<p>In this blog post, I have described how to configure VisualVM, JMC, New Relic, and Java remote debugging to monitor and profile your Java applications that runs inside <a href=\"https:\/\/www.jamasoftware.com\/blog\/long-road-docker\/\" target=\"_blank\" rel=\"noopener noreferrer\">Docker containers<\/a>. I hope you find this information helpful!<\/p>\n<hr \/>\n<h5 style=\"text-align: center;\">Learn more about how Jama Connect streamlines tracking and tracing requirements.<\/h5>\n<p style=\"text-align: center;\"><a style=\"background-color: #d5502a; border-radius: 80px; color: #ffffff; display: inline-block; font-family: sans-serif; font-size: 13px; font-weight: bold; line-height: 40px; text-align: center; text-decoration: none; width: 200px; -webkit-text-size-adjust: none;\" href=\"https:\/\/resources.jamasoftware.com\/datasheet\/jama-connect?utm_campaign=cta+blog\" target=\"_blank\" rel=\"noopener noreferrer\">SEE THE SOLUTION<\/a><\/p>\n<input class=\"fooboxshare_post_id\" type=\"hidden\" value=\"21559\"\/>","protected":false},"excerpt":{"rendered":"<p>Java developers need to monitor and trouble-shoot Java applications from time to time. It&#8217;s usually straightforward to do that if an applications is running as a Java processes on your local machine. But when the Java application runs inside a Docker container on a Docker host, it becomes challenging to monitor them using tools running [&hellip;]<\/p>\n","protected":false},"author":85,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[855],"tags":[180,181,206,207,208,209],"industry":[],"class_list":["post-21559","post","type-post","status-publish","format-standard","hentry","category-software-development","tag-breakthecode","tag-break-the-code","tag-docker","tag-java","tag-new-relic","tag-visualvm"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.1 (Yoast SEO v28.1) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Monitoring Java Applications Successfully | Jama Software<\/title>\n<meta name=\"description\" content=\"How to monitor and trouble-shoot Java applications that run inside a Docker container on a Docker host? Here are a couple of ways.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Monitoring Java Applications Running Inside Docker Containers\" \/>\n<meta property=\"og:description\" content=\"How to monitor and trouble-shoot Java applications that run inside a Docker container on a Docker host? Here are a couple of ways.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/\" \/>\n<meta property=\"og:site_name\" content=\"Jama Software\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-01T17:16:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-29T16:44:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/Sean-1.png\" \/>\n<meta name=\"author\" content=\"Sean Tong\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sean Tong\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/2016\\\/06\\\/01\\\/monitoring-java-applications\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/2016\\\/06\\\/01\\\/monitoring-java-applications\\\/\"},\"author\":{\"name\":\"Sean Tong\",\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/#\\\/schema\\\/person\\\/c22caa76ef723bdae7a6af54cf076541\"},\"headline\":\"Monitoring Java Applications Running Inside Docker Containers\",\"datePublished\":\"2016-06-01T17:16:44+00:00\",\"dateModified\":\"2026-06-29T16:44:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/2016\\\/06\\\/01\\\/monitoring-java-applications\\\/\"},\"wordCount\":895,\"image\":{\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/2016\\\/06\\\/01\\\/monitoring-java-applications\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/static.jamasoftware.com\\\/www\\\/imports\\\/2016\\\/05\\\/Sean-1.png\",\"keywords\":[\"#BreakTheCode\",\"break the code\",\"Docker\",\"Java\",\"New Relic\",\"VisualVM\"],\"articleSection\":[\"Software Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/2016\\\/06\\\/01\\\/monitoring-java-applications\\\/\",\"url\":\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/2016\\\/06\\\/01\\\/monitoring-java-applications\\\/\",\"name\":\"Monitoring Java Applications Successfully | Jama Software\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/2016\\\/06\\\/01\\\/monitoring-java-applications\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/2016\\\/06\\\/01\\\/monitoring-java-applications\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/static.jamasoftware.com\\\/www\\\/imports\\\/2016\\\/05\\\/Sean-1.png\",\"datePublished\":\"2016-06-01T17:16:44+00:00\",\"dateModified\":\"2026-06-29T16:44:32+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/#\\\/schema\\\/person\\\/c22caa76ef723bdae7a6af54cf076541\"},\"description\":\"How to monitor and trouble-shoot Java applications that run inside a Docker container on a Docker host? Here are a couple of ways.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/2016\\\/06\\\/01\\\/monitoring-java-applications\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/2016\\\/06\\\/01\\\/monitoring-java-applications\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/2016\\\/06\\\/01\\\/monitoring-java-applications\\\/#primaryimage\",\"url\":\"https:\\\/\\\/static.jamasoftware.com\\\/www\\\/imports\\\/2016\\\/05\\\/Sean-1.png\",\"contentUrl\":\"https:\\\/\\\/static.jamasoftware.com\\\/www\\\/imports\\\/2016\\\/05\\\/Sean-1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/2016\\\/06\\\/01\\\/monitoring-java-applications\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.jamasoftware.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Monitoring Java Applications Running Inside Docker Containers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/#website\",\"url\":\"https:\\\/\\\/www.jamasoftware.com\\\/\",\"name\":\"Jama Software\",\"description\":\"Jama Connect\u00ae #1 in Requirements Management\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.jamasoftware.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.jamasoftware.com\\\/#\\\/schema\\\/person\\\/c22caa76ef723bdae7a6af54cf076541\",\"name\":\"Sean Tong\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2279c6b51a13d50f2f7a6b62c3e0d6c3e8a559601133fc8d0aaaf6ac944a6f5a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2279c6b51a13d50f2f7a6b62c3e0d6c3e8a559601133fc8d0aaaf6ac944a6f5a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2279c6b51a13d50f2f7a6b62c3e0d6c3e8a559601133fc8d0aaaf6ac944a6f5a?s=96&d=mm&r=g\",\"caption\":\"Sean Tong\"},\"description\":\"Sean Tong writes about debugging SQL server performance and monitoring Java applications running outside of docker containers.\",\"url\":\"https:\\\/\\\/www.jamasoftware.com\\\/blog\\\/author\\\/stong\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Monitoring Java Applications Successfully | Jama Software","description":"How to monitor and trouble-shoot Java applications that run inside a Docker container on a Docker host? Here are a couple of ways.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/","og_locale":"en_US","og_type":"article","og_title":"Monitoring Java Applications Running Inside Docker Containers","og_description":"How to monitor and trouble-shoot Java applications that run inside a Docker container on a Docker host? Here are a couple of ways.","og_url":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/","og_site_name":"Jama Software","article_published_time":"2016-06-01T17:16:44+00:00","article_modified_time":"2026-06-29T16:44:32+00:00","og_image":[{"url":"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/Sean-1.png","type":"","width":"","height":""}],"author":"Sean Tong","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sean Tong","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/#article","isPartOf":{"@id":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/"},"author":{"name":"Sean Tong","@id":"https:\/\/www.jamasoftware.com\/#\/schema\/person\/c22caa76ef723bdae7a6af54cf076541"},"headline":"Monitoring Java Applications Running Inside Docker Containers","datePublished":"2016-06-01T17:16:44+00:00","dateModified":"2026-06-29T16:44:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/"},"wordCount":895,"image":{"@id":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/#primaryimage"},"thumbnailUrl":"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/Sean-1.png","keywords":["#BreakTheCode","break the code","Docker","Java","New Relic","VisualVM"],"articleSection":["Software Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/","url":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/","name":"Monitoring Java Applications Successfully | Jama Software","isPartOf":{"@id":"https:\/\/www.jamasoftware.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/#primaryimage"},"image":{"@id":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/#primaryimage"},"thumbnailUrl":"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/Sean-1.png","datePublished":"2016-06-01T17:16:44+00:00","dateModified":"2026-06-29T16:44:32+00:00","author":{"@id":"https:\/\/www.jamasoftware.com\/#\/schema\/person\/c22caa76ef723bdae7a6af54cf076541"},"description":"How to monitor and trouble-shoot Java applications that run inside a Docker container on a Docker host? Here are a couple of ways.","breadcrumb":{"@id":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/#primaryimage","url":"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/Sean-1.png","contentUrl":"https:\/\/static.jamasoftware.com\/www\/imports\/2016\/05\/Sean-1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.jamasoftware.com\/blog\/2016\/06\/01\/monitoring-java-applications\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.jamasoftware.com\/"},{"@type":"ListItem","position":2,"name":"Monitoring Java Applications Running Inside Docker Containers"}]},{"@type":"WebSite","@id":"https:\/\/www.jamasoftware.com\/#website","url":"https:\/\/www.jamasoftware.com\/","name":"Jama Software","description":"Jama Connect\u00ae #1 in Requirements Management","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.jamasoftware.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.jamasoftware.com\/#\/schema\/person\/c22caa76ef723bdae7a6af54cf076541","name":"Sean Tong","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2279c6b51a13d50f2f7a6b62c3e0d6c3e8a559601133fc8d0aaaf6ac944a6f5a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2279c6b51a13d50f2f7a6b62c3e0d6c3e8a559601133fc8d0aaaf6ac944a6f5a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2279c6b51a13d50f2f7a6b62c3e0d6c3e8a559601133fc8d0aaaf6ac944a6f5a?s=96&d=mm&r=g","caption":"Sean Tong"},"description":"Sean Tong writes about debugging SQL server performance and monitoring Java applications running outside of docker containers.","url":"https:\/\/www.jamasoftware.com\/blog\/author\/stong\/"}]}},"_links":{"self":[{"href":"https:\/\/www.jamasoftware.com\/legacy\/wp-json\/wp\/v2\/posts\/21559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jamasoftware.com\/legacy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jamasoftware.com\/legacy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jamasoftware.com\/legacy\/wp-json\/wp\/v2\/users\/85"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jamasoftware.com\/legacy\/wp-json\/wp\/v2\/comments?post=21559"}],"version-history":[{"count":1,"href":"https:\/\/www.jamasoftware.com\/legacy\/wp-json\/wp\/v2\/posts\/21559\/revisions"}],"predecessor-version":[{"id":87069,"href":"https:\/\/www.jamasoftware.com\/legacy\/wp-json\/wp\/v2\/posts\/21559\/revisions\/87069"}],"wp:attachment":[{"href":"https:\/\/www.jamasoftware.com\/legacy\/wp-json\/wp\/v2\/media?parent=21559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jamasoftware.com\/legacy\/wp-json\/wp\/v2\/categories?post=21559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jamasoftware.com\/legacy\/wp-json\/wp\/v2\/tags?post=21559"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.jamasoftware.com\/legacy\/wp-json\/wp\/v2\/industry?post=21559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}