【问题标题】:how do I restart ghost on an ec2 instance如何在 ec2 实例上重新启动 ghost
【发布时间】:2014-08-19 22:21:33
【问题描述】:

我在 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 会有所帮助。

【问题讨论】:

    标签: amazon-ec2 npm ghost-blog


    【解决方案1】:

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

    pm2 restart ghost
    

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

    pm2 list
    

    【讨论】:

    • 如果 OP 出现问题,请确保您以 ghost 用户身份登录
    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-04-05
      • 2020-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-19
      • 2015-05-11
      • 2016-06-18
      相关资源
      最近更新 更多