Reputation: 4222
I have Ghost running on an EC2 instance and I'd like to restart it after making changes to the source.
I CD'd into the ghost directory and ran the following command
sudo npm restart
I get the following errors
> [email protected] start /var/www/ghost
> node index
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:904:11)
at Server._listen2 (net.js:1042:14)
at listen (net.js:1064:10)
at net.js:1146:9
at dns.js:72:18
at process._tickDomainCallback (node.js:459:13)
at process._tickFromSpinner (node.js:390:15)
npm ERR! [email protected] start: `node index`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the ghost package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index
npm ERR! You can get their info via:
npm ERR! npm owner ls ghost
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.10.48-55.140.amzn1.i686
npm ERR! command "/usr/local/bin/node" "/usr/bin/npm" "restart"
npm ERR! cwd /var/www/ghost
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/ghost/npm-debug.log
npm ERR! not ok code 0
All I've really done is added a them to the themes folder and it's not showing up in the admin settings and I figured restarting ghost would help.
Upvotes: 0
Views: 682
Reputation: 471
Did you use these instructions? If so you can restart Ghost with:
pm2 restart ghost
In that command ghost is the name of the pm2 process which you can get from
pm2 list
Upvotes: 2
Reputation: 317
When I received the same error message, I had a node instance running on the same port. Search for the process by sudo ps aux | grep node
and kill that node process if possible.
Upvotes: 0