Ghost - 无法连接到引导套接字 (localhost 8000) ECONNREFUSED

Com*_*ode 6 linux node.js ghost-blog

我已经尝试了很长一段时间来调试我的幽灵博客,正如你可以在这里看到的。

我已经取得了一些进展,问题似乎与 Ghost 引导套接字上的错误有关。

config.production.json的 Digital Ocean 服务器是:

{
  "url": "https://www.mifitnessfacil.com",
  "server": {
    "port": 2369,
    "host": "127.0.0.1"
  },
  "database": {
    "client": "mysql",
    "connection": {
      "host": "localhost",
      "user": "root",
      "password": "foobar",
      "database": "foobar"
    }
  },
  "mail": {
    "transport": "Direct"
  },
  "logging": {
    "transports": [
      "file",
      "stdout"
    ]
  },
  "process": "systemd",
  "paths": {
    "contentPath": "/var/www/ghost/content"
  },
  "bootstrap-socket": {
    "port": 8000,
    "host": "localhost"
  }
}
Run Code Online (Sandbox Code Playgroud)

运行时ghost run我得到:

[2019-10-03 14:24:00] INFO Ghost is running in production...
[2019-10-03 14:24:00] INFO Your site is now available on https://www.mifitnessfacil.com/
[2019-10-03 14:24:01] INFO Ctrl+C to shut down
[2019-10-03 14:24:01] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-10-03 14:24:01] WARN Tries: 0
[2019-10-03 14:24:01] WARN Retrying...
[2019-10-03 14:24:01] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-10-03 14:24:01] WARN Tries: 1
[2019-10-03 14:24:01] WARN Retrying...
[2019-10-03 14:24:01] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-10-03 14:24:01] WARN Tries: 2
[2019-10-03 14:24:01] WARN Retrying...
[2019-10-03 14:24:01] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-10-03 14:24:01] INFO Ghost boot 3.299s
Run Code Online (Sandbox Code Playgroud)

更新

  • 它运行于Ubuntu 18.04.3 LTS
  • 节点版本10.16.3
  • npm 版本 6.9.0

回答

这里:/sf/answers/4079205931/

Com*_*ode 4

更新

bootstrap-socket从已解决的问题中删除config.production.json,但在访问我的网站时我仍然遇到这个问题502 Bad Gateway nginx/1.14.0 (Ubuntu)

更新2及解决方案:

https://github.com/TryGhost/Ghost-CLI/issues/1017