So I'm getting the 500 error message from VE, and this is my parsoid log file on the parsoid server that attempted to handle the request. Not sure if this helps.
[info][master][7904] initializing 4 workers [info][worker][7924] loading ... [info][worker][7912] loading ... [info][worker][7918] loading ... [info][worker][7930] loading ... [info][worker][7912] ready on 192.168.56.80:8000 [info][worker][7918] ready on 192.168.56.80:8000 [info][worker][7924] ready on 192.168.56.80:8000 [info][worker][7930] ready on 192.168.56.80:8000 { "0": "Starting HTTP request: ", "1": { "method": "GET", "followRedirect": true, "uri": "http://192.168.56.63:8081/demo/api.php", "qs": { "format": "json", "action": "query", "meta": "siteinfo", "siprop": "namespaces|namespacealiases|magicwords|functionhooks|extensiontags|general|interwikimap|languages|protocols|specialpagealiases", "rawcontinue": 1 }, "timeout": 40000, "agent": { "domain": null, "_events": {}, "_eventsCount": 1, "defaultPort": 80, "protocol": "http:", "options": { "maxSockets": 15, "connectTimeout": 5000, "path": null }, "requests": {}, "sockets": {}, "freeSockets": {}, "keepAliveMsecs": 1000, "keepAlive": false, "maxSockets": 15, "maxFreeSockets": 256 }, "headers": { "X-Request-ID": null, "User-Agent": "Parsoid/0.5.1+git", "Connection": "close" }, "strictSSL": true, "proxy": "http://192.168.56.63:8081/" } } (on a functioning installation normally there are several more entries after the JSON above)
--James
On Wed, Jun 7, 2017 at 11:33 PM, James Montalvo jamesmontalvo3@gmail.com wrote:
I had a mistake in the config written in my original email, but it was correct on my servers.
192.168.56.80 LocalSettings.php snippet:
$wgVirtualRestConfig['modules']['parsoid'] = array( 'url' => 'http://192.168.56.63:8001', 'HTTPProxy' => 'http://192.168.56.63:8001', 'domain' => $wikiId, 'prefix' => $wikiId );
192.168.56.80 localsettings.js snippet:
parsoidConfig.setMwApi({ uri: 'http://192.168.56.63:8081/demo/api.php', proxy: { uri: 'http://192.168.56.63:8081/' }, domain: 'demo', prefix: 'demo' }); parsoidConfig.serverInterface = '192.168.56.80';
192.168.56.60 LocalSettings.php snippet:
$wgVirtualRestConfig['modules']['parsoid'] = array( 'url' => 'http://192.168.56.63:8001', 'HTTPProxy' => 'http://192.168.56.63:8001', 'domain' => $wikiId, 'prefix' => $wikiId );
192.168.56.60 localsettings.js snippet:
parsoidConfig.setMwApi({ uri: 'http://192.168.56.63:8081/demo/api.php', proxy: { uri: 'http://192.168.56.63:8081/' }, domain: 'demo', prefix: 'demo' }); parsoidConfig.serverInterface = '192.168.56.60';
Sorry for the bad info, and thanks to Subramanya for pointing it out.
--James
On Wed, Jun 7, 2017 at 10:30 PM, James Montalvo jamesmontalvo3@gmail.com wrote:
Setting up RESTBase is very involved. I'd really prefer not to add that complexity at this time. Also I'm not sure at my scale RESTBase would provide much performance benefit (though I don't know much about it so that's just a hunch). The parsoid and VE configs have fields for proxy (as shown in my snippets), so it seems like running them this way is intended. Am I wrong?
Thanks, James
On Jun 7, 2017 8:12 PM, "C. Scott Ananian" cananian@wikimedia.org wrote:
I think in general the first thing you should do for performance is set up restbase in front of parsoid? Caching the parsoid results will be faster than running multiple parsoids in parallel. That would also match the wmf configuration more closely, which would probably help us help you. I wrote up instructions for configuring restbase on the VE and Parsoid wiki pages. As it turns out I updated these today to use VRS configuration. Let me know if you run into trouble, perhaps some further minor updates are necessary. --scott
On Jun 7, 2017 6:26 PM, "James Montalvo" jamesmontalvo3@gmail.com wrote:
I'm trying to setup two Parsoid servers to play nicely with two
MediaWiki
application servers and am having some issues. I have no problem
getting
things working with Parsoid on a single app server, or multiple Parsoid servers being used by a single app server, but ran into issues when I increased to multiple app servers. To try to get this working I
starting
making the app and Parsoid servers communicate through my load
balancer. So
an overview of my config is:
Load balancer = 192.168.56.63
App1 = 192.168.56.80 App2 = 192.168.56.60
Parsoid1 = 192.168.56.80 Parsoid2 = 192.168.56.60
Note, App1 and Parsoid1 are the same server, and App2 and Parsoid2 are
the
same server. I can only spin up so many VMs on my laptop.
The load balancer (HAProxy) is configured as follows:
- 80 forwards to 443
- 443 forwards to App1 and App2 port 8080
- 8081 forwards to App1 and App2 port 8080 (this will be a private
network
connection later)
- 8001 forwards to Parsoid1 and Parsoid2 port 8000 (also will be
private)
On App1/Parsoid1 I can run `curl 192.168.56.63:8001` and get the appropriate response from Parsoid. I can run `curl 192.168.56.63:8081`
and
get the appropriate response from MediaWiki. The same is true for both
on
App2/Parsoid2. So the servers can get the info they need from the
services.
Currently I'm getting a the error "Error loading data from server: 500: docserver-http: HTTP 500. Would you like to retry?" when attempting to
use
Visual Editor. I've tried various different settings and have not
always
gotten that specific error, but am getting it with the settings I
currently
have in localsettings.js and LocalSettings.php (shown below in this
email).
Removing the proxy config lines from these settings gave slightly
better
results. I did not get the 500 error, but instead it sometimes after a
very
long time it would work. It also may have been throwing errors in the parsoid log (with debug on). I have those logs saved if they help. I'm hoping someone can just point out some misconfiguration, though.
Here are snippets of my config files:
On App1/Parsoid1, relevant localsettings.js:
parsoidConfig.setMwApi({
uri: 'http://192.168.56.80:8081/demo/api.php', proxy: { uri: 'http://192.168.56.80:8081/' }, domain: 'demo', prefix: 'demo' } );
parsoidConfig.serverInterface = '192.168.56.80';
On App2/Parsoid2, relevant localsettings.js:
parsoidConfig.setMwApi({
uri: 'http://192.168.56.80:8081/demo/api.php', proxy: { uri: 'http://192.168.56.80:8081/' },
domain: 'demo', prefix: 'demo'
} );
parsoidConfig.serverInterface = '192.168.56.60';
On App1/Parsoid1, relevant LocalSettings.php:
$wgVirtualRestConfig['modules']['parsoid'] = array( 'url' => '192.168.56.80:8001',
'HTTPProxy' => 'http://192.168.56.80:8001',
'domain' => $wikiId, 'prefix' => $wikiId );
On App2/Parsoid2, relevant LocalSettings.php:
$wgVirtualRestConfig['modules']['parsoid'] = array( 'url' => '192.168.56.80:8001',
'HTTPProxy' => 'http://192.168.56.80:8001',
'domain' => $wikiId, 'prefix' => $wikiId );
Thanks!
--James _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l