title: VisualVM cannot profile; connects and other tabs work but Sampler tab gives:"Failed to create JMX connection"
body: <p>I'm trying to use VisualVM to profile an app running in EC2.  VisualVM connects to the remote machine and will show me the Overview, Monitor and VisualGC tabs (with data), but when I select the Sampler tab I get:</p>
  
  <p><em>Not available. Failed to create JMX connection to target application. Use 'Add JMX Connection' action to attach to the application.</em></p>
  
  <p>I've tried adding the JMX connection (to the EC2 public address, and the JMX port that the app was started with) to no avail.</p>
  
  <p>I can see in the VisualVM Overview tab that I've set the app's jmxsettings (and by extension that VisualVM sees those settings):</p>
  
  <pre><code>-Dcom.sun.management.jmxremote
  -Dcom.sun.management.jmxremote.port=9010
  -Dcom.sun.management.jmxremote.local.only=false
  -Dcom.sun.management.jmxremote.authenticate=false
  </code></pre>
  
  <p>I'm using an EC2 security model that leaves all ports open from EC2 to my local machine.
  I'm running the exact same JVM on both machines.
  I've run jstatd on the EC2 machine.</p>
  
  <p>Not sure what else to try.</p>