Jump to: navigation, search

About this board

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)
Reply to "Parsoid 0.9.0 update brings 406 only by editing"

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)
Reply to "installing on machine that is not internet facing"

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"

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.

Reply to "mediawiki into virtual machine problem with visualeditor"

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

Parsoid on Raspbian : VisualEditor HTTP 500 Error

Summary by Alkydes

Install php-curl before parsoid run.

Alkydes (talkcontribs)


I'm setting up a mediawiki on my Raspberry Pi 3, it's run the Raspbian that are based on Debian stretch.

I finished up parsoid installation, but VisualEditor doesn't work.

Mediawiki version : 1.30

php version : 7.0.27-0+deb9u1 (cli) (built: Jan  5 2018 13:51:52)

curl version : 7.52.1 (arm-unknown-linux-gnueabihf)

nvm version : 0.33.8

node version : v8.10.0

npm version : 5.6.0

I don't know why VisualEdit doesn't work.

When I cilck Edit, there's no response from parsoid. Parsoid is up and running but I can't confirm it's linked with VisualEditor.

What am I doing wrong? Any suggestion?


Alkydes (talkcontribs)

curl was the answer.

$ sudo apt-get install php-curl

How to install Parsoid on Raspbian (RPi2)?

Summary last edited by Bsplu 22:15, 26 October 2017 6 months ago
  1. update node to v4.x or higher.
  2. use Parsoid/Developer setup
  3. if u get http 200, u could try install php5-curl and restart all services (talkcontribs)


I'm setting up a mediawiki on my Raspberry Pi 2, it's run the Raspbian which are based on Debian jessie. I'm stuck at the Add Wikimedia repository step, it returns this error:

Traceback (most recent call last):
  File "/usr/bin/apt-add-repository", line 167, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/", line 105, in __init__
  File "/usr/lib/python3/dist-packages/softwareproperties/", line 595, in reload_sourceslist
  File "/usr/lib/python3/dist-packages/aptsources/", line 89, in get_sources
    (, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/jessie

I tried changing the lsb_release to Debian and successfully add the repository but it returns this error on sudo apt-get update:

W: Failed to fetch Unable to find expected entry 'main/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)

I guess my only option now is too manually install Parsoid, but I'm not sure how can I config it so that it looks like I installed it via repository. Can you help me with detail config like which directory should I install parsoid?

Thanks (talkcontribs)

it cant be done since it it doesnt have binary for arm

SSastry (WMF) (talkcontribs)

I assume you are trying to install Parsoid for running VisualEditor? It doesn't matter where you install Parsoid. But, Parsoid/Developer Setup might help you there. It tells you have to start Parsoid on the commandline as well as how to set up the config files (on Ubuntu/Debian) for starting the parsoid service automatically.

Bsplu (talkcontribs)

Parsoid could not be installed directly in Raspbian. By SSastry (WMF)suggestion, we could run it with develop version.

Here is Parsoid/Developer setup.

However, the new problem for Raspbian is Develop version need node v4.x or higher. For my raspberry, v0.10.29 is the latest version(Amazing /(ㄒoㄒ)/~~).

So the first thing is to update nodejs.

Follow the steps from Beginner’s Guide to Installing Node.js on a Raspberry Pi.

It should be noticed not every raspberry works.

The second thing is install npm.

sudo apt-get install npm

After doing these, Parsoid/Developer setup will work for Raspbian.

Although Parsoid works, restbase cannot work on my raspberry. Error is " Cannot read property 'constructor' of undefined"

Alkydes (talkcontribs)

How did you install parsoid for raspbian? It's impossible.

Issue With starting on boot with CentOS 6

Summary by Arlolra

Not enough free memory.

Stationeers.Wiki (talkcontribs)

hi, i have parsoid all working and installed with CentOS, everything works fine, except i can't figure out how to re-launch the service on boot, i have tried mp2 however it seems to keep stoping and restarting the service and despite it says its running on mp2 process list it doesn't connect.

at the moment I'm launching it in an other screen in shell and letting it run, but this isn't probably the best way to achieve this.

Arlolra (talkcontribs)

If it's starting and stopping in a loop, it probably means it's crashing. What do you see in the logs? Maybe the port it's trying to bind to is already in use?

Stationeers.Wiki (talkcontribs)

when i run "node --max-old-space-size=128 bin/server.js -n 1"

it works fine, but without --max-old-space-size=128 it crashes

Arlolra (talkcontribs)

Is that true in your screen also? How much ram is available on your server?

Stationeers.Wiki (talkcontribs)

2GB , but for the last 5 hours with the command "node --max-old-space-size=128 bin/server.js -n 1" it works perfect

Arlolra (talkcontribs)

2GB free? That command starts two processes (master/worker), each with a 2GB memory limit (I believe) but they shouldn't be using that at startup.

Stationeers.Wiki (talkcontribs)

this is the output without using --max-old-space-size=128

{"name":"parsoid","hostname":"","pid":13231,"level":60,"err":{"message":"Cannot read property 'pid' of undefined","name":"TypeError","stack":"TypeError: Cannot read property 'pid' of undefined\n    at Worker.startupWorkerExit (/root/parsoid/node_modules/service-runner/lib/master.js:184:57)\n    at Worker.emit (events.js:180:13)\n    at ChildProcess.worker.process.once (internal/cluster/master.js:190:12)\n    at Object.onceWrapper (events.js:272:13)\n    at ChildProcess.emit (events.js:180:13)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)","levelPath":"fatal/service-runner/unhandled"},"msg":"Cannot read property 'pid' of undefined","time":"2018-03-15T00:31:05.078Z","v":0}

Arlolra (talkcontribs)
Stationeers.Wiki (talkcontribs)


will this require a software update?

Arlolra (talkcontribs)

Yes, but that won't fix your problem, only help in diagnosing. But if you're getting success by limiting how big the heap can grow, I'm guessing there just isn't even enough free memory to start the worker.

Stationeers.Wiki (talkcontribs)

ah right, ok, thank you! will close this topic now!

Parsoid with AuthRemoteuser (private wiki)

Summary by Arlolra

User disappeared

2A02:A03F:48B8:BA00:FCD4:94B6:A36D:4719 (talkcontribs)

We have Kerberos enabled for apache which provides for every page the user. However as parsoid was not providing these credentials when connecting to http://localhost/wiki/api.php , the create/edit would fail.

We thought solving it by excluding the specific url http://localhost/wiki/api.php from authentication. However we now have the strange problem that when browsing to a page, the user is clearly logged in in the upper right corner, however when he clicks on edit, the visual editor complains about the user being 'anonymous' and consequently in the history only the ip address is logged instead of the username.

I have no clear understanding how parsoid provides the username to the api.php endpoint. What could be the issue here?

Arlolra (talkcontribs)
Mishter Jingles (talkcontribs)

Thanks for your answer.

I tried both links.

If I enable authentication in apache for http://localhost/wiki/api.php, then parsoid always gives :

"401 Unauthorized This server could not verify that you\nare authorized to access the document\nrequested.  Either you supplied the wrong\ncredentials (e.g., bad password), or your\nbrowser doesn't understand how to supply\nthe credentials required"

If I disable authentication in apache, parsoid "works" but the user is still 'anonymous'

Arlolra (talkcontribs)

After enabling authentication, you'd need to forward cookies. Did you try that?

Mszicsu (talkcontribs)