jstack调试core文件

 

 摘自:https://stackoverflow.com/questions/37331266/jstack-throws-exception-interrogating-a-core

 

// 错误示例

1
[root@localhost rpmuser]# jstack core.2299 2 Attaching to remote server core.2299, please wait... 3 Error attaching to remote server: java.net.MalformedURLException: invalid authority: //core.2299/SARemoteDebugger 4 sun.jvm.hotspot.debugger.DebuggerException: java.net.MalformedURLException: invalid authority: //core.2299/SARemoteDebugger 5 at sun.jvm.hotspot.RMIHelper.lookup(RMIHelper.java:115) 6 at sun.jvm.hotspot.HotSpotAgent.connectRemoteDebugger(HotSpotAgent.java:517) 7 at sun.jvm.hotspot.HotSpotAgent.setupDebugger(HotSpotAgent.java:374) 8 at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:304) 9 at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:183) 10 at sun.jvm.hotspot.tools.Tool.start(Tool.java:196) 11 at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118) 12 at sun.jvm.hotspot.tools.JStack.main(JStack.java:92) 13 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 15 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16 at java.lang.reflect.Method.invoke(Method.java:498) 17 at sun.tools.jstack.JStack.runJStackTool(JStack.java:140) 18 at sun.tools.jstack.JStack.main(JStack.java:106) 19 Caused by: java.net.MalformedURLException: invalid authority: //core.2299/SARemoteDebugger 20 at java.rmi.Naming.intParseURL(Naming.java:330) 21 at java.rmi.Naming.parseURL(Naming.java:237) 22 at java.rmi.Naming.lookup(Naming.java:96) 23 at sun.jvm.hotspot.RMIHelper.lookup(RMIHelper.java:113) 24 ... 13 more

 

 

jvm产生的core.2299文件用如下方式调试

jstack /usr/bin/java core.2299

 

posted @ 2018-09-19 15:38  LiuYanYGZ  阅读(1326)  评论(0编辑  收藏  举报