Java 从命令行转储OpenJDK内核?
谁能给我一个暗示,说明我做错了什么 因此,在RedhatAmazonAMI实例上,我试图获得我正在运行的应用程序的核心转储。我无法从jconsole.exe或jvisualvm.exe从windows机箱连接到JMX端口,即使远程端口完全打开并且JMX服务器已正确配置。我不知道为什么,所以我试图直接从JVM获取一个核心转储Cntrl-\n不起作用。所以,这里是我如何设置的事情,以获得核心转储,但它不工作,我不知道为什么Java 从命令行转储OpenJDK内核?,java,debugging,core,Java,Debugging,Core,谁能给我一个暗示,说明我做错了什么 因此,在RedhatAmazonAMI实例上,我试图获得我正在运行的应用程序的核心转储。我无法从jconsole.exe或jvisualvm.exe从windows机箱连接到JMX端口,即使远程端口完全打开并且JMX服务器已正确配置。我不知道为什么,所以我试图直接从JVM获取一个核心转储Cntrl-\n不起作用。所以,这里是我如何设置的事情,以获得核心转储,但它不工作,我不知道为什么 [ec2-user bin]$ jsadebugd 2504 -F Atta
[ec2-user bin]$
jsadebugd 2504 -F Attaching to process
ID 2504 and starting RMI services,
please wait... Debugger attached and
RMI services started.
因此,在调试器运行后,我尝试使用以下方法创建转储,但失败:
[ec2-user ~]$ jmap -dump:live,format=b,file=dump.t 2504
2504: Unable to open socket file:
target process not responding or
HotSpot VM not loaded The -F option
can be used when the target process is
not responding
[ec2-user ~]$ jmap -dump:live,format=b,file=dump.t 2504 -F
Attaching to core -F from
executable 2504, please wait... Error
attaching to core file: Can't attach
to the core file
尝试将“-F”选项置于PID之前:
jmap -dump:live,format=b,file=dump.t -F 2504
你看到了吗?