MediaWiki-VisualEditor扩展:(curl错误:28)已达到超时
在尝试借助Visual Editor编辑页面时,我显示了以下错误(以前还无法工作): 我认为以上是端口问题,因为在我执行命令时,由于某些奇怪的原因,无法访问端口8142:MediaWiki-VisualEditor扩展:(curl错误:28)已达到超时,curl,port,mediawiki,parsoid,mediawiki-visualeditor,Curl,Port,Mediawiki,Parsoid,Mediawiki Visualeditor,在尝试借助Visual Editor编辑页面时,我显示了以下错误(以前还无法工作): 我认为以上是端口问题,因为在我执行命令时,由于某些奇怪的原因,无法访问端口8142: curl -L http://40.68.204.191:8142 并收到以下答复: curl: (7) Failed to connect to 40.68.204.191 port 8142: Connection timed out 我通过执行以下操作安装了VisualEditor扩展: sudo npm cache
curl -L http://40.68.204.191:8142
并收到以下答复:
curl: (7) Failed to connect to 40.68.204.191 port 8142: Connection timed out
我通过执行以下操作安装了VisualEditor扩展:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
/opt/bitnami/apps/mediawiki/htdocs/extensions/VisualEditor
目录中
我已经安装了1.32版(最新的稳定MediaWiki)wfLoadExtension( 'VisualEditor' );
及
# Configure Parsoid to point to your MediaWiki instances.
mwApis:
- # This is the only required parameter,
# the URL of you MediaWiki API endpoint.
# uri: 'http://localhost/api.php'
uri: 'http://40.68.204.191/w/api.php'
# before >> uri: 'http://localhost/w/api.php'
# The "domain" is used for communication with Visual Editor
# and RESTBase. It defaults to the hostname portion of
# the `uri` property below, but you can manually set it
# to an arbitrary string.
# domain: 'localhost' # optional
domain: '40.68.204.191' # optional
# before >> domain: 'localhost' # optional
/etc/SELINUX
文件夹中的semanage.conf文件末尾添加了SELINUX=permissive
http://40.68.204.191:8142/
:
下面显示了我在Google Chrome中导航到w/api.php
后的结果:
下面显示了尝试导航到http://40.68.204.191:8000/
:
执行命令netstat-plantu
后,我将显示以下内容:
我试过这个:sudo lsof-I-n-p | grep LISTEN
,结果是:
以下内容包含在/var/log/parsoid/parsoid.log
{"name":"parsoid","hostname":"MediaWiki","pid":20623,"level":30,"levelPath":"info/service-runner","msg":"master(20623) initializing 1 workers","time":"2019-02-11T17:17:27.490Z","v":0}
{“name”:“parsoid”,“hostname”:“MediaWiki”,“pid”:20644,“level”:60,“moduleName”:./src/lib/index.js”,“levelPath”:“fatal/service runner/worker”,“msg”:“意外令牌{”,“time”:“2019-02-11T17:17:29.061Z”,“v”:0}
{“name”:“parsoid”,“hostname”:“MediaWiki”,“pid”:20623,“level”:40,“message”:“首次工作人员在启动过程中死亡,继续启动”,“worker_pid”:20644,“exit_code”:1,“startup_尝试”:1,“levelPath”:“warn/service runner/master”,“msg”:“首次工作人员在启动过程中死亡,继续启动”,“time”:“2019-02-11T17:17:30.091Z”,“v”:0}
被杀死的
{“name”:“parsoid”,“hostname”:“MediaWiki”,“pid”:22289,“level”:30,“levelPath”:“info/service runner”,“msg”:“master(22289)初始化1个worker”,“time”:“2019-02-11T17:43:47.240Z”,“v”:0}
{“name”:“parsoid”,“hostname”:“MediaWiki”,“pid”:22298,“level”:60,“moduleName”:./src/lib/index.js”,“levelPath”:“fatal/service runner/worker”,“msg”:“意外令牌{”,“time”:“2019-02-11T17:43:48.803Z”,“v”:0}
{“name”:“parsoid”,“hostname”:“MediaWiki”,“pid”:22289,“level”:40,“message”:“第一个工作人员在启动期间死亡,继续启动”,“worker_pid”:22298,“exit_code”:1,“startup_尝试”:1,“levelPath”:“warn/service runner/master”,“msg”:“第一个工作人员在启动期间死亡,继续启动”,“time”:“2019-02-11T17:43:49.815Z”,“v”:0}
被杀死的
{“name”:“parsoid”,“hostname”:“MediaWiki”,“pid”:14815,“level”:30,“levelPath”:“info/service runner”,“msg”:“master(14815)初始化1个worker”,“time”:“2019-02-14T20:49:48.472Z”,“v”:0}
{“name”:“parsoid”,“hostname”:“MediaWiki”,“pid”:14829,“level”:60,“moduleName”:./src/lib/index.js”,“levelPath”:“fatal/service runner/worker”,“msg”:“意外令牌{”,“time”:“2019-02-14T20:49:50.113Z”,“v”:0}
{“name”:“parsoid”,“hostname”:“MediaWiki”,“pid”:14815,“level”:40,“message”:“首次工作人员在启动期间死亡,继续启动”,“worker_pid”:14829,“exit_code”:1,“startup_尝试”:1,“levelPath”:“warn/service runner/master”,“msg”:“首次工作人员在启动期间死亡,继续启动”,“time”:“2019-02-14T20:49:51.131Z”,“v”:0}要运行
Parsoid 0.9.0
,您的节点应该是版本6或更新版本,要检查此运行:
node -v
如果至少不是版本6,请尝试更新节点,您应该能够通过以下方式完成此操作:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
尝试将Config.yaml
和LocalSettings.php
中的地址更改为localhost
如果您得到一个
HTTP:401
按照说明进行操作好的,似乎这里的问题是Parsoid。应该显示Parsoid文档。您确定它正在运行的端口是该端口吗?您确定它正在运行吗?如果这两个问题的答案都是肯定的,则可能与防火墙阻止请求有关。如果您导航到?通过:8000访问时,我遇到相同的错误(见上文)@Dylan I刚刚执行了service parsoid restart
,没有收到任何错误。以下是安装MediaWiki的虚拟机的详细信息:静态主机名:MediaWiki图标名称:计算机虚拟机机箱:虚拟机虚拟化:microsoft操作系统:Ubuntu 16.04.5 LTS内核:Linux 4.15.0-1036-azure体系结构:x86-64
I假设我已经安装了Parsoid作为一个软件包,因为我确实按照这里的安装说明进行了安装:谢谢Dylan。我也尝试过了,但仍然没有成功:Nodejs-v
displays:v8.15.0npm-v
is现在是:6.4.1我仍然会遇到与以前相同的错误,Parsoid.log看起来又几乎相同了你在运行f parsoid吗?我是在执行:curl之后得到的http://localhost:8142/version
{“名称”:“parsoid”,“版本”:“0.10.0”}
0.10.0版是的!我还将LocalSettings.php和Config.yaml更改为指向localhost,而不是指向40.68.204.191。现在,在我的wiki中尝试使用VisualEditor时,我得到了
sudo npm cache clean -f
sudo npm install -g n
sudo n stable