-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
App shows as started on pm2 ls but it's frozen and doesn't get a PID. #88
Comments
This is Windows 11. Experienced this same thing on several machines. |
Ok, I figured out the problem. It's a permissions problem. For some reason, if I change the Service to use my Windows User to start, then the app starts correctly. Is there a way to fix this? The error I get is as follows:
If I add Local Service as owner of the folder in which my app is installed, I can start the app but it errors directly. I actually needed to give Local Service Permissions to the containing folder where the app was installed (it was in a folder inside the $HOME folder of the user). That's what solved the issue. Anyone has any idea how to avoid this problem? Installing outside the home folder maybe? |
The problem arises if the application is located in the $HOME folder of a user. Local Service has no permissions by default to access that folder and the application will not start. I am guessing this is some typical "Windows" BS that can't be changed or fixed. I am using a .ps1 script to install my application on customer's computers, but I cannot forbid them to choose a folder inside their $Home folder. I guess I'll try to add permissions conditionally to the folder in the case that the user installs inside the home folder. |
Took me a couple of hours to find this out! Would be good if this information was added as a notice to README! |
This problem is not just "Windows BS". I wish it were. Same happens on Mac OS and Debian / Ubuntu etc. In the past, deleting the ~/.pm2 folder altogether helped but I have a case where it makes no difference. This problem has been documented here for years and no fix. At least pm2 could catch this exception and show the service as failed, but no, it shows it as running (green) but PID n/a but 0% cpu and 0b mem... |
Description
After installing pm2-installer following the instructions (
npm run configure && npm run setup
), I get an ENOENT error when installing pm2-logrotate (probably unrelated). However when I try to start my application, it shows as a process running on pm2 ls but the memory is 0B and the application doesn't start.I tried removing pm2-installer and re-installing to no avail.
If I remove pm2-installer and install
npm i -g pm2
and then start the app withpm2 start app.js
then the app starts all good.Steps to Reproduce
Environment
Running on: 21/08/2023, pm2-installer 3.4.3 with node v18.17.1 and npm 9.6.7 on win32-10.0.22621.
The text was updated successfully, but these errors were encountered: