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/
Answer
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/
No comments:
Post a Comment