【问题标题】:How to enable JMX in wildfly running in windows server 2016如何在 Windows Server 2016 中运行的 Wildfly 中启用 JMX
【发布时间】:2021-07-11 16:15:56
【问题描述】:

我在 windows 服务器上运行 wildfly。需要设置JMX远程监控

我尝试在standalone.conf.bat 文件中添加JMX 设置并打开防火墙端口,但仍然无法使用jconsole 进行监控

环境:

  • 野蝇 23
  • 红帽 1.8.275
  • Windows Server 2016

我尝试过的事情:

在bin文件夹的standalone.conf.bat文件中添加了以下设置

设置 "JAVA_OPTS=-Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m" 设置 "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true " 设置 "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager" 设置 "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”设置“JAVA_OPTS=% JAVA_OPTS% -Xbootclasspath/p:\wildfly-23.0.1.Final\modules\system\layers\base\org\jboss\logmanager\main\jboss-logmanager-2.1.18.Final.jar -Xbootclasspath/p :\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"

服务启动时没有错误,并且能够使用 jconsole 作为 localhost 进行监控,但不能从远程进行监控

端口暴露在防火墙设置中

需要澄清

我是否需要在独立的 .xml 文件中禁用默认管理端口 9990 才能正常工作

但如果是这样的话,我可以在本地使用 jmx 端口进行监控

请提供任何帮助或建议

提前致谢

【问题讨论】:

    标签: wildfly jmx jconsole jvisualvm jmc


    【解决方案1】:

    它终于在以下设置下对我有用。我错过了以下属性 -Dcom.sun.management.jmxremote.rmi.port=

    完整的属性如下所示

    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=-Dcom.sun.management.jmxremote.rmi.port= -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"

    除此之外,我为 wildfly 设置 SSL

    它对我有用

    谢谢大家

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-21
      • 1970-01-01
      • 2018-06-15
      • 2013-02-14
      • 2020-04-01
      • 2017-04-22
      相关资源
      最近更新 更多