-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Error: connect EACCESS #837
Comments
It seems to be an Socket Error (reference).
First of all, figure out where is you PM2 home,
I am not sure this can help you out, have a try and feedback ;) |
Thank you very much. I have had some success by removing all references to I no longer get errors, but sadly saving my processes doesn't work after reboot. Seems strange that 0.9.6 works flawlessly, which makes me wonder whether the issues are related to a newer feature. |
The For the I prefer the use of a random user, I'd install pm2 like this (assuming node has been installed to the user with nvm):
*Note that the startup script is called with |
@soyuka 👍 |
@soyuka, I think you've given me the final piece of the puzzle that I needed. You're right that I'm installing pm2 as root using sudo. So the reason why my So running You guys rock for helping me sort this so quickly. Thank you! |
@Tjatse How can I fix this on Mac? |
@Tjatse , while trying @soyuka's solution, in the first step "npm i pm2 -g", I got EACCES error asking me for root. I'm afraid if I did it right? Thank you! |
what i do:
lastly. it was success |
thanks @medatech |
I get this same error on a Macbook Pro |
I'm too. # app.coffee
http= require 'http'
http.createServer (req,res)->
res.writeHead 200, {'Content-Type':'text/plain'}
res.end 'Hello World\n'
.listen 80,'127.0.0.1'
console.log 'Server running at http://127.0.0.1:1337/' $ sudo pm2 kill
# [PM2] PM2 stopped
$ rm -rf ~/.npm/pm2
$ rm -rf ~/.pm2
$ sudo npm uninstall pm2 --global
# unbuild pm2@0.14.3
$ npm install pm2 --global
# pm2@0.14.3 /Users/koliseoa/.nodebrew/current/lib/node_modules/pm2
$ sudo pm2 start app.coffee
#│ app │ 0 │ fork │ 66353 │ online │ 0 │ 0s │ 7.723 MB │ disabled │ $ pm2 list
# events.js:85
# throw er; // Unhandled 'error' event
# ^
# Error: connect EACCES
# at exports._errnoException (util.js:746:11)
# at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1010:19) But, resolved at the following. $ sudo chmod -R 777 ~/.pm2
$ pm2 list
#│ hoo │ 0 │ fork │ 66353 │ online │ 0 │ 2m │ 8.988 MB │ disabled │ In this case, permission of the |
You can also just do: |
@struCoder thanks,i resolved with your method. |
If you forgot to use the -u argument in |
I tried most of the suggestions, but the only one that worked was jhansen-tt's (thanks!). Make sure all the files in ~/user/.pm2 are owned by the user account! |
had the same problem on Ubuntu Server. As other people mentioned, just run |
I had a really weird issue with EACCES that was unrelated to the above things. I was in my home directory on Centos |
I do not recommend to use $ sudo pm2 start pm2.json
$ ps aux | grep PM2
# user 4318 0.1 0.0 2448152 860 s000 S+ 6:09PM 0:00.00 grep PM2
# root 3515 0.0 0.2 3130616 58836 ?? Ss 5:47PM 0:01.03 PM2 v1.1.2: God Daemon
$ pm2 list
‼️ # Error... (connect EACCES...)
$ sudo pm2 list
👍 # Working...
$ sudo pm2 kill
$ pm2 start pm2.json
$ ps aux | grep PM2
# user 4318 0.1 0.0 2448152 860 s000 S+ 6:09PM 0:00.00 grep PM2
# user 3515 0.0 0.2 3130616 58836 ?? Ss 5:47PM 0:01.03 PM2 v1.1.2: God Daemon
$ pm2 list
👍 # Working... |
@struCoder it is work for me, thanks |
I just had this problem but the cause was a bit tricky. I installed pm2 as a non-root user so I should be able to run it as non-root without any problems. But when I started ubuntu from shutdown, I opened a terminal, logged in as root and did a To fix it, I just ran I hope this helps. |
@struCoder Thanks! Solved my problem |
I've ran into the sample problem and my situation was that I needed to ran pm2 as non-root and besides the fact that I was starting it with the correct user I wasn't under the user's home dir, instead I was in /root and pm2 was creating the .pm2 file under that directory. Changing to the correct dir solved my problem. Ps: I've done the installation again just to make sure everything was setup correctly |
When I install PM2 0.12.1 with the following and run pm2 list like this...
I get the following error:
However, if I go back to an older version which I have been using in production 0.9.6, then running the following:
Then it works fine. If it's not a bug, then I'm unsure what I'm doing wrong. The docs indicate this should be pretty straight forward.
Any help would be most appreciated!
The text was updated successfully, but these errors were encountered: