Jump to: navigation, search

About this board

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

VisualEditor Error (curl error: 28)

Summary last edited by ChristianOrrala 06:51, 25 June 2017 1 day ago

If you are running Mediawiki on a shared hosting probably the cUrl it´s blocked for external connections on specific ports (8000,8142), ask your hosting provider to unlock the port (tcp).

Slysi123 (talkcontribs)

I have just updated our mediawiki from 1.24 to 1.26.2 and everything appears to be fine except that when editing a page using VisualEditor it gives the above error, the parsoid cmd window also doesnt show anything at all when trying to edit a page.

http://localhost:8000/ - Works fine and all test pages work, i can see parsoid in the cmd window parsing pages.

http://vm-wiki:8000/localhost/Main_Page - Works and i can see parsoid parsing the page.

I can only assume i have a VE issue but i cannot seem to find where, anyone have any ideas? - Its a Windows install with php and mysql - any help appreciated.

Arlolra (talkcontribs)

Is your VE configured correctly? That may have changed between those versions,

Slysi123 (talkcontribs)

unfortunately i have already been through the settings and updated the localsettings.php file, i have also matched the localsetting.js file for parsoid, tried a combination of the two and a combination of localhost and the server name, nothing seems to work but i do agree this points to a VE issue talking to parsoid because i can go to http://localhost:8000, tests check out fine and i can see the parsoid workers processing pages.

Cscott (talkcontribs)

Are you using "domain" or "prefix" in your LocalSettings.php? Does Parsoid's localsettings.js file have a "domain" and/or "prefix" that matches?

A quick google seems to indicate that "curl error: 28" is a PHP configuration error of some sort. See, for example,

Reply to "VisualEditor Error (curl error: 28)" (talkcontribs)

Hi, we have one very huge Page in one of our customers mediawiki. Editing this page will cause an alert windows after about 30 seconds witch says: "http". Not more. The Parsoid log says: ...started parsing... and then ...completed parsing in 37661 ms... so im guessing on a timeout problem. All other Pages load fast and fine. Is there a way to increase timeout? Thank you for every help and hint :-)

Arlolra (talkcontribs)

Not sure, I think you should ask on the VE talk page. Alternatively, you can try setting up RESTBase in front of Parsoid, so that the parse is cached and VE loads it fast.

Whatamidoing (WMF) (talkcontribs)

How huge is "very huge"?

Reply to "Timeout in VisualEditor" (talkcontribs)

Hello, after upgrading to Debian 9, I get an error 500

I did not change anything in the Mediawiki, Visual Editor, Parsoid installation.

- Parsoid version: 0.5.1all

- Node version: v4.8.2

