jenkinsci / amazon-ecs-plugin

Amazon EC2 Container Service Plugin for Jenkins
https://plugins.jenkins.io/amazon-ecs
MIT License
193 stars 227 forks source link

ECS tasks are getting stopped by the error Stopped by Jenkins Amazon ECS PlugIn and exit code- 143 #322

Open ab-akopalli opened 1 year ago

ab-akopalli commented 1 year ago

Jenkins and plugins versions report

Environment ```text Paste the output here ```

What Operating System are you using (both controller, and any agents involved in the problem)?

We are using Linux Instance as part of the ECS. Amazon Linux AMI release 2018.03

Reproduction steps

1) This error is what we can see intermittently for our NodeJS application when we are running the npm install commands.

Expected Results

The job should pass successfully.

Actual Results

11:36:01  npm timing npm Completed in 943769ms
11:36:01  npm ERR! cb() never called!
11:36:01  
11:36:01  npm ERR! This is an error with npm itself. Please report this error at:
11:36:01  npm ERR!     <https://npm.community/>
11:36:01  
11:36:01  npm ERR! A complete log of this run can be found in:
11:36:01  npm ERR!     /root/.npm/_logs/2023-07-10T06_05_52_533Z-debug.log
11:36:01  The command '/bin/sh -c npm install --loglevel verbose' returned a non-zero code: 1
11:36:01  /home/jenkins/workspace/es_CandidatePortal_Build_develop/re/shared/mk/re.docker.mk:49: recipe for target 'docker-build' failed
11:36:01  make: *** [docker-build] Error 1

Anything else?

ECS tasks are getting stopped by the error Stopped by Jenkins Amazon ECS PlugIn and exit code- 143. The job runs for 20 mins and exits with the aforementioned error.

The plugin is not mentioning the reason for the container getting exited. Where can we find the exact reason for it?

Can you please look into this?

JanOgr commented 1 year ago

I have seen this issue multiple times myself.

Occurs when running nvm install, nothing happens for 10-15 min the sigterm is sent from the plugin.