chaosblade-box icon indicating copy to clipboard operation
chaosblade-box copied to clipboard

chaosbladefile not found

Open racheldaguenethahn opened this issue 2 years ago • 3 comments

Hi, there is already a closed issue (#38) about this subject but it doesn't help for my problem.

  • I deployed chaosblade-box-web 0.4.2 through an Alibaba ECI.
  • Into the web interface, ProbeManager menu, I added a new ssh connection to my ECS. On the ECS, the chaosblade agent is deployed in /opt/chaos/ directory
  • I created a new Experiment just to create an empty file into ECS:/tmp directory.

When I run the experiment, I have this message

2022-01-12 09:47:24.627, INFO , [EXPERIMENT-TASK-THREAD-0] c.a.c.box.service.task.stateless.DefaultActivityTaskPhaseHandler - sub task executing,task id: 1481186035317559298,phase:ATTACK, sub task id: 1481186035334336513, machines: iZgw8crd3ah122318x9qu3Z-172.16.1.178, is success: false, fail message: chaosblade file not found

Here is the content of chaosagent.log

time="2022-01-12T22:46:16+08:00" level=info msg="request: &{Method:POST URL:/chaosblade Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Accept:[application/json;charset=UTF-8] Connection:[Keep-Alive] Content-Length:[313] Content-Type:[application/x-www-form-urlencoded] User-Agent:[Apache-HttpAsyncClient/4.1.4 (Java/1.8.0_312)]] Body:0xc000116680 GetBody:<nil> ContentLength:313 TransferEncoding:[] Close:false Host:172.16.1.178:19527 Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr:172.16.1.211:48208 RequestURI:/chaosblade TLS:<nil> Cancel:<nil> Response:<nil> ctx:0xc0001166c0}"
time="2022-01-12T22:46:16+08:00" level=info msg="chaosblade: &{Headers:map[FR:S] Params:map[cmd:create file add --filepath 'pouet.txt' --directory '/tmp' --content 'pouet'  ts:107594078356]}"
time="2022-01-12T22:46:16+08:00" level=info msg="handler result: {\"Code\":514,\"Success\":false,\"Error\":\"chaosblade file not found\",\"Result\":null}"
time="2022-01-12T22:46:19+08:00" level=info msg="request: &{Method:POST URL:/ping Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Accept:[application/json;charset=UTF-8] Connection:[Keep-Alive] Content-Length:[109] Content-Type:[application/x-www-form-urlencoded] User-Agent:[Apache-HttpAsyncClient/4.1.4 (Java/1.8.0_312)]] Body:0xc000079040 GetBody:<nil> ContentLength:109 TransferEncoding:[] Close:false Host:172.16.1.178:19527 Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr:172.16.1.211:47600 RequestURI:/ping TLS:<nil> Cancel:<nil> Response:<nil> ctx:0xc000079080}"
time="2022-01-12T22:46:19+08:00" level=info msg="Receive server ping request"
time="2022-01-12T22:46:19+08:00" level=info msg="handler result: {\"Code\":200,\"Success\":true,\"Error\":\"\",\"Result\":\"success\"}"

Must I add something somewhere?

Thanks in advance Rachel

racheldaguenethahn avatar Jan 13 '22 13:01 racheldaguenethahn

you need to install chaosblade(not the box agent) to /opt/chaosblade on your subject machine

ever4Kenny avatar Feb 21 '22 05:02 ever4Kenny

Thank you ever4Kenny for your response! That means that the chaos agent deployed automatically when you add a new ssh connection through the web UI is unuseful?

How do you install chaosblade to /opt/chaosbalde? Do you have a link on a documentation? And I will need to install chaosblade on all the ECS I want to manage?

Or maybe I misunderstood.... Do you want to say that in the chaosbladebox container, I need to add /opt/chaosblade?

Thanks in advance

racheldaguenethahn avatar Feb 21 '22 05:02 racheldaguenethahn

  1. get chaosblade release in https://github.com/chaosblade-io/chaosblade/releases/tag/v1.5.0
  2. decompress the asset (e.g. chaosblade-1.5.0-linux-amd64.tar.gz) to /opt
  3. rename the directory to "chaosblade"
  4. chmod -R +x chaosblade
  5. now you can use chaosblade-box Web UI normally

enolopee avatar Mar 15 '22 09:03 enolopee