从命令行进行 OpenJDK 核心转储?
谁能给我提示我做错了什么?
因此,在 Redhat(Amazon AMI 实例)上,我尝试获取正在运行的应用程序的核心转储。即使远程端口完全打开(并且 JMX 服务器已正确配置),我也无法从 Windows 盒子中的 jconsole.exe 或 jvisualvm.exe 连接到 JMX 端口。我不知道为什么,所以我试图直接从 JVM 获取核心转储(Cntrl-\ 不起作用)。所以,这就是我如何设置来获取核心转储,但它不起作用,我不知道为什么。
[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
Can anyone give me a hint to what I am doing wrong?
So, on Redhat (Amazon AMI Instance) , I am trying to get a core dump of my running application. I am unable to connect to the JMX port from jconsole.exe or jvisualvm.exe from a windows box even though the remote port is wide open (and JMX server is properly configured). I don't know why, and so I am trying to get a core dump from the JVM directly (Cntrl-\ didnt work). So, here is how I set things up to get the core dump, but it doesn't work and I don't know why.
[ec2-user bin]$
jsadebugd 2504 -F Attaching to process
ID 2504 and starting RMI services,
please wait... Debugger attached and
RMI services started.
So, after the debugger is running, I try to create the dump using this, but it fails:
[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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将“-F”选项放在 PID 之前:
Try placing the '-F' option before PID: