1

I have to enable the following configuration for tomcat running in elastic beanstalk environment

-Dcom.sun.management.jmxremote.port=9000 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

I have absolutely no idea where I have to make these changes.

Elastic Beanstalk Configuration

64bit Amazon Linux 2016.09 v2.3.1 running Tomcat 8 Java 8

I believe elastic beanstalk create different set of folder structure for tomcat8

# whereis tomcat8
tomcat8: /usr/sbin/tomcat8 /etc/tomcat8 /usr/libexec/tomcat8 /usr/share/tomcat8

My Issue is resolved following this link https://bobmarksblog.wordpress.com/2016/08/08/monitoring-elasticbeanstalk-tomcat-instances-using-visualvm-via-ssh/

  • Please write a brief description of the link in an answer (not editing the question) and mark it as accepted :) – Alfabravo Dec 20 '17 at 18:12
  • Note: it wouldn't work for load-balancing environments, when you have more than 1 node – ALex_hha Jan 26 '18 at 8:19
1

The solution is a lot simpler than I thought.

To enable JMX in AWS Elastic Beanstalk you must add JVM command line configuration ->

Select Elastic Beanstalk environment -> 
Configuration -> Software Configuration -> 
Add following to “JVM command line options:”

in text box

 -Dcom.sun.management.jmxremote.port=9000 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

It will automatically trigger the changes and will update the servers, now in a security group (assigned to your instances), you must allow this port 9000.

Now you can connect to any of the instances at a time but viewing is public IP address from AWS console (web).

Please have a look at this link for more details. https://bobmarksblog.wordpress.com/2016/08/08/monitoring-elasticbeanstalk-tomcat-instances-using-visualvm-via-ssh/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.