How to connect to remote WildFly using JMC?

ぃ、小莉子 提交于 2019-12-25 07:37:32

问题


I have a Linux server where I'm running WildFly 10. I work on a Windows machine and I want to profile the remote application server. I've checked that port 9990 is enabled for access via http by accessing http://<ip>:9990/console and via JMX access from the JConsole client that comes in WildFly. For the latter, I downloaded WildFly to my machine, went to %WILDFLY_PATH%\bin\jconsole.bat, accesed through service:jmx:http-remoting-jmx://<ip>:9990 and used my credentials, it works properly. Now I want to access vía JMC, but I cannot achieve it. I tried the following:

  • Copied jboss-client.jar libraries from %WILDFLY_PATH%\bin\client to %JDK_HOME%\lib\missioncontrol\dropins and start JMC.
  • Executed JMC from cmd and added -cp:a <location of jboss-client.jar> param, like this:

    jmc.exe -cp:a "C:\Program Files\Java\jdk1.8.0_72\lib\missioncontrol\dropins\jboss-client.jar"
    

    None of these worked.

I tried access with VisualVM and worked using the last approach but replaced jmc.exe by jvisualvm.exe and I connected to the external VM with no issues. I wonder if there's any way to achieve this using JMC.


回答1:


Since jmc doesn't accept the -cp flag, you have to run like this:

jmc.exe -vmargs -Xbootclasspath/a:<location of jboss-client.jar>

Some more clues might be here: https://community.oracle.com/thread/2592885?tstart=0



来源:https://stackoverflow.com/questions/36750032/how-to-connect-to-remote-wildfly-using-jmc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!