aws / aws/aws-codedeploy-agent

CodeAgent killed on Install phase using version 1.7.0.92

Abierto
#402 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
337
Forks
195
Merge medio
10 h 54 min
PR fusionados (30 d)
4

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con los registros proporcionados del agente de CodeDeploy en Amazon Linux 2023 usando Ruby 3.2.2 y la versión del agente 1.7.0.92, centrándote en el reinicio durante el evento del ciclo de vida Install y en el archivo de seguimiento del deployment en curso. Reproduce el fallo en el entorno t4g indicado; se considera terminado cuando el evento Install se gestiona correctamente después de un reinicio del agente, en lugar de notificarse como fallido.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
aws, linux, ruby
Área
cloud, devops
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.