简体   繁体   English

如何使用JMC连接到远程WildFly?

[英]How to connect to remote WildFly using JMC?

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. 我有一台运行WildFly 10的Linux服务器。我在Windows机器上工作,我想分析远程应用程序服务器。 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. 我已经通过访问http://<ip>:9990/console以及通过来自WildFly的JConsole客户端的JMX访问来检查是否启用了通过端口访问9990端口。 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. 对于后者,我将WildFly下载到我的计算机上,转到%WILDFLY_PATH%\\bin\\jconsole.bat ,通过service:jmx:http-remoting-jmx://<ip>:9990并使用了我的凭据,它可以正常工作。 Now I want to access vía JMC, but I cannot achieve it. 现在,我想访问víaJMC,但无法实现。 I tried the following: 我尝试了以下方法:

  • Copied jboss-client.jar libraries from %WILDFLY_PATH%\\bin\\client to %JDK_HOME%\\lib\\missioncontrol\\dropins and start JMC. 将jboss-client.jar库从%WILDFLY_PATH%\\bin\\client复制到%JDK_HOME%\\lib\\missioncontrol\\dropins然后启动JMC。
  • Executed JMC from cmd and added -cp:a <location of jboss-client.jar> param, like this: 从cmd执行JMC并添加-cp:a <location of jboss-client.jar>参数,如下所示:

     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. 我试着用VisualVM的访问和使用的最后一种方法工作,但更换jmc.exe通过jvisualvm.exe和我连接到外部虚拟机没有问题。 I wonder if there's any way to achieve this using JMC. 我想知道是否有任何方法可以使用JMC来实现。

Since jmc doesn't accept the -cp flag, you have to run like this: 由于jmc不接受-cp标志,因此您必须像这样运行:

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

Some more clues might be here: https://community.oracle.com/thread/2592885?tstart=0 一些更多的线索可能在这里: https : //community.oracle.com/thread/2592885?tstart=0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM