PM2 v5.1.1 Address already in use Error
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I'm getting the following error:

when restarting or stoping PwaJeansWest Process.
I am not getting this error on other processes that I have running on this server, and I have to add that I have been receiving this error in the last couple of days. I haven't had any issues before, but now I have to manually kill the process ID for the address to become free.
I also haven't tweaked or updated anything on the server-side in the past month, so this is very weird. I don't know how you will reproduce this error in any other way instead of sending you a clone of the machine.
--- PM2 report ----------------------------------------------------------------
Date : Mon Nov 22 2021 09:58:36 GMT+0330 (Iran Standard Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 5.1.1
node version : 14.17.6
node path : not found
argv : /usr/bin/node,/usr/local/lib/node_modules/pm2/lib/Daemon.js
argv0 : node
user : root
uid : 0
gid : 0
uptime : 1104min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 5.1.1
node version : 14.17.6
node path : /usr/local/bin/pm2
argv : /usr/bin/node,/usr/local/bin/pm2,report
argv0 : node
user : root
uid : 0
gid : 0
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz
cpus nb : 16
freemem : 9181057024
totalmem : 16762433536
home : /root
===============================================================================
--- PM2 list -----------------------------------------------
┌─────┬────────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem
│ user │ watching │
├─────┼────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 1 │ PwaJeansWest │ default │ N/A │ fork │ 39476 │ 14h │ 13 │ online │ 0% │ 58.4mb
│ root │ disabled │
│ 3 │ jeanswest-admin │ default │ N/A │ fork │ 29271 │ 15h │ 1 │ online │ 0% │ 58.6mb
│ root │ disabled │
│ 0 │ jeanswest-club │ default │ N/A │ fork │ 33752 │ 14h │ 1 │ online │ 0.1% │ 57.5mb
│ root │ disabled │
│ 2 │ jeanswest-media │ default │ N/A │ fork │ 1404 │ 18h │ 0 │ online │ 0% │ 72.3mb
│ root │ disabled │
└─────┴────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/root/.pm2/pm2.log last 20 lines:
PM2 | 2021-11-21T19:38:27: PM2 log: App [PwaJeansWest:1] starting in -fork mode-
PM2 | 2021-11-21T19:38:27: PM2 log: App [PwaJeansWest:1] online
PM2 | 2021-11-21T19:38:33: PM2 log: App [PwaJeansWest:1] exited with code [1] via signal [SIGINT]
PM2 | 2021-11-21T19:38:33: PM2 log: App [PwaJeansWest:1] starting in -fork mode-
PM2 | 2021-11-21T19:38:33: PM2 log: App [PwaJeansWest:1] online
PM2 | 2021-11-21T19:38:39: PM2 log: App [PwaJeansWest:1] exited with code [1] via signal [SIGINT]
PM2 | 2021-11-21T19:38:39: PM2 log: App [PwaJeansWest:1] starting in -fork mode-
PM2 | 2021-11-21T19:38:39: PM2 log: App [PwaJeansWest:1] online
PM2 | 2021-11-21T19:38:44: PM2 log: App [PwaJeansWest:1] exited with code [1] via signal [SIGINT]
PM2 | 2021-11-21T19:38:44: PM2 log: App [PwaJeansWest:1] starting in -fork mode-
PM2 | 2021-11-21T19:38:44: PM2 log: App [PwaJeansWest:1] online
PM2 | 2021-11-21T19:38:50: PM2 log: App [PwaJeansWest:1] exited with code [1] via signal [SIGINT]
PM2 | 2021-11-21T19:38:50: PM2 log: App [PwaJeansWest:1] starting in -fork mode-
PM2 | 2021-11-21T19:38:50: PM2 log: App [PwaJeansWest:1] online
PM2 | 2021-11-21T19:38:56: PM2 log: App [PwaJeansWest:1] exited with code [1] via signal [SIGINT]
PM2 | 2021-11-21T19:38:56: PM2 log: App [PwaJeansWest:1] starting in -fork mode-
PM2 | 2021-11-21T19:38:56: PM2 log: App [PwaJeansWest:1] online
PM2 | 2021-11-21T19:39:02: PM2 log: App [PwaJeansWest:1] exited with code [1] via signal [SIGINT]
PM2 | 2021-11-21T19:39:02: PM2 log: App [PwaJeansWest:1] starting in -fork mode-
PM2 | 2021-11-21T19:39:02: PM2 log: App [PwaJeansWest:1] online
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 with the supplied PM2 report and daemon logs, focusing on the repeated PwaJeansWest restart sequence and the address-already-in-use error. Reproduce the stop or restart behavior on PM2 5.1.1 with Node.js 14.17.6 and Linux. Done means identifying why the process ID must be killed manually and verifying that the affected process can be stopped or restarted without leaving its address occupied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, linux, node.js
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100