I have Tomcat installed on ubuntu. I want to enable JMX for monitoring so in catalina.sh I modified JAVA_OPTS
as:
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=4998 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
After restarting JMX is working but when I want to stop tomcat It gives error as:
Error: Exception thrown by the agent : java.rmi.server.ExportException : Port already in use: 5555;nested exception is: java.net.BindException: Address already in use:
After some Google search I come to know that we have write all JMX configurations to CATALINA_OPTS
but after writing all configurations inside CATALINA_OPTS I am not able to connect.