Any advice ?



  "0": "Starting HTTP request: ",

  "1": {

    "method": "GET",

    "followRedirect": true,

    "uri": "http://host_name/wiki/api.php",

    "qs": {

      "format": "json",

      "action": "query",

      "meta": "siteinfo",

      "siprop": "namespaces|namespacealiases|magicwords|functionhooks|extensiontags|general|interwikimap|languages|protocols|specialpagealiases",

      "rawcontinue": 1


    "timeout": 40000,

    "headers": {

      "X-Request-ID": null,

      "User-Agent": "Parsoid/0.5.0",

      "Connection": "close"


    "strictSSL": true



[warning][wiki$0/Language/Spanish/Vocabulary/Parts-of-a-tree] non-200 response: 500 <!DOCTYPE html><html><head><title>Internal Server Error</title></head><body><h1>Internal Server Error</h1><p>DB connection error<br />


Arlolra (talkcontribs)

"DB connection error" sounds like your MediaWiki may not be configured correctly. Can you first confirm that the MediaWiki action API is responding correctly.

It should look like, (talkcontribs)

from the browser, the API is working correctely

from the server, it's not working


curl http://[DOMAIN]//wiki/api.php?action=query&titles=Main%20Page&prop=revisions&rvprop=content&format=json

Internal Server Error

DB connection error


it's working

{"batchcomplete":"","query":{"pages":{"84":{"pageid":84,"ns":0,"title":"Main Page","revisions":[{"contentformat":"text/x-wiki","contentmodel":"wikitext","*":"#REDIRECT Home"}]}}}}

Arlolra (talkcontribs)

What does your $wgDBserver string say, in LocalSettings.php (talkcontribs)



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

                            'url' => '',

                            'domain' => 'localhost',

                            'prefix' => 'localhost'





                     uri: 'http://xxxxx/wiki/api.php',

                     domain: 'localhost',

                     prefix: 'localhost'


              parsoidConfig.serverPort = 8142;

Arlolra (talkcontribs)

Sorry, but that's not what I asked. I wanted the $wgDBserver string (talkcontribs)

sorry :) $wgDBserver = "localhost";

Arlolra (talkcontribs)

Hmm, I'm not sure. You might want to ask for help at

I suspect when the above curl command works, Parsoid will as well. (talkcontribs)

thanks ! It might be due to an internal issue

with CURL mysql is not working event on the main site (without mediawiki) (talkcontribs)

when I try to connect to http://[site]/wiki/Home?veaction=edit

in the log I have:

Unexpected REMOTE_USER authentication failure. Login Error was:EmptyPass, referer: http://[site]/wiki/Home?veaction=edit

Arlolra (talkcontribs)

Is this a private wiki? Have a look at, (talkcontribs)

thanks but no it's public

Arlolra (talkcontribs)

Looks like that may be coming from Extension:Auth_remoteuser?

I'd suggest you disable all your other extensions when trying to get VE setup. Then enabling them one by one, and confirming nothing breaks.

Reply to "Debian 9: error 500" (talkcontribs)

Hello everyone, in our Wiki installation we are faced with the following error appearing in parsoid.log (on client side/VisualEditor we get a http 500 several time):

{"name":"../src/lib/index.js","hostname":"abcWiki","pid":2956,"level":60,"logType":"fatal/request","wiki":"wiki$0","title":"abcTitle","oldId":null,"reqId":null,"userAgent":"VisualEditor-MediaWiki/1.28.0","msg":"Failed to parse the JSON response for Template Fetch","stack":"Error\n    at TemplateRequest.ApiRequest._handleBody (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:469:12)\n    at TemplateRequest.ApiRequest._requestCB (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:420:8)\n    at Request.self.callback (/usr/lib/parsoid/node_modules/request/request.js:186:22)\n    at emitTwo (events.js:125:13)\n    at Request.emit (events.js:213:7)\n    at Request.<anonymous> (/usr/lib/parsoid/node_modules/request/request.js:1081:10)\n    at emitOne (events.js:115:13)\n    at Request.emit (events.js:210:7)\n    at IncomingMessage.<anonymous> (/usr/lib/parsoid/node_modules/request/request.js:1001:12)\n    at Object.onceWrapper (events.js:312:19)\n    at emitNone (events.js:110:20)\n    at IncomingMessage.emit (events.js:207:7)\n    at endReadableNT (_stream_readable.js:1045:12)\n    at _combinedTickCallback (internal/process/next_tick.js:102:11)\n    at process._tickCallback (internal/process/next_tick.js:161:9)","httpStatus":500,"longMsg":"Failed to parse the JSON response for Template Fetch","levelPath":"fatal/request","time":"2017-06-01T12:12:26.507Z","v":0}

This error occurs when certain pages are edited. We were not able to isolate the problem since the occurance seems to have a random and status dependency. However, we have pages with a relatively complex structure which do not have this problem, and we have pages with a table containing URLs which always causes this error. Does someone has an idea how we get more detail from Parsoid which template this problem causes? Or is there something else we overlooked? Thank you in advance for your help.

SSastry (WMF) (talkcontribs)

Is your wiki public? If yes, can you paste a URL for pages on which you have this problem?

Aschroet (talkcontribs)

Unfortunately the wiki is not public. Could you describe how to further debug the problem that Parsoid has?

SSastry (WMF) (talkcontribs)

Why don't you show up on IRC (#mediawiki-parsoid) one of these days? It will be quicker to figure this out. Do note that we may not respond right away on IRC as well, but it will be a faster turnaround than here. You can then post a resolution of the problem here for everyone's benefit.

Aschroet (talkcontribs)

Seems that nobody is answering in IRC.

Meanwhile, we found out that the this API call


returns the 500:

{"error":{"code":"500","info":"docserver-http: HTTP 500","*":"See http://host_name/mediawiki/api.php for API usage"}}

Since this call is done multiple times when entering VE we get multiple dialogs with a "500".

Arlolra (talkcontribs)

We discussed on IRC, and this seemed to be caused by Apache sending an early eof, or chunking the response. Whatever the case, the JSON blob that Parsoid was receiving from MediaWiki was truncated. The user was going to investigate further.

Aschroet (talkcontribs)

The problem occurs when Parsoid tries to get the Wikitext from Mediawiki by an URL like this:


From time to time the response is truncated because of a "Connection closed by foreign host." which is definitely a network problem on our side.

However, two things i want to mention. First, cURL and browsers can deal with this problem. Maybe it is connected with the HTTP header "Connection: keep-alive" which is not supported by Parsoid. Second, i wonder why Mediawiki is not shipping the Wikitext with the request to Parsoid. Instead, Parsoid additionally calls the Wiki-API which requires that the Parsoid "server" needs the exact endpoints of the Mediawiki "clients".

Reply to "Strange errors"

I installed parsoid fine two weeks ago, but now I get "Unable to locate package parsoid"

Summary by Arlolra

Works for me.

Tansaku (talkcontribs)

I installed Parsoid fine on ubuntu two weeks ago, but just trying the same commands I get:

Unable to locate package parsoid

Here's my recent commands

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

   15  sudo apt-get update

   16  sudo apt-get install apt-transport-https

   17  sudo apt-get update && sudo apt-get install parsoid

   18  nodejs -v

   19  which nodejs

   20  cat /etc/*-release

   21  wget -qO- | sudo bash -

   22  sudo apt-get install nodejs

   23  which nodejs

   24  nodejs -v

   25  sudo apt-get update && sudo apt-get install parsoid

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

   27  sudo apt-get install parsoid

Arlolra (talkcontribs)

I tested just now and didn't have any issue. What architecture are you on?

Maiden taiwan (talkcontribs)

In wikitech-l today, Gabriel Wicke wrote:

"In short, using Parsoid directly for visual editing is an unsupported configuration, and is likely to stop working altogether in the foreseeable future.

If this is the case, then shouldn't Parsoid/Setup say this loud and clear? RESTbase is barely mentioned at the end of the article (without any description of what it is or why you'd use it). Thank you.

SSastry (WMF) (talkcontribs)

We are still debating this as we speak. When we make the formal decision to go that route, we'll make those announcements, update wikis, etc. But, as of today, that combination is supported.

But, we are trying to figure out what combination of components support what options, and at point the complexity of supporting multiple combinations overrides the benefits. We haven't yet arrived at the answers quite yet.

Parsoid and Private wiki

Summary by Arlolra

Determine the value of $_SERVER['REMOTE_ADDR']

Hvdeynde (talkcontribs)

Visual Editor (and hence Parsoid) work fine, but when I want to make this wiki a private one (by denying read access to anyone who is not logged in), it stops working.

I tried changing

if ( $_SERVER['REMOTE_ADDR'] == '' ) {
  $wgGroupPermissions['*']['read'] = true;
  $wgGroupPermissions['*']['edit'] = true;


if ( $_SERVER['REMOTE_ADDR'] == '' ) {
  $wgGroupPermissions['*']['read'] = true;
  $wgGroupPermissions['*']['edit'] = true;
} else {
  $wgGroupPermissions['user']['read'] = true;
  $wgGroupPermissions['*']['read'] = false;

But that results in a fatal request because of lack of read permissions:

{"name":"../src/lib/index.js","hostname":"edgwiki","pid":5213,"level":60,"logType":"fatal/request","wiki":"wiki$0","title":"NS_SBX:SBX_Sandbox_Test_Page_1","oldId":null,"reqId":null,"userAgent":"VisualEditor-MediaWiki/1.28.1","msg":"API response Error for TemplateRequest: request=; error={\"code\":\"readapidenied\",\"info\":\"You need read permission to use this module\",\"*\":\"See http://edgwiki.hit.local/hit-wiki/api.php for API usage\"}","stack":"Error: API response Error for TemplateRequest: request=; error={\"code\":\"readapidenied\",\"info\":\"You need read permission to use this module\",\"*\":\"See http://edgwiki.hit.local/hit-wiki/api.php for API usage\"}\n    at TemplateRequest.ApiRequest._errorObj (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:346:9)\n    at TemplateRequest._handleJSON (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:551:16)\n    at TemplateRequest.ApiRequest._handleBody (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:473:7)\n    at TemplateRequest.ApiRequest._requestCB (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:420:8)\n    at Request.self.callback (/usr/lib/parsoid/node_modules/request/request.js:186:22)\n    at emitTwo (events.js:87:13)\n    at Request.emit (events.js:172:7)\n    at Request.<anonymous> (/usr/lib/parsoid/node_modules/request/request.js:1081:10)\n    at emitOne (events.js:77:13)\n    at Request.emit (events.js:169:7)\n    at IncomingMessage.<anonymous> (/usr/lib/parsoid/node_modules/request/request.js:1001:12)\n    at IncomingMessage.g (events.js:260:16)\n    at emitNone (events.js:72:20)\n    at IncomingMessage.emit (events.js:166:7)\n    at endReadableNT (_stream_readable.js:905:12)\n    at nextTickCallbackWith2Args (node.js:441:9)","longMsg":"API response Error for TemplateRequest: request=; error={\"code\":\"readapidenied\",\"info\":\"You need read permission to use this module\",\"*\":\"See http://edgwiki.hit.local/hit-wiki/api.php for API usage\"}","levelPath":"fatal/request","time":"2017-05-24T13:37:38.201Z","v":0}

Could anyone assist me with this issue?

Arlolra (talkcontribs)

Did you see

Hvdeynde (talkcontribs)

Yes, I saw that section.  I also saw the reference at the bottom of that section to , which was the way I configured it.

Forwarding the cookies as described in works. Thanks!

I suppose that means that Andru's solution is *not* valid for private wiki's? 

Arlolra (talkcontribs)

Did you confirm what value of $_SERVER['REMOTE_ADDR'] you're getting?

Try setting something like this in your LocalSettings.php,

ini_set( 'error_log', '/tmp/php-error.log' );


error_log( $_SERVER['REMOTE_ADDR'] );

Hvdeynde (talkcontribs)

That is a useful trick. Not knowing PHP, I've been wondering how to check the values of such variables.

In this case, $_SERVER['REMOTE_ADDR'] has the value of the server's IP address, not, which was the value I expected.

Hvdeynde (talkcontribs)

P.S. Replacing '' in Andru's example by the server's actual IP address works fine as well.

troubleshooting parsoid

Summary by Arlolra

Install php-curl

Hvdeynde (talkcontribs)

According to you can test if the parsoid service is up and running and "serving" by surfing to http://yourDomain:8000/_wikitext/yourPrefix/". But 'prefix' has been removed from newer versions of Parsoid. Is there another way to test this?

Arlolra (talkcontribs)

you're better off trying http://localhost:8000/version

Hvdeynde (talkcontribs)

Thank you for your reply, but I already tested that Parsoid was up and running by accessing api.php via curl. According to the troubleshooting page, http://yourDomain:8000/_wikitext/yourPrefix/ should also help you determine whether it is actually doing what you expect to do. But as I do not know what value to enter for 'yourPrefix', I'm stuck.

(Background info: we have a private wiki that we need to run in ssl, and I'm having trouble understanding how to configure Parsoid using a self-signed certificate.)

Arlolra (talkcontribs)

The /_wikitext endpoint is only available if you enable the devAPI in your config.yaml

Did you set a prefix when you configured your MediaWiki api in the config.yaml?

Typically, this would look like,

- uri: 'http://yourdomain/api.php'

 domain: 'yourdomain'
 prefix: 'yourprefix'  // optional

in which case the answer would be 'yourprefix'.

However, the easiest way to confirm it's working is to make a GET request to http://yourdomain:8000/yourdomain/v3/page/html/Main_Page

which doesn't require setting a prefix (a somewhat deprecated concept in Parsoid)

Hvdeynde (talkcontribs)

A GET works fine. It returns:

MediaWiki has been installed.

Consult the User's Guide for information on using the wiki software.
Getting started

    Configuration settings list
    MediaWiki FAQ
    MediaWiki release mailing list
    Localise MediaWiki for your language
    Learn how to combat spam on your wiki

But when I hit 'Edit'-tab on the Main Page, I get a pop-up with "http" and an "OK" and "Cancel" button. If I select "OK", the page opens in "Edit source" instead of "Edit".

There's nothing useful in the apache logs, nor in the parsoid logs.

Hvdeynde (talkcontribs)

At the moment, /etc/mediawiki/parsoid/config.yaml has

    level: info

What other levels exist?

Arlolra (talkcontribs)

const LEVELS = ['trace', 'debug', 'info', 'warn', 'error', 'fatal'];

Arlolra (talkcontribs)

It sounds like Parsoid is setup fine, and you need to adjust your VE settings.

Are there any errors in the browser console?

Hvdeynde (talkcontribs)

Thanks, Arloira.

Yes, I get an Internal Server Error in the console when I select the 'Edit' tab:

load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:140 GET https://edgwiki.hit.local/hit-wiki/api.php?action=visualeditor&format=json&paction=parse&page=Main_Page&uselang=en 500 (Internal Server Error)
send @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:140
ajax @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:134
ajax @ VM131:68
get @ VM131:67
requestParsoidData @ VM132:34
requestPageData @ VM132:33
(anonymous) @ VM131:77
(anonymous) @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:47
fire @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:45
add @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:45
(anonymous) @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:47
each @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:5
(anonymous) @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:47
Deferred @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:47
then @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:46
activateTarget @ VM131:77
activatePageTarget @ VM131:77
activateVe @ VM131:84
onEditTabClick @ VM131:83
dispatch @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:65
elemData.handle @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0sz2zo7:60

Arlolra (talkcontribs)

How is VE configured in your LocalSettings.php?

Also, have you followed,

Hvdeynde (talkcontribs)

I was trying to set up the wiki to use https for all pages and thought the issue was how to get parsoid (which apparently only works in http) to work using tls, but I now removed the ssl settings and still have no luck.

Current configuration:


worker_heartbeat_timeout: 300000
    level: info
  - module: ../src/lib/index.js
    entrypoint: apiServiceWorker
          uri: 'http://edgwiki.hit.local/hit-wiki/api.php'
        serverPort: 8142
        strictSSL: false


wfLoadExtension( 'VisualEditor' );
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgVisualEditorParsoidURL = 'http://edgwiki.hit.local';
if ( $_SERVER['REMOTE_ADDR'] == '' ) {
  $wgGroupPermissions['*']['read'] = true;
  $wgGroupPermissions['*']['edit'] = true;

I'd seen the link, but as the parsoid service runs on the same server as the wiki, and I'm the only one who has direct login access to the server, I went with the config proposed at

After each config change, I restart parsoid and apache2

Current error in the console:

load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:140 GET https://edgwiki.hit.local/hit-wiki/api.php?action=visualeditor&format=json&paction=parse&page=Main_Page&uselang=en 500 (Internal Server Error)
send @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:140
ajax @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:134
ajax @ VM1057:68
get @ VM1057:67
requestParsoidData @ VM1058:34
requestPageData @ VM1058:33
(anonymous) @ VM1057:77
(anonymous) @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:47
fire @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:45
add @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:45
(anonymous) @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:47
each @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:5
(anonymous) @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:47
Deferred @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:47
then @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:46
activateTarget @ VM1057:77
(anonymous) @ VM1057:88
fire @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:45
add @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:45
jQuery.fn.ready @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:49
jQuery.fn.init @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:41
jQuery @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:1
(anonymous) @ VM1057:87
mw.loader.implement.css @ VM1057:93
(anonymous) @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:161
fire @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:45
add @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:45
always @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:46
runScript @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:161
checkCssHandles @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:162
(anonymous) @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:162
fire @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:45
fireWith @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:46
fire @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:46
fireCallbacks @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:156
addEmbeddedCSS @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:157
(anonymous) @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0p8i8gh:156

Both http://edgwiki.hit.local/hit-wiki/api.php and http://edgwiki.hit.local:8142/ work.

http://edgwiki.hit.local/hit-wiki/api.php returns the "MediaWiki API help" page, http://edgwiki.hit.local:8142/ returns the "Welcome to the Parsoid web service." page

Arlolra (talkcontribs)

You need to change $wgVisualEditorParsoidURL = 'http://edgwiki.hit.local';

to $wgVisualEditorParsoidURL = 'http://edgwiki.hit.local:8142';

in your LocalSettings.php

You've left out the port

Hvdeynde (talkcontribs)

Adding the port didn't seem to change things at first.

But at least the apache access log now held some info I could use: - - [16/May/2017:18:00:48 +0200] "GET /hit-wiki/api.php?action=visualeditor&format=json&paction=parse&page=Main_Page&uselang=en HTTP/1.1" 500 1894 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"

When I entered the url  http://edgwiki.hit.local/hit-wiki/api.php?action=visualeditor&format=json&paction=parse&page=Main_Page&uselang=en (based on the GET statement in the log), the browser gave me a full error message:

Internal Server Error

[abfbfebee7a73c6aec183569] /hit-wiki/api.php?action=visualeditor&format=json&paction=parse&page=Main_Page&uselang=en Error from line 415 of /var/www/html/mediawiki-1.28.1/includes/libs/MultiHttpClient.php: Call to undefined function curl_multi_init()
#0 /var/www/html/mediawiki-1.28.1/includes/libs/MultiHttpClient.php(140): MultiHttpClient->getCurlMulti()
#1 /var/www/html/mediawiki-1.28.1/includes/libs/virtualrest/VirtualRESTServiceClient.php(250): MultiHttpClient->runMulti(array)
#2 /var/www/html/mediawiki-1.28.1/includes/libs/virtualrest/VirtualRESTServiceClient.php(146): VirtualRESTServiceClient->runMulti(array)
#3 /var/www/html/mediawiki-1.28.1/extensions/VisualEditor/ApiVisualEditor.php(97): VirtualRESTServiceClient->run(array)
#4 /var/www/html/mediawiki-1.28.1/extensions/VisualEditor/ApiVisualEditor.php(226): ApiVisualEditor->requestRestbase(string, string, array)
#5 /var/www/html/mediawiki-1.28.1/includes/api/ApiMain.php(1435): ApiVisualEditor->execute()
#6 /var/www/html/mediawiki-1.28.1/includes/api/ApiMain.php(510): ApiMain->executeAction()
#7 /var/www/html/mediawiki-1.28.1/includes/api/ApiMain.php(481): ApiMain->executeActionWithErrorHandling()
#8 /var/www/html/mediawiki-1.28.1/api.php(83): ApiMain->execute()
#9 {main}

So I installed php-curl, restarted apache2, and the next attempt resulted in this info in the apache access log: - - [16/May/2017:18:12:04 +0200] "GET /edgwiki.hit.local/v3/page/html/Main_Page/2?redirect=false HTTP/1.1" 404 484 "-" "VisualEditor-MediaWiki/1.28.1" - - [16/May/2017:18:12:04 +0200] "GET /hit-wiki/api.php?action=visualeditor&format=json&paction=parse&page=Main_Page&uselang=en HTTP/1.1" 200 470 "http://edgwiki.hit.local/hit-wiki/index.php/Main_Page?veaction=edit" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"

The first line looks odd.  As in the second line, I expected a "GET /hit-wiki/...".

So I added the domain definition to both /etc/mediawiki/parsoid/config.yaml and /etc/mediawiki/parsoid/config.yaml, restarted apache and parsoid once more, and now we're in business.

FWIIW, I retested the url definition in LocalSettings.php at this stage and it does indeed require specifying the tcp port 8142.

So at least, after installing php-curl, adding the domain, and specifying the tcp port, it is working now for plain http.

Tomorrow, I'll start the battle to get it working in https.

Thanks for your assistance, Arlolra.

Summary by Arlolra

User disappeared

Facerafter (talkcontribs)

Trying to setup parsoid on a new server, but keep running into this error when trying to start the parsoid service.

From the log file:

Arlolra (talkcontribs)

How did you install Parsoid?

Facerafter (talkcontribs)

Followed the documentation provided to me.

This is for a Ubuntu 16.04 server.

We used the same for our live server and it works fine but now we are setting up a dev/test server and it suddenly doesn't work...

Arlolra (talkcontribs)

Is there any reason you aren't using the debian packages we provide? See Parsoid/Setup#Ubuntu .2F Debian

The instructions you provided are a little confusing. They point to a method that is trying to avoid using npm by cloning the deploy repo, which has the necessary dependencies already, and then invokes npm install anyways.

From the looks of it, one of your copy steps is putting things in the wrong place.

Facerafter (talkcontribs)

Trying to reinstall via the link you sent actually showed me the problem as it saw the config.yaml already existed and showed the differences.

Apparently in our old version we had: 'module: /lib/index.js' but it should be 'module: ../src/lib/index.js'

So I aborted the installation and fixed the file. But VE doesn't do anything. The last line on parsoid.log does say 'Startup finished' though.

Arlolra (talkcontribs)

Can you clarify what you mean by VE doesn't do anything? What does the VE section of your LocalSettings.php look like?

Facerafter (talkcontribs)

As in when clicking on the edit icon for VE the browser starts to load and finishes loading but nothing changes. I stay on the same page in 'viewing' mode.

Current config:

Arlolra (talkcontribs)

Is Parsoid being started on 8142 or 8000?

Facerafter (talkcontribs)


Arlolra (talkcontribs)

And what does curl http://localhost:8142/version give you?

Facerafter (talkcontribs)


Arlolra (talkcontribs)

So, Parsoid seems up at least.

Are there any errors in the browser developer console?

Given that the last line in your parsoid.log is the startup message, it doesn't seem like VE is making any requests to it.

Facerafter (talkcontribs)

Yeah two errors but those were already in the console before trying to edit a page with VE

Exception in module-execute in module site:


ReferenceError: Waves is not defined ReferenceError: Waves is not defined

No new errors appear when trying to use it.

Arlolra (talkcontribs)

Do you have any other extensions installed? Try disabling them all except VE and verify that doesn't work first.

Facerafter (talkcontribs)

After disabling them all except VE and then trying to use VE results in an error in the developer console.

GET <URL>/api.php?action=visualeditor&format=json&paction=parse&page=FAQ&uselang=en 500 (Internal Server Error)

After which it keeps giving me a browser msg/notifcation/popup thing with just 'http' which keeps repeating with the error mentioned above.

Arlolra (talkcontribs)

That seems like an improvement. Is there anything in the Parsoid logs now?

Facerafter (talkcontribs)

Btw, I edited my response above (damn you are fast)

But the parsoid logs says nothing new.

Arlolra (talkcontribs)

Since the server is returning 500, you should have server error logs you can look at to figure out what's going on.

Arlolra (talkcontribs)

To be clear, I mean whatever is serving mediawiki. Not parsoid.

Facerafter (talkcontribs)

Tried complete parsoid reinstallation. But encountered the exact same error as before the reinstallation

Nothing in the apache2 error log.

Arlolra (talkcontribs)

Is this a public or private wiki? If MediaWiki is returning a 500 error, you should have something in the apache error logs.

Facerafter (talkcontribs)

Public. The developers console is displaying a 500 error when trying to use VE, the site itself works fine.

Arlolra (talkcontribs)

Can you share the url?

Maybe try enabling some debugging flags in MediaWiki to generate more informative errors,

// error_reporting( -1 );

// ini_set( 'log_errors', 1 );

// ini_set( 'error_log', '/tmp/php-error.log' );

Facerafter (talkcontribs)

Ffs, I still think there is something wrong with my parsoid installation...

So I setup a local vm using a different install method (This one Parsoid/Setup#Ubuntu .2F Debian ) but than the /etc/mediawiki/parsoid directory is completely empty. Not config.yaml or anything...

It seems like om doing something wrong everytime... I just don't know what.

Arlolra (talkcontribs)

I don't think there's anything wrong with the Parsoid setup above.

Can you access, say, curl http://localhost:8142/localhost/v3/page/html/Magnus/21579? If so, Parsoid is fine. We established that above.

I'm noticing on your wiki that it's telling me, "You do not have permission to edit this page, for the following reason".

Can you try this ?

Also, there're still an exception, "Waves is not defined". You should disable all other extensions until this is resolved.

Can Parsoid and my website share the same set of SSL certificates?

Summary by Arlolra

Use localhost for communication on the same machine.

MagaFun (talkcontribs)

Dear supporters,

I am getting curl error 35 when using VisualEditor under SSL connection, and I had my HSTS enabled. So I currently am investigating my stunnel configuration. Can Parsoid and my website use the same set of SSL certificate? Or do I have to generate a new set?

Below is my config file.

cert = /etc/letsencrypt/live/

key = /etc/letsencrypt/live/

CAfile = /etc/letsencrypt/live/


accept  = 8143

connect = 8142

LocalSettings.php config:

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

// URL to the Parsoid instance

// Use port 8142 if you use the Debian package

'url' => '',

// Parsoid "domain", see below (optional)

'domain' => '',

// Parsoid "prefix", see below (optional)

'prefix' => ''


Arlolra (talkcontribs)

Yes, they can share the same TLS cert, if needed.

MagaFun (talkcontribs)

Do you happened to know any possible reasons that might produce error 35? I am out of clues. Or is this error logged more detailly somewhere else?

Arlolra (talkcontribs)

Well, first things first. Did you get Parsoid working with VE before trying to enable TLS? Are Parsoid and MediaWiki hosted on the same machine?

MagaFun (talkcontribs)

I did get Visual Editor working without TLS. Problem starts with TLS. And they are hosted on the same machine.

Tansaku (talkcontribs)

worked for me using Letsencrypt certs - I had this same error and I resolved it by opening up a new port on our azure container (8000) and then a vhost in apache to forward 8000 to localhost:8142, and then pointing mediawiki's LocalSettings.php to https://myhost:8000 - it required a bit of work in the apache config to get it working:

```<VirtualHost *:8000>

  ProxyPreserveHost On

  ProxyRequests Off

  ServerName mydomain

  SSLEngine on

  SSLCertificateFile /etc/letsencrypt/live/mydomain/fullchain.pem

  SSLCertificateKeyFile /etc/letsencrypt/live/mydomain/privkey.pem

  ProxyPass / http://localhost:8142/

  ProxyPassReverse / http://localhost:8142/