最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

Ghost

IT培训 admin 4浏览 0评论

Ghost

正如您所看到的here,我一直在尝试调试我的幽灵博客。

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

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

{
  "url": "",
  "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"
  }
}

运行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 /
[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

更新

  • 它在Ubuntu 18.04.3 LTS上运行
  • 节点版本10.16.3
  • Npm版本6.9.0

答案

这里:

回答如下:

请运行

sudo netstat -lnp | grep 8000

并查看端口8000是否已在使用中。如果是的话,请在ghost config上更改端口或禁用正在使用该端口的进程。

Ghost

正如您所看到的here,我一直在尝试调试我的幽灵博客。

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

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

{
  "url": "",
  "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"
  }
}

运行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 /
[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

更新

  • 它在Ubuntu 18.04.3 LTS上运行
  • 节点版本10.16.3
  • Npm版本6.9.0

答案

这里:

回答如下:

请运行

sudo netstat -lnp | grep 8000

并查看端口8000是否已在使用中。如果是的话,请在ghost config上更改端口或禁用正在使用该端口的进程。

与本文相关的文章

发布评论

评论列表 (0)

  1. 暂无评论