Access WildFly10 with JMX fails

2019-09-14 13:05发布

问题:

I'm trying to acces a virtualbox machine with a WildFly10 via JMX from my local machine. In the JConsole I'm using the following parameters:

remote process: service:jmx:http-remoting-jmx://172.28.128.3:9990
username: test
password: test

Both username and password works, because I can acces WildFly with that username/password on 172.28.128.3:9990

The message is the following:

Secure connection failed. Retry insecurely?

If i click yes, then this appears:

Connection failed: Retry?

What am I missing?

EDIT:

I've seen that if I execute Jconsole.exe -debug I can see this error at the connection time:

java.net.MalformedURLException: Unsupported protocol: http-remoting-jmx

回答1:

You need to include the $JBOSS_HOME/bin/client/jboss-client.jar in the JConsole class path:

 [steve@steves-mbp wildfly-10.1.0.Final]$ jconsole \
  -J-Djava.class.path=$JAVA_HOME/lib/jconsole.jar:$JBOSS_HOME/bin/client/jboss-client.jar

Your service:jmx:http-remoting-jmx://172.28.128.3:9990 URL will then work, or at least something similar did it for me.