0

我对 jboss 应用程序非常陌生,并试图在 windows 上将 prometheus jmx_exporter 与 jboss-EAP 7.0.0 集成。我正在尝试在域配置模式下运行。以下是我在 host.xml 中所做的更改

 <jvm-options>
            <option value="-Xbootclasspath/p:C:\jboss-eap-7.0\modules\system\layers\base\org\jboss\logmanager\main\jboss-logmanager-2.0.3.Final-redhat-1.jar"/>
            <option value="-Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager"/> 
            <option value="-Djava.util.logging.manager=org.jboss.logmanager.LogManager"/>
            <option value="-javaagent:C:\jboss-eap-7.0\bin\jmx_prometheus_javaagent-0.14.0.jar=58080:C:\jboss-eap-7.0\domain\configuration\config.yml"/>
 </jvm-options>

获取日志如下

[Server:server-one] WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
[Server:server-one] 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")
[Server:server-one]     at org.jboss.logmanager.Logger.getLogger(Logger.java:57)
[Server:server-one]     at org.jboss.as.server.DomainServerMain.main(DomainServerMain.java:92)
[Server:server-one]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[Server:server-one]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[Server:server-one]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[Server:server-one]     at java.lang.reflect.Method.invoke(Method.java:498)
[Server:server-one]     at org.jboss.modules.Module.run(Module.java:329)
[Server:server-one]     at org.jboss.modules.Main.main(Main.java:507)
4

1 回答 1

0

该错误告诉您需要更新系统属性,例如在 domain.xml 中:

    </extensions>
      <system-properties>
        <property name="java.util.logging.manager" value="org.jboss.logmanager.LogManager"/>
        <property name="jboss.modules.system.pkgs" value="org.jboss.byteman,org.jboss.logmanager"/>
      </system-properties>
    <management>
于 2020-10-12T20:30:48.667 回答