Jump to navigation Jump to search

About this board

How to start parsoid automatically for ubuntu 18.04?

Summary by Arlolra

Use the init scripts from the deb

Sokote zaman (talkcontribs)


What should I do to activate and start parsoid automatically when the server and client starts working?

ubuntu 18.04

php7.2-fpm & nginx


Arlolra (talkcontribs)
Sokote zaman (talkcontribs)

thank you. Please explain exactly what to do?

Arlolra (talkcontribs)

How did you install Parsoid?

Sokote zaman (talkcontribs)

sudo apt install dirmngr

sudo apt-key advanced --keyserver --recv-keys 90E9F83F22250DD7


sudo apt-add-repository "deb jessie-mediawiki main"

apt-get install software-properties-common

sudo apt install apt-transport-https

sudo apt update

sudo apt update && sudo apt install parsoid

MediaWiki 1.31.0 (e9afac4)

PHP 7.2.5-0ubuntu0.18.04.1 (fpm-fcgi)

MariaDB 10.1.29-MariaDB-6

ICU 60.2

Lua 5.1.5

ubuntu 18.04


parsoid version (0.9.0all)

VisualEditor 0.1.0 (13a585a)


Arlolra (talkcontribs)

In that case, the it should already be running and can controlled with the service command.

Sokote zaman (talkcontribs)


tanks (talkcontribs)

Hi, complete novice here. Way over my head. Installed Parsoid and Visual Editor on Mediawiki (Bitnami on AWS). Website says "internal api error" when trying to use VIsual Editor. Using PuTTY to access localsettings and Parsoid config.yaml, but I get back "no write permission". Try looking up settings.js (or localsettings.js) for Parsoid, but those are not found.

Arlolra (talkcontribs)

Did you confirm your wiki was working without the VE/Parsoid combo? Probably a good place to start.

Whatamidoing (WMF) (talkcontribs)
Reply to "Write Permission Denied"

Failed API request with warn/api/esockettimedout with VisualEditor on Windows

Czech.Fox (talkcontribs)

This is my solution for others having this issue.

Windows machine - Windows Server 2008 R2, PHP 7.1.14 (php-cgi.exe), NodeJS 8.9.1 LTS, Parsoid 0.8.0, MediaWiki 1.30, SQLite database, Firewall open local port 8000 on nodejs.exe This solution is for all having a working VisualEditor but randomly and often gets "Error loading data from server: Could not connect to the server" when opening VisualEditor.

The cause is in enabled caching in LocalSettings.php. Parsoid is calling MediaWiki API but the request may take for bigger and heavily edited pages even 60s+. So, the request fails with "esockettimedout" exception which is subsequently passed to the VisualEditor giving this error popup.

My original failing setting used to be:

$wgMainCacheType = CACHE_DB;
$wgMessageCacheType = CACHE_DB;
$wgParserCacheType = CACHE_DB;
$wgSessionCacheType = CACHE_DB;
$wgLanguageConverterCacheType = CACHE_DB;

My new working setting is:

$wgMainCacheType = CACHE_DB;
$wgMessageCacheType = CACHE_NONE;
$wgParserCacheType = CACHE_NONE;
$wgSessionCacheType = CACHE_DB;
$wgLanguageConverterCacheType = CACHE_NONE;

I got this inspiration from topic where @Arlolra was wondering if it is by caching.

Whatamidoing (WMF) (talkcontribs)

Thank you for this!

Would you like to add it to VisualEditor/Recipes, where someone was trying to collect some tips and tricks?

Reply to "Failed API request with warn/api/esockettimedout with VisualEditor on Windows"

mediawiki into virtual machine problem with visualeditor

Summary by Arlolra

Make sure you can access the MediaWiki API from the Parsoid machine. (talkcontribs)

I have installed mediawiki in a VM (ubuntu server 16.04) following setup given in mediawiki website. Files config.yaml and LocalSettings.php have the same 'domain' tag and the urls are reaching the correct site. As I connect from the host system I make some port forward on the VM network

host (browser) port guest (VM) port 2222 22 8081 80 8142 8142

I browe through the site ok, but when I try to edit a page with visualeditor, I get this error

Error loading data from server: apierror-visualeditor-docserver-http: HTTP 500

And in parsoid.log I get this:

