title: VisualVM - Unable to sampler CPU/Memory
body: <p>I am unable to use the sampler on VisualVM. I am however able to see the overview &amp; monitor remotely. Here's my startup script to the java application &amp; a video that displays the issue I am experiencing. using CentOS.</p>
  
  <p><a href="https://www.youtube.com/watch?v=w4jqH4x1Rzg" rel="nofollow">https://www.youtube.com/watch?v=w4jqH4x1Rzg</a></p>
  
  <p>Startup script</p>
  
  <pre><code>screen -d -m -S SG java -server -Xmx8G -Xms1G -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:MaxGCPauseMillis=30 -XX:+UseBiasedLocking -XX:+OptimizeStringConcat -XX:+UseFastAccessorMethods -XX:+AggressiveOpts -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8766 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.ssl=false -jar spigot.jar
  </code></pre>
  
  <p>Error message</p>
  
  <pre><code>CPU sampling:
  Not available. Cannot access threads in target application. Check the logfile for details (use Help | About | Logfile).
  
  Memory sampling:
  Not available. Failed to read objects in target application. Check the logfile for details (use Help | About | Logfile).
  </code></pre>