Talk:Parsoid/2019
Add topic| This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Report a new bug in Phabricator
Previous discussion was archived at Talk:Parsoid/Archive on 24 June 2015.
HTTP 406 error when editing existing pages using Parsoid version 0.10.0
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Mediawiki 1.31.1
Parsoid 0.10.0
VisualEditor 1.31 as of 11/01/2019
Latest RESTBase as of 11/01/2019
NodeJS v8.10.0
Parsoid works fine by itself but if i try set it up in combination with RESTBase for the ability to switch from source code to visual editor
I get HTTP 406. (Failed to transform content, requested_version:1.6.0, existing_version:2.0.0)
It worked fine before I upgraded Parsoid from 0.9.0. Hoefsldyla (talk) 03:04, 7 January 2019 (UTC)
- I am still getting error "apierror-visualeditor-docserver-http","info":"HTTP 406"
- Using these configs:
- OS : GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
- NAME="Red Hat Enterprise Linux Server"
- VERSION="7.6 (Maipo)"
- MediaWiki 1.31.1
- VisualEditor 0.1.0 (6854ea0)22:33, 5 November 2018
- "parsoid" : 0.10.0+git
- Parso log:
- "name": "parsoid",
- "hostname": "ashsd.xxx.com",
- "pid": 19229,
- "level": 60,
- "logType": "fatal/request",
- "wiki": "Wiki2",
- "title": "Bot",
- "oldId": null,
- "reqId": null,
- "userAgent": "VisualEditor-MediaWiki/1.31.1",
- "msg": "Not acceptable.\ntext/html; charset=utf-8; profile=\"\"\ntext/html; charset=utf-8; profile=\"/HTML/999.0.0\"\n",
- "stack": "",
- "httpStatus": 406,
- "longMsg": "Not acceptable.\ntext/html; charset=utf-8; profile=\""\ntext/html; charset=utf-8; profile=\"/HTML/999.0.0\"\n",
- "levelPath": "fatal/request",
- "time": "2019-06-19T09:00:58.714Z",
- "v": 0 Rajeshrajesh.35 (talk) 09:20, 19 June 2019 (UTC)
- There's some documentation about getting RESTBase setup with VE at https://www.mediawiki.org/wiki/Extension:VisualEditor#RESTBase_setup_for_switching
- The "Not acceptable." error is probably an indication of version mismatching. There're some warning on the release page at https://www.mediawiki.org/wiki/Parsoid/Releases#0.10.0_(released_Dec_5,_2018) about it.
- I wouldn't suggest you try downgrading Parsoid from 0.10.0+git to a released 0.9.0 and see if that works for you. Arlolra (talk) 17:25, 17 July 2019 (UTC)
- Thanks @Arlolra, i will try it once Rajeshrajesh.35 (talk) 07:11, 29 July 2019 (UTC)
Why does "node roundtrip-test.js "Main Page"" work, but "node roundtrip-test.js "Main Page" --domain http://<my wiki's domain>" does not?
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I'm doing a new install on Windows 2012 and I haven't gotten visual editor to work on saved pages at all yet. I'm on MediaWiki 1.31.1, PHP 7.0.7 (apache2handler), MySQL 5.7.13-log, and VisualEditor 0.1.0 (6854ea0) 22:33, 5 November 2018.
I've gotten to the point where I can use visual editor to create pages, but I can't edit pages (due to a "Error loading data from server: apierror-visualeditor-docserver-http: HTTP 404. Would you like to retry?" error).
As a debugging step, I checked that I
1) Can run "node bin/roundtrip-test.js "Main Page"" in a command prompt with only expected errors,
2) "node bin/roundtrip-test.js "Main Page" --domain <my wiki's domain>" fails due to a 404 error,
3) "node bin/roundtrip-test.js "Main Page" --apiURL http://<domain>/mediawiki/api.php" keeps trying to reconnect (even though http://<domain>/mediawiki/api.php brings me to the API page of my wiki), and
4) Doing both of #2 & #3 above's switches in the same command makes it keep trying to reconnect.
What can I do next to diagnose the issue so I can get Visual Editor up and running? TheMystics (talk) 05:16, 17 January 2019 (UTC)
- 1) This works because, if no domain is supplied, it uses en.wikipedia.org which is configured correctly by the setting
loadWMF: true,in that script. - 2) This fails because
<my wiki's domain>is not one of the WMF domains that are loaded by default so the uri of the mediawiki api for it is unknown. - 3) This should work and is the place you want to start debugging. Is there information about why it's failing to connect?
- 4) --domain is ignored if an --apiURL is provided, so should be the same 3) Arlolra (talk) 18:54, 17 July 2019 (UTC)
Invalid domain
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I geht the following Error: https://paste.anzah.network/pgyhgkgcx/bylh4b
Here my config: https://paste.anzah.network/prxnpore4/m6edqh
I use Froxlor to manage my Webspaces https://www.froxlor.org/
Debian strech
parsoid 0.8.1all
php 7.2
MediaWiki 1.32.0
VisualEditor: REL1_32
2018-11-05T23:22:00 Tealk (talk) 11:29, 22 January 2019 (UTC)
- I have disable the "domain: 'rollenspiel.wiki' # optional" line and now it run fine, strange, the last time i have enable it 212.211.192.4 (talk) 14:05, 23 January 2019 (UTC)
pgp keys still valid/existing ?
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
hello,
i cant seem to find the key (90E9F83F22250DD7) provided on the tutorial on any of the websites, (keys.gnupg.net, pgp.mit.edu, keyserver.ubuntu.com) ... Can anyone confirm this ?
http://keyserver.ubuntu.com/pks/lookup?search=90E9F83F22250DD7&op=vindex 83.243.48.51 (talk) 13:23, 24 January 2019 (UTC)
- I'm experiencing the same problem on Ubuntu. I've setup Parsoid on another server 2 weeks ago and everything went fine then.
- At the moment I've applied the following workaround to install Parsoid 0.10:
wget https://releases.wikimedia.org/debian/pool/main/p/parsoid/parsoid_0.10.0all_all.deb sudo dpkg -i parsoid_0.10.0all_all.deb
- In addition:
- Here are available and two old releases: https://people.wikimedia.org/~ssastry/parsoid/debs/
- Here is how to upgrade nodejs: https://stackoverflow.com/a/46762957/6543935
- Here is how to test whether the service listen after the installation:
- Spas.Z.Spasov (talk) 20:01, 27 January 2019 (UTC)
sudo systemctl status parsoid.service sudo lsof -i -n -P | grep ':8142' sudo netstat -peanut | grep ':8142'
Installation of Parsoid in a Windows Server Environment Without Internet Access
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi all,
Looking to install Parsoid in a Windows Server Environment without an internet connection.
Can anyone give me some advice/point me in the direction of some documentation of how to accomplish this?
Thanks! Mbrooksham (talk) 14:39, 6 February 2019 (UTC)
- Working on MediaWiki vers 1.32 by the way, php 7.1.26 Mbrooksham (talk) 09:58, 7 February 2019 (UTC)
Parsoid is not running Ubuntu 18.10
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I installed the parsoid as described in the official doc. But it is not running and throws that error:
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@5.8.0
3 info using node@v8.11.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle parsoid@0.10.0~prestart: parsoid@0.10.0
6 info lifecycle parsoid@0.10.0~start: parsoid@0.10.0
7 verbose lifecycle parsoid@0.10.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle parsoid@0.10.0~start: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/lib/parsoid/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
9 verbose lifecycle parsoid@0.10.0~start: CWD: /usr/lib/parsoid
10 silly lifecycle parsoid@0.10.0~start: Args: [ '-c', 'service-runner' ]
11 silly lifecycle parsoid@0.10.0~start: Returned: code: 126 signal: null
12 info lifecycle parsoid@0.10.0~start: Failed to exec start script
13 verbose stack Error: parsoid@0.10.0 start: `service-runner`
13 verbose stack Exit status 126
13 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:283:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid parsoid@0.10.0
15 verbose cwd /usr/lib/parsoid
16 verbose Linux 4.18.0-16-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v8.11.4
19 verbose npm v5.8.0
20 error code ELIFECYCLE
21 error errno 126
22 error parsoid@0.10.0 start: `service-runner`
22 error Exit status 126
23 error Failed at the parsoid@0.10.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 126, true ]
does anybody have an idea how to fix it? 2A0B:33C0:2:22:A4FA:7E0C:919F:30E7 (talk) 16:41, 6 March 2019 (UTC)
- The exit status 126 is probably a permission error when trying to execute service-runner. Arlolra (talk) 18:32, 6 March 2019 (UTC)
- Thanks a lot. Seems like the service-runner.js caused the problems. 2A0B:33C0:2:22:A4FA:7E0C:919F:30E7 (talk) 07:47, 7 March 2019 (UTC)
Pagebanner template at Wikivoyage
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello,
I've noticed that voy:en:Template:Pagebanner has a strange behavior in the visual editor. Inspired by @SSastry (WMF)'s excellent explanation of the '''foo {{1x|'''a'''}} bar''' parsing problem, I wanted to ask if there might be something wrong/unbalanced about the template code.
The behavior that I see is that if the wikitext says:
{{pagebanner}}
First sentence
then the first sentence is treated as a complex transclusion of the two parts. See https://en.wikivoyage.org/wiki/Catalina_Island?veaction=edit as an example of this. However, if there is a blank line between the first sentence and the pagebanner template, then it is not treated as a complex transclusion, and the first line is (properly/as expected) separate from the template. What do you think is wrong here? Whatamidoing (WMF) (talk) 20:41, 12 March 2019 (UTC)
- You are on the right track. :-)
- The reason why Parsoid expands the scope of the template is because parts of its output is combined with that sentence to create a paragraph.
- In this case, it seems to be because the pagebanner template uses the <indicator> extension and Parsoid seems to think that it should be wrapped in a paragraph. That is more likely a problem with Parsoid's interpretation of the <indicator> extension's output and we may be able to fix that. Can you file a bug for us? Thanks!
- Glad you found the explanation useful. SSastry (WMF) (talk) 20:54, 12 March 2019 (UTC)
- There is another (un)related issue that Parsoid should fix as well. If you look at https://en.wikivoyage.org/api/rest_v1/page/html/Catalina_Island, you see that the banner is missing. This is another issue with Parsoid's handling of the indicator extension. This is likely to get addressed once Parsoid is ported with PHP and integrated with core. SSastry (WMF) (talk) 21:10, 12 March 2019 (UTC)
- I filed one bug mentioning both, since it sounds like the second is a problem that will automagically disappear without requiring any specific effort. If you want them split, please reply here. I stopped watching this page after the Tidy/Remex change was completely wrapped up, but I am subscribed to this thread (and of course you are welcome to ping me in any conversation on any wiki). Whatamidoing (WMF) (talk) 22:35, 12 March 2019 (UTC)
- Thanks! That bug report is good enough. We will split if required. SSastry (WMF) (talk) 22:36, 12 March 2019 (UTC)
Problems with installing Parsoid
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello everybody,
Can anyone of you provide me with a simple guide for installing Parsoid? I would like to use the visual editor, but I just do not get Parsoid installed. The explanations found on the Internet are very complicated. Media Wiki runs on an external server.
Thank your for your support.
Best regards
Philipp
2A02:908:954:FB00:7D4A:31B1:11E5:290C (talk) 09:08, 3 May 2019 (UTC)
- I have the same problem. I can not set the external server url. Do you need any installation? 188.37.93.239 (talk) 16:57, 27 May 2019 (UTC)
- There's some documentation on setting up Parsoid at https://www.mediawiki.org/wiki/Parsoid/Setup
- That is linked from https://www.mediawiki.org/wiki/Extension:VisualEditor#Set_up_a_Parsoid_service Arlolra (talk) 17:51, 17 July 2019 (UTC)
Server 2019....
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I am at a loss here at how to get this up and running with Visual Editor. I will literally pay someone to help me get it running. In this day and age, I have no idea why all of the devs involved in this project need to make something so incredibly complicated to setup. Really super unnecessary, someone should make a windows based installer package for parsoid and visual editor and whatever else is needed to make this so much easier.
Anywho, any takers on getting paid to make this clunky software work would be much appreciated!
please contact me ASAP!
halesc72@gmail.com 173.20.44.220 (talk) 01:18, 23 May 2019 (UTC)
- You can also reach someone at Professional development and consulting. Ciencia Al Poder (talk) 09:24, 23 May 2019 (UTC)
- My Issue was finally resolved. 50.82.132.227 (talk) 15:10, 19 June 2019 (UTC)
Parsoid service not found after install on Ubuntu 16.04
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I have been having no luck getting parsoid working. I have nodejs v10.16, and if I follow all the install instructions on the "Parsoid/Setup" page it seems to install fine but if I then do sudo service parsoid status it says service not found. Anyone have any ideas on how to get this working? Thanks, David David Gleason (talk) 05:09, 3 June 2019 (UTC)
- Update: finally got parsoid, stunnel and VE working after following the steps on https://www.howtoforge.com/tutorial/how-to-install-visualeditor-for-mediawiki-on-centos-7/ relating to creating a systemd .service file. David Gleason (talk) 05:58, 4 June 2019 (UTC)
- (p.s. should have mentioned I am running Ubuntu 16.04 which uses systemd instead of upstart.) David Gleason (talk) 06:00, 4 June 2019 (UTC)
Cannot find module '…/parsoid/node_modules/lib/index.js'
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I installed Parsoid following the instructions on Parsoid/Developer Setup, using the “clone the mediawiki/services/parsoid/deploy repository” variant and the following commands:
cd /home/parsoid
git clone --recursive https://gerrit.wikimedia.org/r/mediawiki/services/parsoid/deploy .
npm install
chown -R parsoid.parsoid .
However, when starting Parsoid (after having created the src/config.yaml file) with
/usr/bin/node /home/parsoid/src/bin/server.js
I get a “cannot find module” error, because /data/home/parsoid/node_modules/lib/index.js is missing. In fact, there is no /data/home/parsoid/node_modules/lib directory at all.
So, why did the installation procedure not create that lib directory, and what can I do now? Thanks for your help!
Oh, by the way, /home is a symlink to /data/home, if that matters. Rainer Klute (talk) 18:54, 15 June 2019 (UTC)
- If you cloned the deploy repo, there was no need to
npm installsince that already provides all the dependencies. - The path that it should be looking for is
/data/home/parsoid/lib/index.js, without thenode_modules/in the middle. - What value do you have in your config.yaml for the
module? Maybe add a../before it. Arlolra (talk) 17:34, 17 July 2019 (UTC)
curl: (7) Failed to connect to localhost port 8142: Connection refused
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi, been trying to install parsoid for days. still got this error. anyone can help?
OS: Ubuntu 18.04
PHP: 7.3
Web Server: Nginx
Nodejs: 12.5.0
service parsoid status replied:
parsoid.service - LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back
Loaded: loaded (/etc/init.d/parsoid; generated)
Active: active (running) since Mon 2019-07-01 14:20:30 UTC; 10min ago
Docs: man:systemd-sysv-generator(8)
Process: 4557 ExecStop=/etc/init.d/parsoid stop (code=exited, status=0/SUCCESS)
Process: 4565 ExecStart=/etc/init.d/parsoid start (code=exited, status=0/SUCCESS)
Tasks: 12 (limit: 2344)
CGroup: /system.slice/parsoid.service
├─4583 /bin/sh -c /usr/bin/nodejs /usr/lib/parsoid/src/bin/server.js -c /etc/mediawiki/parsoid/config.yaml >> /var/log/parsoid/parsoid.log 2>&1
└─4585 /usr/bin/nodejs /usr/lib/parsoid/src/bin/server.js -c /etc/mediawiki/parsoid/config.yaml
Jul 01 14:20:25 homestead systemd[1]: Stopped LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back.
Jul 01 14:20:25 homestead systemd[1]: Starting LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back...
Jul 01 14:20:25 homestead parsoid[4565]: Started Parsoid server on port 8142
Jul 01 14:20:30 homestead systemd[1]: Started LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back.
But still the error was displayed when trying to curl to localhost:8142
Please help. Thanks
210.195.7.193 (talk) 14:35, 1 July 2019 (UTC)
- /var/log/parsoid/parsoid.log
- {"name":"parsoid","hostname":"homestead","pid":5784,"level":30,"levelPath":"info/service-runner","msg":"master(5784) initializing 1 workers","time":"2019-07-01T14:43:04.066Z","v":0}
- {"name":"parsoid","hostname":"homestead","pid":5796,"level":60,"code":"MODULE_NOT_FOUND","requireStack":["/usr/lib/parsoid/node_modules/service-runner/lib/base_service.js","/usr/lib/parsoid/node_modules/service-runner/lib/master.js","/usr/lib/parsoid/node_modules/service-runner/service-runner.js"],"moduleName":"../src/lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Cannot find module '../src/lib/index.js'\nRequire stack:\n- /usr/lib/parsoid/node_modules/service-runner/lib/base_service.js\n- /usr/lib/parsoid/node_modules/service-runner/lib/master.js\n- /usr/lib/parsoid/node_modules/service-runner/service-runner.js","time":"2019-07-01T14:43:04.338Z","v":0}
- {"name":"parsoid","hostname":"homestead","pid":5784,"level":40,"message":"first worker died during startup, continue startup","worker_pid":5796,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2019-07-01T14:43:05.358Z","v":0} 210.195.7.193 (talk) 14:45, 1 July 2019 (UTC)
- Is the file "/usr/lib/parsoid/src/lib/index.js" present? Arlolra (talk) 17:05, 17 July 2019 (UTC)
- Most likely the
modulein /etc/mediawiki/parsoid/config.yaml needs to be updated to point to the right place. Arlolra (talk) 18:18, 17 July 2019 (UTC) - arlolra is right
- edit config.yaml
- point module: /usr/lib/parsoid/src/lib/index.js
- thats it :)
31.166.159.122 (talk) 20:33, 1 December 2019 (UTC)
500 error, VisualEditor not communicating correctly.
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
So, I finally (after what feels like years) of trying to get parsoid and the visual editor installed, I finally did, except, (no surprise) it's not working right. But what I did find interesting was these errors:
(It wouldn't let me add the links)
imgur.com/uQnnKbF
dropbox.com/s/g40ikdchtx7q2ut/500%20Error.txt?dl=0
Obviously, I'm diving into something new here, so I have no idea how to fix any of this, but I'm wondering if anyone can help me figure this out. (I need to make it clear, I've done all the php-curl install stuff, and followed all the instructions, because it seems like everything is installed, just not communicating correctly)
Thanks! Dannymozzer (talk) 18:51, 5 July 2019 (UTC)
- Can anyone help me with this please? Dannymozzer (talk) 19:28, 13 July 2019 (UTC)
- When asked to parse a page, Parsoid makes requests to your MediaWiki API to fetch various configuration and state. The failure is the dropbox link there is Parsoid saying that there was problem getting a response out of MediaWiki. The imgur link looks to be the failure on the MediaWiki end, and it says, "bcmath and gmp extension required for 32 bit machines."
- The stack trace there points to https://github.com/wikimedia/mediawiki/blob/master/includes/utils/UIDGenerator.php#L628
- Above it, it's trying to load "extension_loaded( 'gmp' )" or "extension_loaded( 'bcmath' )".
- Seems like you need to install one of those php extension, like "sudo apt install php-gmp" or the equivalent for your system.
- Hope that helps. Arlolra (talk) 16:38, 17 July 2019 (UTC)
Multiple wikis
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Protip: When setting the config for multiple wikis if you get a duplicate key error it is essential that a line with:
- #
is between each of the uri/domain combinations under mwApis in config.yaml 216.255.253.87 (talk) 14:01, 1 August 2019 (UTC)
"Did not find page revisions for" error. How can I solve this?
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I'm struggling to setup visualeditor.
I think I've set up parsoid almost done.
But when I try this as troubleshooting guide, it reponds this error.
curl -L http://localhost:8142/localhost/v3/page/html/Main_Page/
Did not find page revisions for Main_Page
What should I do? Parkyh1974 (talk) 06:21, 4 October 2019 (UTC)
Wikifarm issues with parsoid
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Has anybody been able to configure and run parsoid on a wikifarm that's sharing resources? I'm following the steps outlined in "the big switch" section which i've been able to get setup successfully. Manual:Wiki family
The problem is when editing pages with similar titles, for instance the Main_Page. When you edit the page from one wiki site, the other sites will show the same edited content from wiki1 when you edit their pages. I'm guessing this is because they're all using the same API. Is there any way around this? Nickm84 (talk) 21:27, 26 October 2019 (UTC)
- I believe there are wikifarms that have had some success running parsoid. Arlolra (talk) 20:15, 13 April 2020 (UTC)
Error loading data from server: 500: apierror-visualeditor-docserver-http: HTTP 500. Would you like to retry?
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello,
Here is my setup :
- Debian 10
- Mediawiki 1.31.4
- VisualEditor 0.1.0
- Parsoid 0.10.0
I installed the above using packages, and using short URLs with the following setup :
LocalSettings.php :
$wgScriptPath = "";
$wgArticlePath = "/wiki/$1";
Then about Parsoid binding with VisualEditor :
$wgVirtualRestConfig['modules']['parsoid'] = array(
'url' => 'http://wiki.example.lan:8142',
'domain' => 'mydomain'
);
In /etc/mediawiki/parsoid/config.yaml, I've set up this :
mwApis:
-
uri: 'http://wiki.example.lan/wiki/api.php'
domain: 'mydomain'
When I'm trying to edit an article with VisualEditor, I get the error described in the subject :
Error loading data from server: 500: apierror-visualeditor-docserver-http: HTTP 500. Would you like to retry?
In /var/log/parsoid/parsoid.log, I see :
"Config Request failure for \"http://wiki.example.lan/wiki/api.php\": 404","time":"2019-12-09T15:11:21.586Z","v":0}
Using curl, I can ask simple things to Parsoid like its version, but that's all.
The wiki is open (no auth restriction).
Obviously, I've read 72% of all internet web pages and tried tons of settings before asking my question here, but now, I don't know what to check.
May you help me please? NicolasEcarnot (talk) 15:27, 9 December 2019 (UTC)
- Are you sure http://wiki.example.lan/wiki/api.php is the correct url for your MediaWiki API?
- Usually that's something like, http://wiki.example.lan/w/api.php or http://wiki.example.lan/api.php Arlolra (talk) 20:33, 9 December 2019 (UTC)
- Hello Arlolra,
- As I'm using short URLs, my wiki is serving its page like the page you're reading at present :
- <code>https://www.mediawiki.org/wiki/Talk%3AParsoid/2019#h-Error_loading_data_from_server%3A_500%3A_apierror-visualeditor-docserver-http%3A_HTTP-2019-12-09T15%3A27%3A00.000Z}</code> so in my case :
- <code>http://wiki.example.lan/wiki/}</code>.
- This URLs shortening is working for articles, but I agree that in the case of special files like load.php, api.php, something has to be looked at. Though, so far, except on this Parsoid issue, things seem to be working nicely.
- You wrote :
Usually that's something like, http://wiki.example.lan/w/api.php or http://wiki.example.lan/api.php
- 1 : Using http://wiki.example.lan/w/api.php, is very similar to http://wiki.example.lan/w/api.php and this only deals with how one shortens the URL in the config file.
- 2 : But using http://wiki.example.lan/api.php does not seem possible to me as I'm serving the mediawiki folder through an apache Alias directive (I did not choose this, this came from the Debian package. About Short URLs, other people here wrote one had to choose between aliases and rewriting. The Debian package maintainers have chosen aliases.)
- I'd be very glad to have a look at the setup of www.mediawiki.org setup files, especially how they shorten their URLs. NicolasEcarnot (talk) 09:29, 10 December 2019 (UTC)
- You'll want to set a $wgScriptPath
- https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/CommonSettings.php#L371 Arlolra (talk) 18:17, 10 December 2019 (UTC)
- Hi,
- are you using the heroku app?
- 1) Make sure that no htpasswd is set up in your /w folder. I realized that the heroku app is not working with a password protected ftp folder.
- 2) Be careful where you set your root directory in your website hosting app. I realized that it worked very well after I set the /w folder under public_html 2003:C6:4F25:E6E0:285D:1D34:EF27:E455 (talk) 15:13, 28 December 2019 (UTC)
Timeout issues
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Looking for advice as to where to continue sorting out this issue. It seems to me that API requests timeout and fail to respond in time, but then eventually responds and Parsoid process everything, but by that point in time the UI has already responded with an error. It doesn't occur every time, but most times. Pages with templates never work.
UI popup message:
Error loading data from server: Could not connect to the server. Would you like to retry?
Logs:
- - 21/Dec/2019:13:08:25 +0000 "GET /Test" 200
- - 21/Dec/2019:13:08:27 +0000 "GET /load.php" 304
- - 21/Dec/2019:13:08:27 +0000 "GET /load.php" 200
- - 21/Dec/2019:13:08:29 +0000 "GET /load.php" 200
- - 21/Dec/2019:13:08:30 +0000 "GET /api.php" 200
{"name":"parsoid","hostname":"30095a5f2051","pid":412,"level":30,"logType":"info","wiki":"wiki$0","title":"Test","oldId":null,"reqId":"36e8196ad5bcc4204e61e57a","userAgent":"VisualEditor-MediaWiki/1.33.1","msg":"started wt2html","longMsg":"started wt2html","levelPath":"info","time":"2019-12-21T13:08:33.047Z","v":0}
{"name":"parsoid","hostname":"30095a5f2051","pid":412,"level":40,"logType":"warn/api/esockettimedout","wiki":"wiki$0","title":"Test","oldId":"34","reqId":"36e8196ad5bcc4204e61e57a","userAgent":"VisualEditor-MediaWiki/1.33.1","msg":"Failed API request, {\"error\":{\"code\":\"ESOCKETTIMEDOUT\",\"connect\":false},\"retries-remaining\":1}","longMsg":"Failed API request,\n{\"error\":{\"code\":\"ESOCKETTIMEDOUT\",\"connect\":false},\"retries-remaining\":1}","levelPath":"warn/api/esockettimedout","time":"2019-12-21T13:09:13.054Z","v":0}
{"name":"parsoid","hostname":"30095a5f2051","pid":412,"level":40,"logType":"warn/api/esockettimedout","wiki":"wiki$0","title":"Test","oldId":"34","reqId":"36e8196ad5bcc4204e61e57a","userAgent":"VisualEditor-MediaWiki/1.33.1","msg":"Failed API request, {\"error\":{\"code\":\"ESOCKETTIMEDOUT\",\"connect\":false},\"retries-remaining\":1}","longMsg":"Failed API request,\n{\"error\":{\"code\":\"ESOCKETTIMEDOUT\",\"connect\":false},\"retries-remaining\":1}","levelPath":"warn/api/esockettimedout","time":"2019-12-21T13:09:13.054Z","v":0}
- - 21/Dec/2019:13:08:30 +0000 "POST /api.php" 500
- - 21/Dec/2019:13:08:32 +0000 "GET /api.php" 200
- - 21/Dec/2019:13:08:33 +0000 "GET /api.php" 200
- - 21/Dec/2019:13:09:13 +0000 "GET /api.php" 200
[DEBUG] | AsyncTokenTransformManager.setFrame []
[DEBUG] | SyncTokenTransformManager.onChunk, input: ["test"]
[DEBUG] | SyncTokenTransformManager.onChunk: emitting ["test"]
[DEBUG] | maybeSyncReturn transforming c-0 {"tokens":["test"]}
[DEBUG] | firstAccum sync c-0 ["test"]
[DEBUG] | AsyncTokenTransformManager onChunk sync ["test"]
[DEBUG] | emitting
[DEBUG] | SyncTokenTransformManager.onChunk, input: ["test"]
0-[PRE-DBG] | saved : []
0-[PRE-DBG] | ----> ["test"]
[DEBUG] | SyncTokenTransformManager.onChunk: emitting []
[DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]
[DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]
[DEBUG] | maybeSyncReturn transforming c-1 {"tokens":[{"type":"NlTk","dataAttribs":{"tsr":[4,5]}}]}
[DEBUG] | maybeSyncReturn transforming c-1 {"tokens":[{"type":"NlTk","dataAttribs":{"tsr":[5,6]}}]}
[DEBUG] | maybeSyncReturn transforming c-1 {"tokens":["test 2"]}
[DEBUG] | firstAccum sync c-1 [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]
[DEBUG] | AsyncTokenTransformManager onChunk sync [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]
[DEBUG] | emitting
[DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]
0-[PRE-DBG] | saved : []
0-[PRE-DBG] | ----> [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}}]
0-[PRE-DBG] | saved : []
0-[PRE-DBG] | ----> [{"type":"NlTk","dataAttribs":{"tsr":[5,6]}}]
0-[PRE-DBG] | saved : []
0-[PRE-DBG] | ----> ["test 2"]
[DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"TagTk","name":"p","attribs":[],"dataAttribs":{}},"test",{"type":"EndTagTk","name":"p","attribs":[],"dataAttribs":{}},{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}}]
0-[HTML-DBG] | Inserting shadow meta for p
0-[HTML-DBG] | Inserting shadow meta for p
[DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"EOFTk"}]
[DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"EOFTk"}]
[DEBUG] | maybeSyncReturn transforming c-2 {"tokens":[{"type":"EOFTk"}]}
[DEBUG] | maybeSyncReturn transforming c-2 {"tokens":[{"type":"EOFTk"}]}
[DEBUG] | firstAccum sync c-2 [{"type":"EOFTk"}]
[DEBUG] | AsyncTokenTransformManager onChunk sync [{"type":"EOFTk"}]
[DEBUG] | emitting
[DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"EOFTk"}]
[DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"TagTk","name":"p","attribs":[],"dataAttribs":{}},"test 2",{"type":"EndTagTk","name":"p","attribs":[],"dataAttribs":{}},{"type":"EOFTk"}]
0-[HTML-DBG] | Inserting shadow meta for p
0-[HTML-DBG] | Inserting shadow meta for p
{"name":"parsoid","hostname":"30095a5f2051","pid":412,"level":30,"logType":"info","wiki":"wiki$0","title":"Test","oldId":34,"reqId":"36e8196ad5bcc4204e61e57a","userAgent":"VisualEditor-MediaWiki/1.33.1","msg":"completed wt2html in 60875.93622291088ms","longMsg":"completed wt2html in 60875.93622291088ms","levelPath":"info","time":"2019-12-21T13:09:33.909Z","v":0}
- - 21/Dec/2019:13:08:30 +0000 "GET /api.php" 200 D8sychain (talk) 18:44, 21 December 2019 (UTC)
- Successful load log:
- - - 21/Dec/2019:13:46:13 +0000 "GET /Test" 200
- - - 21/Dec/2019:13:46:14 +0000 "GET /load.php" 304
- - - 21/Dec/2019:13:46:14 +0000 "GET /load.php" 304
- - - 21/Dec/2019:13:46:14 +0000 "GET /load.php" 304
- - - 21/Dec/2019:13:46:17 +0000 "GET /load.php" 200
- - - 21/Dec/2019:13:46:24 +0000 "GET /api.php" 200
- - - 21/Dec/2019:13:46:24 +0000 "GET /api.php" 200
- {"name":"parsoid","hostname":"30095a5f2051","pid":423,"level":30,"logType":"info","wiki":"wiki$0","title":"Test","oldId":null,"reqId":"fecf319b412cafc20822db0f","userAgent":"VisualEditor-MediaWiki/1.33.1","msg":"started wt2html","longMsg":"started wt2html","levelPath":"info","time":"2019-12-21T13:46:25.244Z","v":0}
- [DEBUG] | AsyncTokenTransformManager.setFrame []
- [DEBUG] | SyncTokenTransformManager.onChunk, input: ["test"]
- [DEBUG] | SyncTokenTransformManager.onChunk: emitting ["test"]
- [DEBUG] | maybeSyncReturn transforming c-0 {"tokens":["test"]}
- [DEBUG] | firstAccum sync c-0 ["test"]
- [DEBUG] | AsyncTokenTransformManager onChunk sync ["test"]
- [DEBUG] | emitting
- [DEBUG] | SyncTokenTransformManager.onChunk, input: ["test"]
- 0-[PRE-DBG] | saved : []
- 0-[PRE-DBG] | ----> ["test"]
- [DEBUG] | SyncTokenTransformManager.onChunk: emitting []
- [DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]
- [DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]
- [DEBUG] | maybeSyncReturn transforming c-1 {"tokens":[{"type":"NlTk","dataAttribs":{"tsr":[4,5]}}]}
- [DEBUG] | maybeSyncReturn transforming c-1 {"tokens":[{"type":"NlTk","dataAttribs":{"tsr":[5,6]}}]}
- [DEBUG] | maybeSyncReturn transforming c-1 {"tokens":["test 2"]}
- [DEBUG] | firstAccum sync c-1 [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]
- [DEBUG] | AsyncTokenTransformManager onChunk sync [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]
- [DEBUG] | emitting
- [DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]
- 0-[PRE-DBG] | saved : []
- 0-[PRE-DBG] | ----> [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}}]
- 0-[PRE-DBG] | saved : []
- 0-[PRE-DBG] | ----> [{"type":"NlTk","dataAttribs":{"tsr":[5,6]}}]
- 0-[PRE-DBG] | saved : []
- 0-[PRE-DBG] | ----> ["test 2"]
- [DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"TagTk","name":"p","attribs":[],"dataAttribs":{}},"test",{"type":"EndTagTk","name":"p","attribs":[],"dataAttribs":{}},{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}}]
- 0-[HTML-DBG] | Inserting shadow meta for p
- 0-[HTML-DBG] | Inserting shadow meta for p
- [DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"EOFTk"}]
- [DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"EOFTk"}]
- [DEBUG] | maybeSyncReturn transforming c-2 {"tokens":[{"type":"EOFTk"}]}
- [DEBUG] | maybeSyncReturn transforming c-2 {"tokens":[{"type":"EOFTk"}]}
- [DEBUG] | firstAccum sync c-2 [{"type":"EOFTk"}]
- [DEBUG] | AsyncTokenTransformManager onChunk sync [{"type":"EOFTk"}]
- [DEBUG] | emitting
- [DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"EOFTk"}]
- [DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"TagTk","name":"p","attribs":[],"dataAttribs":{}},"test 2",{"type":"EndTagTk","name":"p","attribs":[],"dataAttribs":{}},{"type":"EOFTk"}]
- 0-[HTML-DBG] | Inserting shadow meta for p
- 0-[HTML-DBG] | Inserting shadow meta for p
- {"name":"parsoid","hostname":"30095a5f2051","pid":423,"level":30,"logType":"info","wiki":"wiki$0","title":"Test","oldId":34,"reqId":"fecf319b412cafc20822db0f","userAgent":"VisualEditor-MediaWiki/1.33.1","msg":"completed wt2html in 1136.6053849458694ms","longMsg":"completed wt2html in 1136.6053849458694ms","levelPath":"info","time":"2019-12-21T13:46:26.367Z","v":0}
- - - 21/Dec/2019:13:46:23 +0000 "GET /api.php" 200
- - - 21/Dec/2019:13:46:23 +0000 "GET /load.php" 200
- - - 21/Dec/2019:13:46:25 +0000 "GET /api.php" 200
- - - 21/Dec/2019:13:46:26 +0000 "GET /Test" 200
- - - 21/Dec/2019:13:46:26 +0000 "POST /api.php" 200 D8sychain (talk) 18:46, 21 December 2019 (UTC)
- I did not figure out the exact cause, but I switched from SQLite database to MySQL database and the issue went away. D8sychain (talk) 02:14, 27 December 2019 (UTC)