Cannot Connect JVisualVM to Wildfly?
taylor.marks May 2, 2016 2:26 PMI'm trying to connect JVisualVM, running on my local machine, to a remote machine which is running a WildFly server (version 8.1.0, to be specific.)
I didn't configure the WildFly server myself, and I don't know who did, but I do know that I can log in as an administrative user from my local machine by pointing my browser at:
https://[ip address of the remote machine]:9443/console
I also have a copy of WildFly installed on my local machine. Using it, I can connect the cli client to the remote WildFly instance like this:
$ .\jboss-cli.bat
$ connect --controller=[ip address of the remote machine]:9999
It tells me about how the server certificate might be bad - I tell it to permanently accept it. I give the admin login credentials and I'm able to connect successfully.
Despite the admin portal coming up fine in my browser, and the jboss-cli starting up fine, I can't get JVisualVM to connect. Here's what I tried:
$ .\jvisualvm.exe -cp:a C:\[path to]\jboss-client.jar
It launches fine. File > Add Remote Host
: Then I entered the IP. OK
. I right clicked on it under Remote in the tree and picked Add JMX Connection
. I entered
service:jmx:http-remoting-jmx://[ip]:9999
I checked off that I wanted to use the security credentials and entered the username and password. Checked off to save the security credentials. Left "Do not require SSL Connection" unchecked. Hit OK
. It immediately spat out the message
Cannot connect to
admin@service:jmx:http-remoting-jmx://[ip]:9999
usingservice:jmx:http-remoting-jmx://[ip]:9999
I also tried the port 9443, 9990, and 8080 instead. None of those worked. I tried https instead of http in the protocol name. That also didn't work.
What am I missing? How is it that I can access the console, and connect with jboss-client.bat, but I can't use JVisualVM? Is there some log I can use somewhere to see what's wrong? Maybe someone can point out a configuration I've missed somewhere?
Not sure if it's important or not, but my local machine is running Windows 10 with JDK8 installed. The WildFly server is using Java 8 on CentOS 6.3.