0

我在 EC2 实例上运行了 Ghost,我想在对源进行更改后重新启动它。

我 CD 到 ghost 目录并运行以下命令

sudo npm restart

我收到以下错误

> ghost@0.4.2 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! ghost@0.4.2 start: `node index`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the ghost@0.4.2 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

我真正所做的只是将它们添加到主题文件夹中,并且它没有显示在管理设置中,我认为重新启动 ghost 会有所帮助。

4

2 回答 2

2

您是否使用了这些说明?如果是这样,您可以使用以下命令重新启动 Ghost:

pm2 restart ghost

在该命令中,ghost 是您可以从中获取的 pm2 进程的名称

pm2 list
于 2014-08-23T16:48:03.450 回答
0

当我收到相同的错误消息时,我有一个节点实例在同一个端口上运行。如果可能,搜索进程sudo ps aux | grep node并终止该节点进程。

于 2014-08-19T22:34:01.753 回答