When you delete a website the nodejs app started with PM2 is not deleted #328

Closed
opened 2026-04-05 20:26:58 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @fstrazzante on 10/24/2023

CloudPanel version(s) affected

2.3.2

Description

If you start a PM2 job on and then you delete the website with Cloudpanel Frontend, the port(and the job) remain in use.
Workaround: Find the job with
lsof -i :5000
and kill it with
sudo kill <PID>

How to reproduce

  • create a Nodejs website on port N
  • deploy the Nodejs app. (I copied the file to the remote folder)
  • start the app with pm2
  • ... the app is working ...
  • delete the website with cloudpanel
  • create a new website with cloudpanel on port N
  • ... and I got the error: Port already in use

Possible Solution

No response

Additional Context

(I'm using Ubuntu 22.04)
It might be not related with CloudPanel but with PM2 or with the ubuntu user management. My argument is that if you delete the website and the user, then also this job should stop, but that could just be me. What do you think?
(thank you for this amazing software)

*Originally created by @fstrazzante on 10/24/2023* ### CloudPanel version(s) affected 2.3.2 ### Description If you start a PM2 job on and then you delete the website with Cloudpanel Frontend, the port(and the job) remain in use. Workaround: Find the job with `lsof -i :5000` and kill it with `sudo kill <PID>` ### How to reproduce - create a Nodejs website on port N - deploy the Nodejs app. (I copied the file to the remote folder) - start the app with pm2 - ... the app is working ... - delete the website with cloudpanel - create a new website with cloudpanel on port N - ... and I got the error: Port already in use ### Possible Solution _No response_ ### Additional Context (I'm using Ubuntu 22.04) It might be not related with CloudPanel but with PM2 or with the ubuntu user management. My argument is that if you delete the website and the user, then also this job should stop, but that could just be me. What do you think? (thank you for this amazing software)
Sign in to join this conversation.