1. View the heap usage of the running Java docker service. The command jhsdb jmap — heap — PID 1 reports an error
Main error message:
ERROR: ptrace(PTRACE_ATTACH, ..) failed for 1: Operation not permitted
Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException: Can’t attach to the process: ptrace(PTRACE_ATTACH, ..) failed for 1: Operation not permitted
reason:
Docker has added security features since version 1.10. JDK tools such as jmap rely on Linux’s ptrace_ Attach, and docker since version 1.10, ptrace is disabled in the default seccomp configuration file. The container needs to add corresponding settings to enable the container to support the use of relevant commands.
Solution:
1. Stop docker service systemctl stop docker
2.cd /Var/lib/docker/containers/container ID Switch to container path
3.vi Hostconfig.json edit the configuration file and change the value of capadd to sys_PTRACE
4. Restart docker service systemctl start docker
Modified results:
Similar Posts:
- Docker Container Error:Failed to get D-Bus connection: Operation not permitted
- [Solved] Gitlab can clone via SSH, cannot clone via HTTP, and cannot pipeline. Prompt port 80: connection rejected
- Failed to get D-Bus connection: Operation not permitted [docker Install centos7]
- Job for docker.service failed because the control process exited with error code. See “syste…
- An error is reported when the docker command is executed in Jenkins
- Error reported by jmap command under Windows
- [Solved] Docker Container Start Error: iptables: No chain/target/match by that name
- [Solved] Bind for 0.0.0.0:80 failed: port is already allocated
- [Solved] Docker error: Error starting daemon: Error initializing network controller: list bridge addresses failed: no available network
- A dependency job for docker.service failed