codedeploy blue-green deployment, Original Environment failed, the instance did not start

1

Edit deployment group Enter image description here Enter image description here

Auto Scaling groups Enter image description here Enter image description here Enter image description here

Deployment Enter image description here Enter image description here

The above is my configuration, and it can run successfully, but why does Original fail and does not automatically start related instances? Blue only has a machine with a load balancer mounted on it.

Problem Description:

In the AWS CodeDeploy blue-green deployment, during the third step, "Reroute traffic to replacement," the replacement instance is successfully deployed and registered to the target group. However, the original instance operation step, "BeforeBlockTraffic," fails, and the original instance never starts from the beginning to the end. Why does this happen?

Key Information:

The replacement instance is successfully deployed and registered to the target group. Failure occurs during the execution of the "BeforeBlockTraffic" step. The original instance never starts. What could be the possible reasons for the failure of the "BeforeBlockTraffic" step, and the original instance not starting?

Deployment process

Deployment lifecycle events

I verified the scripts related to the "BeforeBlockTraffic" lifecycle event to make sure they had no errors and that the scripts were executable and had the correct permissions.

I checked the health of the instances in the Auto Scaling group to make sure the original instance was healthy and able to handle the traffic.

I confirmed that the CodeDeploy agent was installed and running on my instance, looked at the agent logs, and found no errors.

I checked the deployment group configuration in the CodeDeploy console to make sure it had the Auto Scaling group and instance set up correctly.

I double-checked the Auto Scaling group's settings, including launch configuration and health checks, to make sure it was set up correctly to launch and terminate instances.

I confirmed the security group and network configuration to ensure they allow the necessary communication between instances.

Are there any other areas I can check to determine why the "BeforeBlockTraffic" hook is failing and find a solution? Are there any relevant logs or error messages that might provide more clues?

DD-Boom
질문됨 5달 전203회 조회
1개 답변
0

Check the health check configuration for your load balancer. Ensure that the health check settings are correctly configured to detect the instances' health. If the health checks fail, the instances might be marked as unhealthy, preventing them from being in service.systematically reviewing these aspects of your Blue-Green deployment configuration, logs, and associated AWS resources, you should be able to identify and address the issue causing the original environment instances to fail to start. If the problem persists, additional details from logs and AWS resource configurations may be necessary for further diagnosis.Kindly let me know what you found in the logs "/var/log/aws/codedeploy-agent/codedeploy-agent.log"

profile picture
전문가
답변함 5달 전
  • Why is the blue-green deployment Replacement instance enabled and configured successfully, but the Original instance is not enabled?

  • The log only has this information 2023-12-15T05:46:07 DEBUG [codedeploy-agent(1169)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Calling PollHostCommand: 2023-12-15T05:46:07 INFO [codedeploy-agent(1169)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.6.0-49_deb.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