Wikimedia Developer Support

Problems with setting up a Parsoid service

Hello, I need some help with setting up parsoid

I run a vm with the latest ubuntu version fully up to date, and MW 1.34. I want to do some testing so I run MW at localhost, fresh installs everything.

I downloaded visual editor for MW 1.34, install it, MW picks it up normally (after adding it to LocalSettings)

I install parsoid based on those instructions https://www.mediawiki.org/wiki/Parsoid/Setup#Ubuntu_/_Debian

the config.yaml file is in /etc/mediawiki/parsoid and it has this text

https://pastebin.com/SPhFaLZh

Moreover, I also linked with parsoid based on this configuration in my LocalSettings https://www.mediawiki.org/wiki/Extension:VisualEditor#Linking_with_Parsoid

but it does not work. When I press edit on MW (localhost) it tells me “Error loading data from server: apierror-visualeditor-docserver-http-error: http-request-error. Would you like to retry?”

can someone please help me?

P.S. I have also set up a RESTbase and that seems to be working at least (can start node server)

One of the first things I’d check is if parsoid is actually running. You can also check parsoid log to see if there’s any error

Hi thanks for the reply.

I suspect it doesn’t, even though I followed that guide to the letter. How do I check that and what should I do if it’s not running?

I actually set it up again, by using this guide https://www.mediawiki.org/wiki/Parsoid/Developer_Setup

That does not make any sense to me.

Why would the official setup guide would have no actual information on how to set it up ( https://www.mediawiki.org/wiki/Parsoid/Setup#Ubuntu_/_Debian ).

What had to be done was to download the parsoid repo and npm start it, but no where in the later, Ubuntu, guide there was no mention of downloading it, only to install a deb, which led me to not be able to run the parsoid service.

I didn’t know that the actual guide that would work would be the ‘developer’ guide.

Anyhow, just sharing that in case someone gets the same problem as I did.

Installing a deb internally you’re downloading a snapshot of it (provided by debian or ubuntu) and installing it somewhere in your system. Maybe what you were missing is to actually start the service up. I guess it won’t start it automatically because it needs some configuration

Try going to parsoid in a web browser and seeing what happens (if its on localhost and port 1234 go to http://localhost:1234 ). Check also if the node process is running with ps command (need extra arguments see ps documentation. Like ps -aux or something, cant remember)