Talk:Parsoid

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

how to autostart parsoid on raspberry pi?

2
121.181.151.166 (talkcontribs)

i really don't know about this....

Arlolra (talkcontribs)

How did you install Parsoid?

If you used the debian package it comes with init and upstart scripts.

https://github.com/wikimedia/mediawiki-services-parsoid-deploy/blob/master/debian/parsoid.init

https://github.com/wikimedia/mediawiki-services-parsoid-deploy/blob/master/debian/upstart/parsoid.conf

Reply to "how to autostart parsoid on raspberry pi?"

parsoidserver-http-error: (curl error: 7) Couldn't connect to server.

1
Summary last edited by Compumatter 18:34, 8 August 2017 14 days ago

yaml is whitespace sensitive; tabs disallowed as indentation

I want to add to this. After many failed attempts at getting past this curl error: 7 message and specifically after double checking /etc/mediawiki/parsoid/config.yaml I had 2 problems that were causing this curl error 7 message

This was one thing that immediately fixed the curl error: 7 message

  • We added 127.0.0.1 wiki.domainname.com to our /etc/hosts file

Then, a week later the message reared it's ugly head again. This time we had checked everything and then came upon this post. I wanted to be a bit more specific about the resolution.

We are using a Multi-Wiki but the problem is the same for any Parsoid.conf files. The indentation spoken about in this post was the problem. Notice that uri below is 1 character to the right of the - (dash) above it and domain is directly beneath that.

I cannot be sure if we achieved this with space bar or tab action. However, it has to very precisely like it is indicated below. This is an actual copy of the source code so you can copy / paste and change for your own

        # Configure Parsoid to point to your MediaWiki instances.
        mwApis:
        - # This is the only required parameter,
         uri: 'https://wiki0.yourdomainname.com/api.php'
         domain: 'wiki0.yourdomainname.com'
        - # This is the only required parameter,
         uri: 'https://wiki1.yourdomainname.com/api.php'
         domain: 'wiki1.yourdomainname.com'
        - # This is the only required parameter,
         uri: 'https://wiki2.yourdomainname.com/api.php'
         domain: 'wiki2.yourdomainname.com'
       # We pre-define wikipedias as 'enwiki', 'dewiki' etc. Similarly
        # for other projects: 'enwiktionary', 'enwikiquote', 'enwikibooks',
        # 'enwikivoyage' etc.
        # The default for this is false. Uncomment the line below if you want
        # to load WMF's config for wikipedias, etc.
        #loadWMF: true
DustinICW (talkcontribs)

I recently upgrade my MediaWiki install to 1.28 and upgraded ViusalEditor and Parsoid in the process. I was able to get it to work with one wiki, but it broke when I added another using the configuration example provided in the Parsoid configuration section.

Hopefully I save some people some time here with what I learn about yaml. In yaml, apparently indentation is critical it being interpreted properly, however tab characters are not allowed. If everything is configured correctly and it is not working, try checking the indentations to make sure they use spaces and not tabs.

The error I received was: parsoidserver-http-error: (curl error: 7) Couldn't connect to server.

217.86.209.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"?

217.86.209.28 (talkcontribs)

In Plaintext we have 21801 Lines

How to Install Parsoid Service on a non Debian System without Internet connection

2
Summary by Arlolra

Clone the mediawiki/services/parsoid/deploy repository

Maluxer (talkcontribs)

Hello everyone,

I ran in some Problems with my current Setup where Parsoid is running on an external Server with Debian installed + Internet connection.

Is it possible to build Parsoid from source or is there any other offline solution for a Server running Red Hat.

Arlolra (talkcontribs)

Parsoid is written in JavaScript, which is an interpreted language. I suppose the only build step would be to download the dependencies.

To avoid using npm, you can clone the following, which has everything checked into one repository, https://github.com/wikimedia/mediawiki-services-parsoid-deploy

See https://www.mediawiki.org/wiki/Parsoid/Developer_Setup#Option_1._Clone_the_mediawiki.2Fservices.2Fparsoid.2Fdeploy_repository

VisualEditor Error (curl error: 28)

4
Summary last edited by ChristianOrrala 06:51, 25 June 2017 1 month 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, https://www.mediawiki.org/wiki/Extension:VisualEditor#Linking_with_Parsoid

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, http://stackoverflow.com/questions/6678487/getting-error-code-28-with-curl

Summary by Arlolra

User disappeared

176.151.92.12 (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 ?

LOG :

{

  "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 />

</p></body></html>

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, https://en.wikipedia.org/w/api.php

176.151.92.12 (talkcontribs)

from the browser, the API is working correctely

from the server, it's not working

FROM THE SERVER:

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

Internal Server Error

DB connection error

FROM THE BROWSER

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

176.151.92.12 (talkcontribs)

              LocalSettings.php

              ------              

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

                            'url' => 'http://127.0.0.1:8142',

                            'domain' => 'localhost',

                            'prefix' => 'localhost'

              );              

              settings.js

              ------              

              parsoidConfig.setMwApi({

                     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

176.151.92.12 (talkcontribs)

sorry :) $wgDBserver = "localhost";

Arlolra (talkcontribs)

Hmm, I'm not sure. You might want to ask for help at https://www.mediawiki.org/wiki/Project:Support_desk

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

176.151.92.12 (talkcontribs)

thanks ! It might be due to an internal issue

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

176.151.92.12 (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, https://www.mediawiki.org/wiki/Extension:VisualEditor#Linking_with_Parsoid_in_private_wikis

176.151.92.12 (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.

Summary by Arlolra

Caused by Apache sending an early eof.

194.59.120.161 (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

http://host_name/mediawiki/api.php?action=visualeditor&format=json&paction=parse&page=page_name

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:

http://mediawikiserver/mediawiki/api.php?format=json&action=query&prop=info|revisions&rawcontinue=1&rvprop=content|ids|timestamp|size|sha1|contentmodel&titles=pagename

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".

[FASTER] How do I connect Parsoid to hosting service?

8
John Harry Lau (talkcontribs)

I want to use visual editor on my mediawiki on my hosting service whitch has MediaWiki installed. I need to install Parsoid to avoid errors. Can you guys help?

Arlolra (talkcontribs)

Have you tried Parsoid/Setup?

John Harry Lau (talkcontribs)

Yep.

Reception123 (talkcontribs)

@John Harry Lau Did you get any errors when following the guide mentioned above?

John Harry Lau (talkcontribs)

nope. just warnings

Arlolra (talkcontribs)

Can you paste examples of the warnings you're seeing?

John Harry Lau (talkcontribs)

I didn't. Just warning about upgrades and instead issues...

Reception123 (talkcontribs)

Then what is the problem?

Reply to "[FASTER] How do I connect Parsoid to hosting service?"

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

2
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 keys.gnupg.net --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- https://deb.nodesource.com/setup_4.x | 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 https://releases.wikimedia.org/debian 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.