What's going wrong?
ERROR Unhandled 'error' event for everything
How could we reproduce this issue?
pm2 --kill
OR anything
pm2 --version
events.js:182
throw er; // Unhandled 'error' event
^
Error: connect EPERM //./pipe/rpc.sock
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1136:14)
node.exe needs to be force killed
PM2 version: `2.4.6`
Node version: `v8.0.0`
Windows
If you use Bash on Windows the problem is coming from that, they didn't finish implementing all the syscalls necessary to run PM2 on this subsystem, can't help you on that.
not in that case. i have used native windows powershell to start pm2
You might want to checkout that you have the ~/.pm2 directory readable and writable. Should be under C:/Users/username/.pm2 under Windows
yes, it is both read/write able As defaulting. may the writes failed for full Drive As it is Not much space left on it As i noticed.. that would explain a lot.
I just ran into this issue and if this might help someone it was because I ran pm2 list with the admin user and tried to do the pm2 kill with my normal user. Simply kill the process with the right user to solve this issue.
you need to run it as administrator.
@manny42 Does that mean I can't have multiple PM2 daemons on a Windows system, despite running under separate users? :frowning_face:
Your "CMD" needs to be ran in admin as mentionned @suyy10, that fixed it for me.
Most helpful comment
I just ran into this issue and if this might help someone it was because I ran
pm2 listwith the admin user and tried to do thepm2 killwith my normal user. Simply kill the process with the right user to solve this issue.