I encountered a very strange problem with TomEE 1.5.1 and VisualVM 1.7.0_09 on MAC OSX mountain lion.
After TomEE loaded some webapp.Use VisualVM connect local TomEE process take long time, and after connected the gc button is disabled and I can not take a heap dump. the VisualVM' log show some error.
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
at sun.tools.attach.BsdVirtualMachine.<init>(BsdVirtualMachine.java:90)
at sun.tools.attach.BsdAttachProvider.attachVirtualMachine(BsdAttachProvider.java:63)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
at com.sun.tools.visualvm.attach.AttachModelImpl.getVirtualMachine(AttachModelImpl.java:104)
Caused: java.io.IOException: Unable to open socket file: target process not responding or HotSpot VM not loaded
the .java_pid<pid>
file not created in tmp folder.
But if I use VisualVM to connect TomEE after start it and before any webapps loaded, The .java_pid<pid>
file will created, and VisualVM will connect to it immediately, and heap dump works.
Another workaround is modify catalina.sh to add tools.jar to the ClassPath and remove openejb javaagent, then connect after TomEE fully started works fine.
Can not reproduce on a ubuntu machine.
Heap dumps are displayed in the heap dump sub-tab in the main window. You can open binary format heap dump files (. hprof) saved on your local system or use Java VisualVM to take heap dumps of running applications.
Right-click on the left panel and select Add JMX Connection: Input the host:port combination in the Connection field in the resulting dialog box and click OK.
Probably jvm is running out of memory. I've seen it many times. Try:
Also make sure your system is not running out of memory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With