{"name":"../src/lib/index.js","hostname":"pc","pid":3697,"level":40,"logType":"warn/api","wiki":"wiki$0","title":"Main_Page","oldId":null,"reqId":null,"userAgent":"VisualEditor-MediaWiki/1.30.0","msg":"Failed API request, {\"error\":{},\"retries-remaining\":1}","longMsg":"Failed API request,\n{\"error\":{},\"retries-remaining\":1}","levelPath":"warn/api","time":"2018-02-06T00:14:34.873Z","v":0}

{"name":"../src/lib/index.js","hostname":"pc","pid":3697,"level":40,"logType":"warn/api","wiki":"wiki$0","title":"Main_Page","oldId":null,"reqId":null,"userAgent":"VisualEditor-MediaWiki/1.30.0","msg":"Failed API request, {\"error\":{},\"retries-remaining\":0}","longMsg":"Failed API request,\n{\"error\":{},\"retries-remaining\":0}","levelPath":"warn/api","time":"2018-02-06T00:14:34.876Z","v":0}

{"name":"parsoid","hostname":"pc","pid":3697,"level":60,"err":{"message":"Config Request failure for \"uri\": Error: Invalid URI \"uri\"","name":"../src/lib/index.js","stack":"../src/lib/index.js: Config Request failure for \"uri\": Error: Invalid URI \"uri\"\n    at ConfigRequest.ApiRequest._requestCB (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:415:15)\n    at self.callback (/usr/lib/parsoid/node_modules/request/request.js:186:22)\n    at emitOne (events.js:96:13)\n    at Request.emit (events.js:188:7)\n    at Request.init (/usr/lib/parsoid/node_modules/request/request.js:274:17)\n    at new Request (/usr/lib/parsoid/node_modules/request/request.js:128:8)\n    at request (/usr/lib/parsoid/node_modules/request/index.js:53:10)\n    at ConfigRequest.ApiRequest.request (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:336:9)\n    at ConfigRequest.ApiRequest._requestCB (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:412:9)\n    at self.callback (/usr/lib/parsoid/node_modules/request/request.js:186:22)\n    at emitOne (events.js:96:13)\n    at Request.emit (events.js:188:7)\n    at Request.init (/usr/lib/parsoid/node_modules/request/request.js:274:17)\n    at new Request (/usr/lib/parsoid/node_modules/request/request.js:128:8)\n    at request (/usr/lib/parsoid/node_modules/request/index.js:53:10)\n    at ConfigRequest.ApiRequest.request (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:336:9)","levelPath":"fatal/request"},"msg":"Config Request failure for \"uri\": Error: Invalid URI \"uri\"","time":"2018-02-06T00:14:34.881Z","v":0}

Any help please!?


Arlolra (talkcontribs)

Error: Invalid URI \"uri\"" suggests something might be wrong with you config.yaml

Can you post what you have for mwApis? (talkcontribs)

In fact, if I change uri value to be something different , even with no sense, the error is the same.

In mwApis (config.yaml) I have this:


       - # This is the only required parameter,

         # the URL of you MediaWiki API endpoint.

         uri: ''

         # The "domain" ...

         domain: 'localhost'  # optional

And in wgVirtualRestConfig (LocalSettings,php):

