http://blog.csdn.net/yhmhappy2006/article/details/7300019
1.错误案例
- nathan@ubuntu:~/Downloads$jmap-heap3991
- AttachingtoprocessID3991,pleasewait...
- Errorattachingtoprocess:sun.jvm.hotspot.debugger.DebuggerException:Can'tattachtotheprocess
2.解决方案
1)修改/etc/sysctl.d/10-ptrace.conf文件如下:
< kernel.yama.ptrace_scope = 1 --- > kernel.yama.ptrace_scope = 0(即将1改成0)
2)重启
3.成功 4.参考http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7050524 http://www.ryanchapin.com/fv-b-4-792/Error-attaching-to-process--sun-jvm-hotspot-debugger-DebuggerException--Can-t-attach-to-the-process--SOLVED-.html http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7050524原文链接:https://www.f2er.com/ubuntu/355375.html