asbazq / onlineJudge

0 stars 0 forks source link

codeDeploy Error #2

Open asbazq opened 1 year ago

asbazq commented 1 year ago

The deployment failed because no instances were found for your deployment group. Check your deployment group settings to make sure the tags for your Amazon EC2 instances or Auto Scaling groups correctly identify the instances you want to deploy to, and then try again.

asbazq commented 1 year ago

어떤 인스턴스에 배포를 해야할지 식별을 할 수 없어 에러 발생 -> ec2의 태그와 CodeDeploy의 배포그룹의 Name 태그를 같게 설정

asbazq commented 1 year ago

The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.

asbazq commented 1 year ago

$ cat /var/log/aws/codedeploy-agent/codedeploy-agent.log 명령어를 통해 codedeploy-agent 로그 확인 결과 command_status:"Failed",diagnostics:{format:"JSON",payload:"{\"error_code\":5,\"script_name\":\"\",\"message\":\"can't find user for ec2-user\",\"log\":\"\"}"} 혹은 aws에서 codeDeploy에서 view evnets를 통해 install 부분에서 error로 can't find user for ec2-user라는 로그를 얻을 수 있다. Amazon Machine Image(AMI)를 ubuntu를 사용했을 경우, username은 ubuntu로 username을 ec2-user에서 ubuntu로 바꿔준다.