title: Connect JVisualVM to a Remote Wildfly Instance?
body: <p>I'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.)</p>
  
  <p>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:</p>
  
  <pre><code>https://[ip address of the remote machine]:9443/console
  </code></pre>
  
  <p>Note that it's <strong>https</strong>, not ordinary http, and that the port for that has been set to <strong>9443</strong> (I think the default is 8080 or 9990 or something... IDK, I saw a lot of port numbers online. I have been explicitly told that http was disabled for this WildFly server).</p>
  
  <p>I can SSH into the remote machine. I can navigate to the <code>bin</code> directory for WildFly and run <code>jboss-client.sh</code>. I have to connect on port <strong>9999</strong> (I think the default is 9990 for that?)</p>
  
  <p>I copied the <code>jboss-client.jar</code> (under <code>bin/client</code>) to my local machine and ran JVisualVM from the command line like this:</p>
  
  <pre><code>.\jvisualvm.exe -cp:a C:\[path to]\jboss-client.jar
  </code></pre>
  
  <p>It launches fine. <code>File &gt; Add Remote Host</code>: Then I entered the IP. <code>OK</code>. I right clicked on it under Remote in the tree and picked <code>Add JMX Connection</code>. I entered</p>
  
  <pre><code>service:jmx:http-remoting-jmx://[ip]:9999
  </code></pre>
  
  <p>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 <code>OK</code>. It immediately spat out the message</p>
  
  <blockquote>
    <p>Cannot connect to <code>admin@service:jmx:http-remoting-jmx://[ip]:9999</code> using <code>service:jmx:http-remoting-jmx://[ip]:9999</code></p>
  </blockquote>
  
  <p>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.</p>
  
  <p>What am I missing? How is it that I can access the console, and connect with jboss-client.sh, 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?</p>
  
  <p>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 6 on CentOS 6.3.</p>