pm2 start fails - PID does not load, can run from node <js file> but fails in pm2
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
What's going wrong?
After running pm2 start serverjs.js file it acts like it starts and is running but fails to create a PID and it is not running nodejs.
Works in our test and dev environment.
We do login with a service account in PROD , in dev and test we login to server with personal NT account.
[PM2] Done.
┌─────┬───────────────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼───────────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 6 │ serverjs │ default │ N/A │ fork │ N/A │ 0s │ 0 │ online │ 0% │ 0b │ s.P… │ enabled │
└─────┴───────────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
Module
┌────┬──────────────────────────────┬───────────────┬──────────┬──────────┬──────┬──────────┬──────────┬──────────┐
│ id │ module │ version │ pid │ status │ ↺ │ cpu │ mem │ user │
├────┼──────────────────────────────┼───────────────┼──────────┼──────────┼──────┼──────────┼──────────┼──────────┤
│ 0 │ @jessety/pm2-logrotate │ 2.7.1 │ 8136 │ online │ 0 │ 0% │ 0b │ s.P… │
└────┴──────────────────────────────┴───────────────┴──────────┴──────────┴──────┴──────────┴──────────┴──────────┘
Supporting information
PM2 version 5.2.2
OS: Win 2019
Node: v20.5.0 , running the binaries
Setup PM2: "npm run setup" while using "pm2-installer-main" package.
Environment: PROD
$ pm2 report
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing pm2 start serverjs.js on Windows Server 2019 with PM2 5.2.2 and Node v20.5.0, then run pm2 report. Compare the PROD service-account setup with the working test and development environments; done means PM2 creates a PID and the Node process is actually running.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100