2

我正在尝试设置 JMX 导出以插入 Prometheus 指标。使用带有 Java 11 的 Wildfly 15。在域配置中,我有这样一个块:

<jvm-options>
                    <option value="-Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager"/>
                    <option value="-Djava.util.logging.manager=org.jboss.logmanager.LogManager"/>
                    <option value="-Xbootclasspath/a:/opt/wildfly/wildfly-15.0.1.Final/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.5.Final.jar:/opt/wildfly/wildfly-15.0.1.Final/jboss-modules.jar:/opt/wildfly/wildfly-15.0.1.Final/modules/system/layers/base/org/slf4j/impl/main/slf4j-jboss-logmanager-1.0.3.GA.jar:/opt/wildfly/wildfly-15.0.1.Final/modules/system/layers/base/org/wildfly/common/main/wildfly-common-1.4.0.Final.jar"/>
                    <option value="-javaagent:/opt/wildfly/wildfly-15.0.1.Final/jmx_prometheus_javaagent-0.3.1.jar=58080:/opt/wildfly/wildfly-15.0.1.Final/jmx_prometheus.yml"/>
                </jvm-options>

此设置适用于 Java8,类似的设置适用于 Wildfly 10。但 Wildfly15+Java11 捆绑包会导致这样的错误:

[Server:wf01] Exception in thread "main" java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")

尝试了各种在互联网上找到的解决方法,但无济于事。有什么线索吗?

4

0 回答 0