6

When I click on the Heap Dump button in VisualVM 1.3.8, I get the following error:

Cannot take heap dump for user@localhost:9090

Am I missing a setting somewhere?

Edit #1

Environment is:

  • RHEL6
  • Tomcat 7.0.68
  • Java 1.7.0_45

Options are:

export CATALINA_OPTS="-Dcom.sun.management.jmxremote=true\
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=true \
-Djava.rmi.server.hostname=x.x.x.x \
-Dcom.sun.management.jmxremote.password.file=/file_to_pwd \
-Dcom.sun.management.jmxremote.access.file=/file_to_access \
-Xms1256m \
-Xmx1256m \
-XX:PermSize=768m \
-XX:MaxPermSize=768m \
-XX:+CMSClassUnloadingEnabled \
-Dfile.encoding=UTF-8 \
-XX:+CMSClassUnloadingEnabled \
-XX:+UseConcMarkSweepGC \
-server"

Edit #2

Here is the listener for JMX.

<Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiRegistryPortPlatform="9090" rmiServerPortPlatform="9091" />
8
  • Please provide some details of the environment. May 30, 2017 at 18:54
  • Added details for the environment
    – TechFanDan
    May 30, 2017 at 19:00
  • jvisualvm -J-Dnetbeans.logger.console=true should show some details of the error on the console. May 30, 2017 at 19:17
  • I'm using VisualVM binary on Windows. Does this still apply?
    – TechFanDan
    May 30, 2017 at 19:18
  • I am sure it applies :) May 30, 2017 at 19:21

2 Answers 2

12

Here's what I ended up doing. We had JDK 1.8 also present on the server.

cd /path/to/java/jdk1.8.0_65/
./jmap -dump:format=b,file=/path/to/dump/tomcat_dump.bin PID

Open /path/to/dump/tomcat_dump.bin using VisualVM (I had to use Filezilla to bring it to my workstation).

0

One possible reason is permission issue. In Windows right click on the jvisualvm executable and run as administrator solves this issue.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.