2011-03-18 6 views
2

누구든지 내가 뭘 잘못하고 있는지 힌트를 줄 수 있습니까?OpenJDK 코어 덤프를 명령 줄에서?

그래서 Redhat (Amazon AMI 인스턴스)에서 실행중인 응용 프로그램의 코어 덤프를 얻으려고합니다. 원격 포트가 활짝 열려 있고 (JMX 서버가 올바르게 구성되어 있음에도) jconsole.exe 또는 jvisualvm.exe에서 Windows 상자의 JMX 포트에 연결할 수 없습니다. 나는 왜 그런지 모르므로 직접 JVM에서 코어 덤프를 얻으려고합니다 (Cntrl- \ didnt work). 그래서, 여기에 코어 덤프를 얻기 위해 설정하는 방법이 있습니다.하지만 작동하지 않으며 이유를 모르겠습니다.

[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 
+0

본 적이 있습니까 http://stackoverflow.com/questions/151238/has-anyone-ever-got-a-remote-jmx-jconsole-to-work/3256207#3256207? – Will

답변

4

는 PID하기 전에 '-F'옵션을 배치하십시오 :

jmap -dump:live,format=b,file=dump.t -F 2504