I am trying to run 2 instance of tomcat on a single. I have updated server.xml for both the tomcat instance so that the http/https ports are different. Also I have updated CATALINA_OPTS in the setenv.sh so that remote jmx port is different.
CATALINA_OPTS for tomcat 1:
CATALINA_OPTS="-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=7061 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false \
-javaagent:/mnt/production/tomcat/bin/remoteagent.jar"
CATALINA_OPTS for tomcat 2:
CATALINA_OPTS="-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=7065 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false \
-javaagent:/mnt/production/tomcat/bin/remoteagent.jar \
-Djava.security.auth.login.config=$CATALINA_HOME/conf/crowd.conf"
But when I try to start the second instance of tomcat I get a bind exception on port 3000. I greped the logs for 1st instance of tomcat and I see the following line in the catalina log file:
Created service URL service:jmx:rmi://localhost:3001/jndi/rmi://localhost:3000/jmxrmi
I greped the entire tomcat directory for 3000 but there isn't a config regarding port 3000. So I think this is some default config. Does someone know how to modify this config.