Skip to content

PM2 Starts and then immediately Errors #5975

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

Open
StefonSimmons opened this issue Apr 18, 2025 · 0 comments
Open

PM2 Starts and then immediately Errors #5975

StefonSimmons opened this issue Apr 18, 2025 · 0 comments

Comments

@StefonSimmons
Copy link

PM2 is managing http-server on port 8080. PM2 is starting up with an online status and then erroring out soon after in my AWS Amplify build pipeline. Below is the PM2 report:

2025-04-18T19:08:39.650Z [INFO]: # Executing command: npx pm2 start http-server -- './dist' -p 8080

2025-04-18T19:08:42.928Z [WARNING]: npx: installed 134 in 3.229s

2025-04-18T19:08:43.089Z [INFO]: [PM2] Starting /codebuild/output/src4123211847/src/websites-datadogon/node_modules/.bin/http-server in fork_mode (1 instance)

2025-04-18T19:08:43.103Z [INFO]: [PM2] Done.

2025-04-18T19:08:43.118Z [INFO]: ┌────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
                                 │ id │ name           │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
                                 ├────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
                                 │ 0  │ http-server    │ default     │ 1.0.0   │ fork    │ 1623     │ 0s     │ 0    │ online    │ 0%       │ 27.8mb   │ root     │ disabled │
                                 └────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

2025-04-18T19:08:43.636Z [INFO]: # Executing command: echo "report status"

                                 report status

                                 # Executing command: npx pm2 report

2025-04-18T19:08:47.268Z [WARNING]: npx: installed 134 in 3.59s

2025-04-18T19:08:47.437Z [INFO]:

 
2025-04-18T19:08:47.437Z [INFO]: --- PM2 report ----------------------------------------------------------------
                                 Date                 : Fri Apr 18 2025 19:08:47 GMT+0000 (Coordinated Universal Time)
                                 ===============================================================================
                                 --- Daemon --------------------------------------------------------------------
                                 pm2d version         : 6.0.5
                                 node version         : 14.21.3
                                 node path            : /root/.nvm/versions/node/v14.21.3/bin/npx
                                 argv                 : /root/.nvm/versions/node/v14.21.3/bin/node,/root/.npm/_npx/1544/lib/node_modules/pm2/lib/Daemon.js

2025-04-18T19:08:47.437Z [INFO]: argv0                : /root/.nvm/versions/node/v14.21.3/bin/node
                                 user                 : undefined
                                 uid                  : 0
                                 gid                  : 0

2025-04-18T19:08:47.437Z [INFO]: uptime               : 0min

2025-04-18T19:08:47.438Z [INFO]: ===============================================================================
                                 --- CLI -----------------------------------------------------------------------
                                 local pm2            : 6.0.5
                                 node version         : 14.21.3
                                 node path            : /root/.nvm/versions/node/v14.21.3/bin/npx
                                 argv                 : /root/.nvm/versions/node/v14.21.3/bin/node,/root/.npm/_npx/1697/bin/pm2,report

2025-04-18T19:08:47.438Z [INFO]: argv0                : node
                                 user                 : undefined
                                 uid                  : 0
                                 gid                  : 0
                                 ===============================================================================
                                 --- System info ---------------------------------------------------------------

2025-04-18T19:08:47.438Z [INFO]: arch                 : x64
                                 platform             : linux
                                 type                 : Linux

2025-04-18T19:08:47.455Z [INFO]: cpus                 : Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz

2025-04-18T19:08:47.455Z [INFO]: cpus nb              : 4
                                 freemem              : 841699328
                                 totalmem             : 7981080576
                                 home                 : /root
2025-04-18T19:08:47.457Z [INFO]: ===============================================================================
2025-04-18T19:08:47.457Z [INFO]: --- PM2 list ------------------------------------------------------------------
2025-04-18T19:08:47.459Z [INFO]: ┌────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
                                 │ id │ name           │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
                                 ├────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
                                 │ 0  │ http-server    │ default     │ 1.0.0   │ fork    │ 0        │ 0      │ 15   │ errored   │ 0%       │ 0b       │ root     │ disabled │
                                 └────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
2025-04-18T19:08:47.459Z [INFO]: ===============================================================================
                                 --- Daemon logs ---------------------------------------------------------------
2025-04-18T19:08:47.461Z [INFO]: /root/.pm2/pm2.log last 20 lines:
2025-04-18T19:08:47.461Z [INFO]: PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] exited with code [1] via signal [SIGINT]
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] starting in -fork mode-
2025-04-18T19:08:47.461Z [INFO]: PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] online
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] exited with code [1] via signal [SIGINT]
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] starting in -fork mode-
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] online
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] exited with code [1] via signal [SIGINT]
2025-04-18T19:08:47.461Z [INFO]: PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] starting in -fork mode-
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] online
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] exited with code [1] via signal [SIGINT]
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] starting in -fork mode-
2025-04-18T19:08:47.461Z [INFO]: PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] online
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] exited with code [1] via signal [SIGINT]
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] starting in -fork mode-
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] online
2025-04-18T19:08:47.461Z [INFO]: PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] exited with code [1] via signal [SIGINT]
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] starting in -fork mode-
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] online
                                 PM2        | 2025-04-18T19:08:43: PM2 log: App [http-server:0] exited with code [1] via signal [SIGINT]
                                 PM2        |
2025-04-18T19:08:47.462Z [INFO]: 2025-04-18T19:08:43: PM2 log: Script /codebuild/output/src4123211847/src/websites-datadogon/node_modules/.bin/http-server had too many unstable restarts (16). Stopped. "errored"


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