Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeAgent killed on Install phase using version 1.7.0.92 #402

Open
jcarlosjl opened this issue Oct 9, 2024 · 0 comments
Open

CodeAgent killed on Install phase using version 1.7.0.92 #402

jcarlosjl opened this issue Oct 9, 2024 · 0 comments

Comments

@jcarlosjl
Copy link

Hi,
My deployment task is always finishing with the error:

Error Code: UnknownError
Script Name: -
Message: Failed: Failing in-progress lifecycle event after an agent restart.

I have took a look at the logs and I found this stack error

2024-10-09T22:54:00 INFO  [codedeploy-agent(6273)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.7.0-92_rpm.
2024-10-09T22:54:45 INFO  [codedeploy-agent(6273)]: [Aws::CodeDeployCommand::Client 200 45.434682 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:us-west-2:724747361462:instance/i-0911fexxxxxxxxxx")

2024-10-09T22:54:46 INFO  [codedeploy-agent(6273)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.7.0-92_rpm.
2024-10-09T22:55:00 INFO  [codedeploy-agent(6271)]: master 6271: Received CHLD - cleaning dead child process2024-10-09T22:55:00 INFO  [codedeploy-agent(6271)]: master 6271: been told to replace child 62732024-10-09T22:55:00 INFO  [codedeploy-agent(6271)]: master 6271: not enough child processes running - missing at least 1 - respawning2024-10-09T22:55:01 INFO  [codedeploy-agent(6523)]: Checking first if any deployment lifecycle event is in progress master 6271
2024-10-09T22:55:01 INFO  [codedeploy-agent(6523)]: Master process (6271) will not be shut down right now, as a deployment is already in progress
2024-10-09T22:55:01 INFO  [codedeploy-agent(6271)]: master 6271: Received TERM - stopping children and shutting down
2024-10-09T22:55:02 INFO  [codedeploy-agent(6618)]: master 6618: Spawned child 1/1
2024-10-09T22:55:03 INFO  [codedeploy-agent(6620)]: On Premises config file does not exist or not readable
2024-10-09T22:55:03 INFO  [codedeploy-agent(6618)]: Started master 6618 with 1 children
2024-10-09T22:55:03 INFO  [codedeploy-agent(6620)]: Creating client url from IMDS region and domain
2024-10-09T22:55:03 INFO  [codedeploy-agent(6620)]: CodeDeploy endpoint: https://codedeploy-commands.us-west-2.amazonaws.com
2024-10-09T22:55:03 INFO  [codedeploy-agent(6620)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandExecutor: Archives to retain is: 5}
2024-10-09T22:55:03 INFO  [codedeploy-agent(6620)]: Creating client url from IMDS region and domain
2024-10-09T22:55:03 INFO  [codedeploy-agent(6620)]: CodeDeploy endpoint: https://codedeploy-commands.us-west-2.amazonaws.com
2024-10-09T22:55:03 INFO  [codedeploy-agent(6620)]: Creating client url from IMDS region and domain
2024-10-09T22:55:03 INFO  [codedeploy-agent(6620)]: CodeDeploy endpoint: https://codedeploy-commands.us-west-2.amazonaws.com
2024-10-09T22:55:03 WARN  [codedeploy-agent(6620)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Deployment tracking file found: /opt/codedeploy-agent/deployment-root/ongoing-deployment. The agent likely restarted while running a customer-supplied script. Failing the lifecycle event.
2024-10-09T22:55:03 INFO  [codedeploy-agent(6620)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Calling PutHostCommandComplete: 'Failed' eyJiYXRjaElkIjoiMjI2YTBjNDY1YzlkZTBiMTJhZjNiZDQ5MDI1YmZlZjcvcHVibGljMDExIiwiZGVwbG95bWVudElkIjoiQ29kZURlcGxveS91cy13ZXN0LTIvcHJvZC9vcnBoZXVzOnB1YmxpYzAwNC83MjQ3NDczNjE0NjI6ZC0xUUtJNzg4MjgiLCJob3N0SWQiOiJhcm46YXdzOmVjMjp1cy13ZXN0LTI6NzI0NzQ3MzYxNDYyOmluc3RhbmNlL2ktMDkxMWZlNzk5ZWY0YmEwZWMiLCJjb21tYW5kSWQiOiJBcG9sbG9EZXBsb3lDb250cm9sU2VydmljZXxhcm46YXdzOmVjMjp1cy13ZXN0LTI6NzI0NzQ3MzYxNDYyOmluc3RhbmNlL2ktMDkxMWZlNzk5ZWY0YmEwZWN8NHwwIiwiY29tbWFuZE5hbWUiOiJJbnN0YWxsIiwiY29tbWFuZEluZGV4Ijo0LCJhdHRlbXB0SW5kZXgiOjF9
2024-10-09T22:55:03 INFO  [codedeploy-agent(6620)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.7.0-92_rpm.
2024-10-09T22:55:03 INFO  [codedeploy-agent(6620)]: [Aws::CodeDeployCommand::Client 200 0.051973 0 retries] put_host_command_complete(command_status:"Failed",diagnostics:{format:"JSON",payload:"{\"error_code\":7,\"script_name\":\"\",\"message\":\"Failed: Failing in-progress lifecycle event after an agent restart.\",\"log\":\"\"}"},host_command_identifier:"eyJiYXRjaElkIjoiMjI2YTBjNDY1YzlkZTBiMTJhZjNiZDQ5MDI1YmZlZjcvcHVibGljMDExIiwiZGVwbG95bWVudElkIjoiQ29kZURlcGxveS91cy13ZXN0LTIvcHJvZC9vcnBoZXVzOnB1YmxpYzAwNC83MjQ3NDczNjE0NjI6ZC0xUUtJNzg4MjgiLCJob3N0SWQiOiJhcm46YXdzOmVjMjp1cy13ZXN0LTI6NzI0NzQ3MzYxNDYyOmluc3RhbmNlL2ktMDkxMWZlNzk5ZWY0YmEwZWMiLCJjb21tYW5kSWQiOiJBcG9sbG9EZXBsb3lDb250cm9sU2VydmljZXxhcm46YXdzOmVjMjp1cy13ZXN0LTI6NzI0NzQ3MzYxNDYyOmluc3RhbmNlL2ktMDkxMWZlNzk5ZWY0YmEwZWN8NHwwIiwiY29tbWFuZE5hbWUiOiJJbnN0YWxsIiwiY29tbWFuZEluZGV4Ijo0LCJhdHRlbXB0SW5kZXgiOjF9") 

The instance is a small t4g with Amazon Linux 2023, ruby version ruby 3.2.2, and Codedeploy Agent version: 1.7.0.92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant