chaosblade
chaosblade copied to clipboard
How To Execute JVM Experiment in Docker Container
Issue Description
Unable to execute a Chaos Experiement on a Java Process. For example: Attacking CPU/RAM of a Docker container only attacks the container's CPU/RAM
Describe what you expected to happen
Suppose a Docker Container is running a java -jar process. I would like to attack the process's CPU/RAM. Expected: Chaosblade should apply 100% cpu/RAM on the JVM process running inside the container
Describe what happened (or what feature you want)
Feature: Attack the process of the Docker container running Java/NodeJS/(any appllication process)
Tell us your environment
OS Version: CentOS 7.5 Docker Version: 1.13.1
Anything else we need to know?
I am able to mount the chaosblade tool in the /opt directory of the container.
As mentioned above, I am able to use ChaosBlade to inject CPU/RAM on the container running in Docker. How can I perform the same on the Java process? Please let me know if you need further details. Thanks for the support!
Please use chaosblade 1.5.0 version. See chaosblade-io/chaosblade-exec-cri#1 for the usage.
Thank you @xcaspar! I will try it out and get back to you.
I am facing the following error when I try to run the blade command with the container name and pid 1.
Command: ./blade create cri jvm cpufullload --chaosblade-release ~/chaosblade-1.5.0-linux-amd64.tar.gz --container-name javaapp --pid 1
Response: err: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
I feel that chaosblade is not attaching to the target Java process. Do you have any thoughts on this?
Solved by running the command in sudo by entering sudo -i.
When I execute docker run, I am not able to destroy the Delay experiment. I tried "./blade d