$wgVirtualRestConfig['modules']['parsoid'] = array(

       'url' => '',

       'domain' => 'localhost',

       'prefix' => 'localhost'


Arlolra (talkcontribs)

Do you maybe have localsettings.js lying around as well? Parsoid might be picking that up. Or, maybe the config.yaml you're editing isn't the right one (since changing it should have some effect)? (talkcontribs)

I'm sorry the message is the same in the web page, but not in parsoid.log. I find another config file but seeing its contents, I think I has nothing to do.

sudo find / -name config.yaml




sudo find / -name localsettings.js

gives me nothing.

I've made another test:

sudo systemctl stop parsoid.service

sudo rm /var/log/parsoid/parsoid.log

sudo nano /etc/mediawiki/parsoid/config.yaml

(I set the urls as in my first post)

sudo systemctl start parsoid.service

I load main page in wiki site, and try to edit it, the same error appears y de web page. Now I get this error (which I had also seen before).

{"name":"../src/lib/index.js","hostname":"pc","pid":1753,"level":40,"logType":"warn/api/econnrefused","wiki":"wiki$0","title":"Main_Page","oldId":null,"reqId":null,"userAgent":"VisualEditor-MediaWiki/1.30.0","msg":"Failed API request, {\"error\":{\"code\":\"ECONNREFUSED\",\"errno\":\"ECONNREFUSED\",\"syscall\":\"connect\",\"address\":\"\",\"port\":8081},\"retries-remaining\":1}","longMsg":"Failed API request,\n{\"error\":{\"code\":\"ECONNREFUSED\",\"errno\":\"ECONNREFUSED\",\"syscall\":\"connect\",\"address\":\"\",\"port\":8081},\"retries-remaining\":1}","levelPath":"warn/api/econnrefused","time":"2018-02-06T17:54:20.001Z","v":0}

{"name":"../src/lib/index.js","hostname":"pc","pid":1753,"level":40,"logType":"warn/api/econnrefused","wiki":"wiki$0","title":"Main_Page","oldId":null,"reqId":null,"userAgent":"VisualEditor-MediaWiki/1.30.0","msg":"Failed API request, {\"error\":{\"code\":\"ECONNREFUSED\",\"errno\":\"ECONNREFUSED\",\"syscall\":\"connect\",\"address\":\"\",\"port\":8081},\"retries-remaining\":0}","longMsg":"Failed API request,\n{\"error\":{\"code\":\"ECONNREFUSED\",\"errno\":\"ECONNREFUSED\",\"syscall\":\"connect\",\"address\":\"\",\"port\":8081},\"retries-remaining\":0}","levelPath":"warn/api/econnrefused","time":"2018-02-06T17:54:20.016Z","v":0}

{"name":"parsoid","hostname":"pc","pid":1753,"level":60,"err":{"message":"Config Request failure for \"\": Error: connect ECONNREFUSED","name":"../src/lib/index.js","stack":"../src/lib/index.js: Config Request failure for \"\": Error: connect ECONNREFUSED\n    at ConfigRequest.ApiRequest._requestCB (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:415:15)\n    at self.callback (/usr/lib/parsoid/node_modules/request/request.js:186:22)\n    at emitOne (events.js:96:13)\n    at Request.emit (events.js:188:7)\n    at Request.onRequestError (/usr/lib/parsoid/node_modules/request/request.js:878:8)\n    at emitOne (events.js:101:20)\n    at ClientRequest.emit (events.js:188:7)\n    at Socket.socketErrorListener (_http_client.js:310:9)\n    at emitOne (events.js:96:13)\n    at Socket.emit (events.js:188:7)\n    at emitErrorNT (net.js:1281:8)\n    at _combinedTickCallback (internal/process/next_tick.js:80:11)\n    at process._tickCallback (internal/process/next_tick.js:104:9)","levelPath":"fatal/request"},"msg":"Config Request failure for \"\": Error: connect ECONNREFUSED","time":"2018-02-06T17:54:20.021Z","v":0}

Arlolra (talkcontribs)

Parsoid is having trouble connecting to your MediaWiki API at

Are you sure that url works? What happens when you curl it from the same machine Parsoid is running on? (talkcontribs)

That was the point, I was only testing that url on the host machine.

I 've changed Apache to listen on 8081 and the port forward of that VM (guest) to be listening on that port and now it works!

Thanks a lot for your support!!

This post was hidden by (history)
Djmaxx007 (talkcontribs)

"", I'm done. I've had it. I'm not messing with trying to install visual editor any more. If you have a vm with visual editor working, I would be ultimately graced by your kindness if I could have a copy of it. I am willing to reimburse your for your time in making it as it is wasting my time/money. Please let me know. Thank you.

installing on machine that is not internet facing

Squeak24 (talkcontribs)


I am trying to install Parsoid on a machine that is not facing the internet, it is on a firewalled internal network with no access to the outside world.

So, the question is, is there anyway to install parsoid onto a server that is not internet facing? If so, how?

Any help is appreciated.


Squeak24 (talkcontribs)
SSastry (WMF) (talkcontribs)

All Parsoid needs is a config to point it to a wiki. It can be an internal / local wiki. In that case, it won't need to access the internet. You can set up the wiki config via config.yaml. See Parsoid/Setup#Configuration

Arlolra (talkcontribs)

Parsoid 0.9.0 update brings 406 only by editing

Tealk (talkcontribs)


when I try to edit a post I get the above error.

Posting a new topic is no problem.

Here is an excerpt from the log:

{"name":"parsoid","hostname":"v22018034352662523","pid":2319,"level":60,"logType":"fatal/request","wiki":"wiki$0","title":"Hauptseite","oldId":null,"reqId":null,"userAgent":"VisualEditor-MediaWiki/1.30.0","msg":"Not acceptable.\ntext/html; charset=utf-8; profile=\"\"\ntext/html; charset=utf-8; profile=\"\"\n","stack":"","httpStatus":406,"longMsg":"Not acceptable.\ntext/html; charset=utf-8; profile=\"\"\ntext/html; charset=utf-8; profile=\"\"\n","levelPath":"fatal/request","time":"2018-05-21T11:34:47.637Z","v":0}

Here's what I've tried:

Parsoid/Troubleshooting#Parsoid 0.9.0 update brings 406 Not Acceptable docserver error in VisualEditor REL 30 on Mediawiki 1.30

Anybody have any idea how I can fix this?

SSastry (WMF) (talkcontribs)

Upgrading to parsoid 0.8.1

Summary by SSastry (WMF)

Download and dpkg --install

Kghbln (talkcontribs)

What is the recommendation on upgrading to parsoid 0.8.1. I have a parsoid 0.8.0 running installed via Debian packages and will not be able to update to 0.9.0 until the end of this year. That's why parsoid is on hold.

Should I just download parsoid 0.8.1 and install it over 0.8.0 or do you recommend to uninstall parsoid 0.8.0 via packages and install 0.8.1 thereafter? Probably the latter but I would like to be sure.

SSastry (WMF) (talkcontribs)

I think dpkg --install should do the right thing in this case. I verified locally that installing over an 0.8.0 eliminates the reported vulnerabilities. However, if you uninstall and reinstall, make sure to save your config file and restore it afterwards.


Rant: Managing parsoid debian package versions with apt

Ciencia Al Poder (talkcontribs)

So... there's no way to downgrade to parsoid 0.8.0 using apt.

> sudo apt-get install parsoid=0.8.0all
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '0.8.0all' for 'parsoid' was not found

> sudo apt-cache policy parsoid
  Installed: 0.9.0all
  Candidate: 0.9.0all
  Version table:
 *** 0.9.0all 500
        500 jessie-mediawiki/main amd64 Packages
        100 /var/lib/dpkg/status                                             

Why there's not a proper way to handle versions in wikimedia's debian repository?

The only way to downgrade is to download the deb from (and pray that nobody hacked it)

Note that apt-mark hold parsoid doesn't work when you're installing the package for the first time!

Legoktm (talkcontribs)

We use reprepro to create the Debian repository (not the full dak used by Debian) - I'm not sure whether it supports having multiple versions of a package.

Providing PGP signatures for (or some better management of older versions) is definitely something we should improve.

Reply to "Rant: Managing parsoid debian package versions with apt"

Visual Editor newer than December 12, 2017 for parsoid 0.9.0

Summary by SSastry (WMF)

You require MW 1.31 for that. If not, hold parsoid via apt-mark hold parsoid

LawrenceSystems (talkcontribs)

I am looking for a VisualEditor version that works with parsoids 0.9.0 but does not require version 1.31 of MediaWiki. Is there a version after December 12th 2017 but before the 1.31 requirement that can be downloaded or is "apt-mark hold parsoid" the current work around until 1.31 is released to stable?

SSastry (WMF) (talkcontribs)

apt-mark hold parsoid is your best solution for now if you aren't on MW 1.31

VisualEditor stopped working after upgrade to parsoid 0.9.0all

Summary by SSastry (WMF)

See Parsoid/Releases#0.9.0 (released Mar 23, 2018) for important caveats about parsoid 0.9.0 and visual editor

Luigi.d (talkcontribs)

mediawiki 1.29 on Mint 18.2. VisualEditor 0.1.0 (b655946)

everything was going fine until the upgrade to parsoid 0.9.0all, now I get the error "apierror-visualeditor-docserver-http: HTTP 406" when trying to launch Visual Editing of a page

Something changed in the request syntax needed by parsoid?

Do I miss any dependency? Do I miss any matching between versions Parsoid/VIsualEditor?

Luigi.d (talkcontribs)

Sorry, after posting the message above, I've continued to search, and I've found the release 0.9.0 caveats.

I'll try to upgrade both the wiki and VisualEditor