0
mwApis:
    - # This is the only required parameter,
      # the URL of you MediaWiki API endpoint.
      uri: 'http://spgenerations.com/wiki/api.php'

在我的 linux 机器上,我可以 curl 这个 URL 并接收 api 数据。

无论使用 apt-get 安装还是开发人员安装(ngm install),这两个实例都会给我这个错误:

{"name":"parsoid","hostname":"play.projecttidal.com.KVM","pid":12636,"level":30,"levelPath":"info/service-runner","msg":"master(12636) initializing 2 workers","time":"2019-03-12T03:55:47.504Z","v":0}

{"name":"parsoid","hostname":"play.projecttidal.com.KVM","pid":12645,"level":60,"moduleName":"lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Unexpected token ...","time":"2019-03-12T03:55:47.917Z","v":0}

{"name":"parsoid","hostname":"play.projecttidal.com.KVM","pid":12636,"level":40,"message":"first worker died during startup, continue startup","worker_pid":12645,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2019-03-12T03:55:48.925Z","v":0}

就上下文而言,此处的主机名不正确,并且域已被删除。

这是我的 parsoid 配置:

// Parsoid configuration
$wgVirtualRestConfig['modules']['parsoid'] = array(
'url' => 'server.spgenerations.com',
'forwardCookies' => true
);

我已经在隐藏的巫毒教阳光下尝试了一切来让这件事发挥作用,我感到非常沮丧。花了 4 个小时修补 URL 链接无济于事,因此,如果您知道与此错误有关的任何信息,请伸出援手。

4

1 回答 1

1

检查您正在运行的 Node.JS 版本:

nodejs --version

如果是4.x:这对 Parsoid 来说太旧了。我遇到了同样的情况(Debian 9,存储库中仍然是这么旧的 Node.JS 版本..)。升级到 10.x 后,它对我来说运行良好。

我使用以下指南(请参阅使用 PPA 安装)更新到较新的 Node.JS 版本:https ://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-debian- 9

于 2019-07-21T17:56:52.027 回答