Please help, I am trying to troubleshoot my Parsoid node from the command line.
From the CLI of my Centos7 host:
1) when I type netstat -plntu
I am able to confirm that Parsoid is running on port 8000
tcp6 0 0 :::8000 :::* LISTEN 27853/node
2) when I type: curl http://127.0.0.1/mywiki/api.php
the response is the expected html page code of the api.php page
3) when I type curl http://127.0.0.1:8000/version
it responds with the appropriate Parsoid version info:
{"name":"parsoid","version":"0.7.1+git","sha":"a47a89845a93b4cd1fa961494d156f2555ce2531"}
4) but when I run: curl -L http://127.0.0.1:8000/localhost/v3/page/html/Main_Page/
it fails with:
error: Failed to parse the JSON response for Config Request path: /localhost/v3/page/html/Main_Page/ lib/index.js: Failed to parse the JSON response for Config Request at ConfigRequest.ApiRequest._handleBody (/opt/parsoid/lib/mw/ApiRequest.js:470:12) at ConfigRequest.ApiRequest._requestCB (/opt/parsoid/lib/mw/ApiRequest.js:421:8) at Request.self.callback (/opt/parsoid/node_modules/request/request.js:186:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/opt/parsoid/node_modules/request/request.js:1163:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage.<anonymous> (/opt/parsoid/node_modules/request/request.js:1085:12) at IncomingMessage.g (events.js:292:16) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)
my config.yaml is configured as:
uri: 'http://127.0.0.1/mywiki/api.php' domain: 'localhost'
and my localsettings.php is configured as:
if ( $REMOTE_ADDR == '127.0.0.1' ) { $wgGroupPermissions['*']['read'] = true; $wgGroupPermissions['*']['edit'] = true; } wfLoadExtension( 'VisualEditor' ); $wgDefaultUserOptions['visualeditor-enable'] = 1; $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor"; $wgHiddenPrefs[] = 'visualeditor-enable'; $wgDefaultUserOptions['visualeditor-enable-experimental'] = 1; $wgVirtualRestConfig['modules']['parsoid'] = array( 'url' => 'http://localhost:8000', 'domain' => 'localhost', 'prefix' => 'localhost' ); $wgVisualEditorAvailableNamespaces = [ NS_MAIN => true, NS_TALK => true, NS_USER => true, "_merge_strategy" => "array_plus" ]; $wgSessionsInObjectCache = true; $wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;
here is npm version:
/opt/parsoid/ #npm version { parsoid: '0.8.0+git', npm: '3.10.10', ares: '1.10.1-DEV', http_parser: '2.7.1', icu: '50.1.2', modules: '48', node: '6.12.3', openssl: '1.0.2k-fips', uv: '1.10.2', v8: '5.1.281.111', zlib: '1.2.7' }
Questions:
- What could cause the "Failed to parse the JSON response for Config Request path" error?
- What other information could be relevant to the command line testing of the Parsoid
- What other tests can I run?
- Where are the Parsoid errors being logged?