502 Bad Gateway

    [Ngnix] connect() failed (111: Connection refused) while connecting to upstream 에러 해결

    스프링부트를 github action과 AWS CodeDeploy를 이용하여 무중단 배포 환경을 구성하는 도중, 아래와 같은 nginx 에러를 만났다. 상세한 에러 메세지는 다음과 같다. [error] 15761#15761: *47 connect() failed (111: Connection refused) while connecting to upstream, cl"http://127.0.0.1:8080/profile", host: "localhost" 원인 upstream(http://127.0.0.1:8080/profile)에%EC%97%90) 접근할 수 없어서 발생하는 오류. 해당 포트번호가 닫혀있는데, 접근하려니 연결에 실패하는 것이다. 해당 포트번호로 부트가 떠있지 않은 상태인데, health ..