java - Connect Java Mission Control to Wildfly 16
问题描述
I try to connect Java Mission Control (JMC) with Wildfly 16. Application server lays on Docker.
I successfully connected to wildfly via jconsole, to manage it I followed steps described here.
Unfortunately, I have no luck to connect via JMC. The URL which I use looks like this:
service:jmx:remoting-jmx://192.168.99.100:9990
- I tried to set Xbootclasspath to jboss-cli-client.jar as it was described here, but I just get
Unable to connect
error. - I set the same jars, which are used for jconsole, but still I got
Unable to connect
. - I gave a try to adding flags on container site, as it was shown here, but with these flags, even wildfly haven't started.
Then, I found here the idea to hardcode some jboss classes to enable connection via remoting-jmx. I changed version of jars, according to these provided by wildfly16 and put it to jmc.ini like this.
-Xbootclasspath/a:"C:/Program Files/Java/jdk-10.0.2/lib/missioncontrol/dropins/jboss-cli-client.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/remoting-jmx/main/remoting-jmx-3.0.1.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/remoting/main/jboss-remoting-5.0.8.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/logging/main/jboss-logging-3.3.2.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/xnio/main/xnio-api-3.6.5.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/xnio/nio/main/xnio-nio-3.6.5.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/marshalling/main/jboss-marshalling-2.0.6.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/marshalling/river/main/jboss-marshalling-river-2.0.6.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/as/cli/main/wildfly-cli-8.0.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/staxmapper/main/staxmapper-1.3.0.Final;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/as/protocol/main/wildfly-protocol-8.0.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/dmr/main/jboss-dmr-1.5.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/as/controller-client/main/wildfly-controller-client-8.0.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/threads/main/jboss-threads-2.3.3.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.7.Final.jar"
After that, finally, I have another error, which is
Could not initialize class org.jboss.remotingjmx.RemotingConnector
I added dependencies of remoting-jmx-3.0.1.Final
to Xbootclasspath, but I got still the same error.
My question is, have you got any idea, how to make this connection works ? Maybe someone have done it in different way ?
Any advices how can i debug this problem, will be priceless? Because I'm lack of ideas how to solve it.
解决方案
在 %WILDFLY_HOME%\bin\standalone.conf.bat 中输入:
设置“JAVA_OPTS=%JAVA_OPTS% -XX:+FlightRecorder”
在 jmc.ini 下面 -vmargs 放
-Xbootclasspath/a:C:\%wildfly_home%\bin\client\jboss-cli-client.jar
(%wildfly_home% 当然不同,或者只是将 jboss-cli-client.jar 复制到另一个目录并更正路径) 3. 运行 JMC,然后创建新连接 - 在连接属性窗格中按下按钮“自定义 JMX 服务 URL” , 放:
service:jmx:http-remoting-jmx://localhost:9990
在凭据字段中只需输入用户和密码,它们应该为领域管理创建(例如使用 %wildfly_home%\bin\add-user.bat) 希望这对某人有所帮助。
推荐阅读
- python - 应用公式有效地获取 Numpy 矩阵
- reactjs - 在 Material UI Primary Color Theme 中使用三种以上的颜色
- javascript - 如何在 JavaScript 中将文本拆分为具有不同格式的数组
- python-3.x - 从 Kivy/KivyMD 的自定义列表中获取复选框的状态
- python - 在烧瓶 api 中实际响应之前发送确认消息
- c++ - QML 图像:运行已部署的应用程序时不支持 jpg 的图像格式
- javascript - Javascript - 循环创建卡片列表
- node.js - 创建一个启动通知 Nodejs 的任务
- php - 如何在 Journal 3 Opencart 3x 中添加 AdRoll 像素跟踪代码
- aws-dms - 如何将来自不同模式的表连接到一个表中?