I'm running wildfly in windows server. Need to setup JMX to monitor remotely
I have tried adding JMX settings in standalone.conf.bat file and opened firewall port, but still not able to monitor using jconsole
Environment:
- Wildfly 23
- Redhat 1.8.275
- Windows Server 2016
Things i tried:
Added the following settings in standalone.conf.bat file in bin folder
set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m" set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true" set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager" set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=9010" set "JAVA_OPTS=%JAVA_OPTS% -Xbootclasspath/p:<JBOSS_HOME>\wildfly-23.0.1.Final\modules\system\layers\base\org\jboss\logmanager\main\jboss-logmanager-2.1.18.Final.jar -Xbootclasspath/p:<JBOSS_HOME>\wildfly-23.0.1.Final\modules\system\layers\base\org\wildfly\common\main\wildfly-common-1.5.4.Final .jar" set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
Service started without errors and was able to monitor using jconsole as localhost , but not from remote
Port was exposed in firewall settings though
Clarification Needed
Do i need to disable default management port 9990 in standalone .xml file for this to work
but if thats the case i'm able to monitor using the jmx port in local
Any help or suggestions please
Thanks in advance
It worked for me with below settings at last. I was missing the below property -Dcom.sun.management.jmxremote.rmi.port=<port#>
Complete Property looks like this
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=<port#>-Dcom.sun.management.jmxremote.rmi.port=<port#> -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
Apart from this i setup the SSL for the wildfly
It worked for me
Thanks all