• 카테고리

    질문 & 답변
  • 세부 분야

    프로그래밍 언어

  • 해결 여부

    미해결

chaos monkey 실습중에 문의드립니다.

21.04.11 13:27 작성 조회수 199

0

안녕하세요. 좋은 강의 감사드립니다.

카오스몽키 테스중에 윈도우 환경이라 테스트를 Postman툴을 활용해서 테스트해보고 있는데요.

아래 명령어를 POST로 입력하면 404에러가 발생합니다. 혹시 이유를 알 수 있을까요?

그리고, 강사님처럼 cmd환경에서 http명령을 직접 수행할 수 있는 툴(윈도우)이 있을까요?  감사합니다.

http://localhost:8080/actuator/chaosmonkey/assaults level=3 latencyRangeStart=2000 latencyRangeEnd=5000 latencyActive=true

{
    "timestamp""2021-04-11T04:24:40.237+0000",
    "status"404,
    "error""Not Found",
    "message""No message available",
    "path""/actuator/chaosmonkey/assaults%20%20level=3%20latencyRangeStart=2000%20latencyRangeEnd=5000%20latencyActive=true"
}

curl을 활용해서 해봐도 에러가 발생합니다.

$ curl -X POST http://localhost:8080/actuator/chaosmonkey/assaults level=3 latencyRangeStart=2000 latencyRangeEnd=5000 latencyActive=true
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 403 0 403 0 0 9372 0 --:--:-- --:--:-- --:--:-- 9595{"timestamp":"2021-04-11T04:34:47.632+0000","status":400,"error":"Bad Request","message":"Required request body is missing: public org.springframework.http.ResponseEntity<java.lang.String> de.codecentric.spring.boot.chaos.monkey.endpoints.ChaosMonkeyRestEndpoint.updateAssaultProperties(de.codecentric.spring.boot.chaos.monkey.endpoints.AssaultPropertiesUpdate)","path":"/actuator/chaosmonkey/assaults"} % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: level=3 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: latencyRangeStart=2000 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: latencyRangeEnd=5000 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: latencyActive=true

답변 1

답변을 작성해보세요.

0

https://httpie.io/docs#windows-etc

HTTPie 웹 사이트에서 보니 윈도에서는 파이선을 통해 지원하고 있나보네요.

그리고 404 에러는 해당 요청을 처리하는 핸들러가 없을 때 발생하는데 서버쪽에서 카오스멍키 설정이 제대로 된건지 확인해 볼 필요가 있겠습니다.