Be sure to check the bottom for updates
I am getting the following error:
Error loading data from server: apierror-visualeditor-docserver-http-error: (curl error: 7) Couldn't connect to server. Would you like to retry?
I don’t know what the problem is. I’ve looked all over and I can’t find an explanation. I think it might be related to the fact that my wiki is loading through https but I’m not sure.
My server set up is a little weird but he it goes:
I have my personal portfolio website which is on shared hosting at ‘example.com’
I use my paid host for my domain and DNS. I set up a subdomain for https://cloud.example.com for my personal cloud server. My personal cloud server works fine. My personal cloud server is hosted on my personal desktop server which is in my house.
I set up a subdomain for wiki.example.com and it is working. I tried to install the Visual Editor and it worked for creating new pages. But if I try to edit a page it doesn’t. So I followed the instructions for setting up Parsoid and it is still not working properly. I keep getting the following error:
Error loading data from server: apierror-visualeditor-docserver-http-error: (curl error: 7) Couldn't connect to server. Would you like to retry?
The really weird thing is that in the process of having these issues I actually had it work ONE time, I was able to use the editor! So I made a changed, saved it, and then refreshed the page to see if it had properly saved and it had, but once I tried to edit it again after that, it wouldn’t work! I have no clue why, or what it was I did…
I also found the Parsoid set up instructions very difficult to follow and confusing. After trying a bunch of different things I finally decided to start over and try this tutorial: https://www.howtoforge.com/tutorial/how-to-install-visualeditor-for-mediawiki-on-centos-7/
I found it much easier to follow but in the end, the thing still isn’t working. I don’t know if following those instructions have muddled the water and perhaps screwed up my attempt further by having two conflicting Parsoid installation attempts or something but as it stands this is the only thing I know how to do.
Also some additional info that might be useful
david@lovelace:/$ curl -v http://localhost:7231/
* Trying 127.0.0.1...
* TCP_NODELAY set
* connect to 127.0.0.1 port 7231 failed: Connection refused
* Failed to connect to localhost port 7231: Connection refused
* Closing connection 0
curl: (7) Failed to connect to localhost port 7231: Connection refused
and
david@lovelace:/$ curl -v http://localhost:8000/.
* Rebuilt URL to: http://localhost:8000/
* Trying 127.0.0.1...
* TCP_NODELAY set
* connect to 127.0.0.1 port 8000 failed: Connection refused
* Failed to connect to localhost port 8000: Connection refused
* Closing connection 0
curl: (7) Failed to connect to localhost port 8000: Connection refused
Also here’s my parsoid error log:
{"name":"parsoid","hostname":"lovelace","pid":465,"level":30,"levelPath":"info/service-runner","msg":"master(465) initializing 4 workers","time":"2018-10-17T06:57:21.576Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":477,"level":30,"levelPath":"info","msg":"loading ...","time":"2018-10-17T06:57:22.634Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":477,"level":30,"levelPath":"info","msg":"ready on :8142","time":"2018-10-17T06:57:22.679Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":484,"level":30,"levelPath":"info","msg":"loading ...","time":"2018-10-17T06:57:23.728Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":484,"level":30,"levelPath":"info","msg":"ready on :8142","time":"2018-10-17T06:57:23.768Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":495,"level":30,"levelPath":"info","msg":"loading ...","time":"2018-10-17T06:57:24.806Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":495,"level":30,"levelPath":"info","msg":"ready on :8142","time":"2018-10-17T06:57:24.843Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":505,"level":30,"levelPath":"info","msg":"loading ...","time":"2018-10-17T06:57:25.883Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":505,"level":30,"levelPath":"info","msg":"ready on :8142","time":"2018-10-17T06:57:25.921Z","v":0}
{"name":"parsoid","hostname":"lovelace","pid":465,"level":40,"levelPath":"warn/service-runner","msg":"startup finished","time":"2018-10-17T06:57:25.923Z","v":0}
Killed
{"name":"parsoid","hostname":"lovelace","pid":27862,"level":30,"levelPath":"info/service-runner","msg":"master(27862) initializing 4 workers","time":"2018-10-18T20:57:11.753Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":27873,"level":30,"levelPath":"info","msg":"loading ...","time":"2018-10-18T20:57:13.004Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":27873,"level":30,"levelPath":"info","msg":"ready on :8142","time":"2018-10-18T20:57:13.041Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":27879,"level":30,"levelPath":"info","msg":"loading ...","time":"2018-10-18T20:57:14.076Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":27879,"level":30,"levelPath":"info","msg":"ready on :8142","time":"2018-10-18T20:57:14.113Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":27889,"level":30,"levelPath":"info","msg":"loading ...","time":"2018-10-18T20:57:15.151Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":27889,"level":30,"levelPath":"info","msg":"ready on :8142","time":"2018-10-18T20:57:15.189Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":27899,"level":30,"levelPath":"info","msg":"loading ...","time":"2018-10-18T20:57:16.244Z","v":0}
{"name":"../src/lib/index.js","hostname":"lovelace","pid":27899,"level":30,"levelPath":"info","msg":"ready on :8142","time":"2018-10-18T20:57:16.283Z","v":0}
{"name":"parsoid","hostname":"lovelace","pid":27862,"level":40,"levelPath":"warn/service-runner","msg":"startup finished","time":"2018-10-18T20:57:16.284Z","v":0}
EDIT-1:
Okay so I managed to figure out where my parsoid stuff is actually installed. I have one installation at /usr/lib/parsoid and another at /opt/parsoid . The second one at least makes sense to me because I remember making it from the tutorial I linked in the first part of my post, but I don’t remember how the first got there and I don’t understand from the instructions on the Parsoid Setup page how it got there though I assume it was from when I git downloaded it or something.
I tried running node bin/server.js
at the opt location to see what would happen and I got the following output:
david@lovelace:/opt/parsoid/bin$ node server.js {"name":"parsoid","hostname":"lovelace","pid":32683,"level":30,"levelPath":"info/service-runner","msg":"master(32683) initializing 4 workers","time":"2018-10-18T23:44:30.091Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":32693,"level":60,"code":"MODULE_NOT_FOUND","moduleName":"../src/lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Cannot find module '/opt/parsoid/src/lib/index.js'","time":"2018-10-18T23:44:30.716Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":32683,"level":40,"message":"first worker died during startup, continue startup","worker_pid":32693,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2018-10-18T23:44:31.726Z","v":0}
I also ran the command at my usr/parsoid/bin location and got this:
david@lovelace:/usr/lib/parsoid/src/bin$ node server.js {"name":"parsoid","hostname":"lovelace","pid":13016,"level":30,"levelPath":"info/service-runner","msg":"master(13016) initializing 4 workers","time":"2018-10-19T00:42:42.061Z","v":0} {"name":"../src/lib/index.js","hostname":"lovelace","pid":13027,"level":30,"levelPath":"info","msg":"loading ...","time":"2018-10-19T00:42:43.300Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":13027,"level":60,"err":{"message":"bind EADDRINUSE null:8000","name":"Error","stack":"Error: bind EADDRINUSE null:8000\n at Object._errnoException (util.js:1022:11)\n at _exceptionWithHostPort (util.js:1044:20)\n at listenOnMasterHandle (net.js:1427:16)\n at rr (internal/cluster/child.js:121:12)\n at Worker.send (internal/cluster/child.js:88:7)\n at process.onInternalMessage (internal/cluster/utils.js:42:8)\n at emitTwo (events.js:131:20)\n at process.emit (events.js:214:7)\n at emit (internal/child_process.js:772:12)\n at _combinedTickCallback (internal/process/next_tick.js:141:11)\n at process._tickCallback (internal/process/next_tick.js:180:9)","code":"EADDRINUSE","errno":"EADDRINUSE","syscall":"bind","address":null,"port":8000,"levelPath":"fatal/service-runner/unhandled"},"msg":"bind EADDRINUSE null:8000","time":"2018-10-19T00:42:43.338Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":13027,"level":60,"err":{"message":"bind EADDRINUSE null:8000","name":"Error","stack":"Error: bind EADDRINUSE null:8000\n at Object._errnoException (util.js:1022:11)\n at _exceptionWithHostPort (util.js:1044:20)\n at listenOnMasterHandle (net.js:1427:16)\n at rr (internal/cluster/child.js:121:12)\n at Worker.send (internal/cluster/child.js:88:7)\n at process.onInternalMessage (internal/cluster/utils.js:42:8)\n at emitTwo (events.js:131:20)\n at process.emit (events.js:214:7)\n at emit (internal/child_process.js:772:12)\n at _combinedTickCallback (internal/process/next_tick.js:141:11)\n at process._tickCallback (internal/process/next_tick.js:180:9)","code":"EADDRINUSE","errno":"EADDRINUSE","syscall":"bind","address":null,"port":8000,"levelPath":"fatal/service-runner/unhandled"},"msg":"bind EADDRINUSE null:8000","time":"2018-10-19T00:42:43.338Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":13016,"level":40,"message":"first worker died during startup, continue startup","worker_pid":13027,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2018-10-19T00:42:43.445Z","v":0} {"name":"../src/lib/index.js","hostname":"lovelace","pid":13033,"level":30,"levelPath":"info","msg":"loading ...","time":"2018-10-19T00:42:44.500Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":13033,"level":60,"err":{"message":"bind EADDRINUSE null:8000","name":"Error","stack":"Error: bind EADDRINUSE null:8000\n at Object._errnoException (util.js:1022:11)\n at _exceptionWithHostPort (util.js:1044:20)\n at listenOnMasterHandle (net.js:1427:16)\n at rr (internal/cluster/child.js:121:12)\n at Worker.send (internal/cluster/child.js:88:7)\n at process.onInternalMessage (internal/cluster/utils.js:42:8)\n at emitTwo (events.js:131:20)\n at process.emit (events.js:214:7)\n at emit (internal/child_process.js:772:12)\n at _combinedTickCallback (internal/process/next_tick.js:141:11)\n at process._tickCallback (internal/process/next_tick.js:180:9)","code":"EADDRINUSE","errno":"EADDRINUSE","syscall":"bind","address":null,"port":8000,"levelPath":"fatal/service-runner/unhandled"},"msg":"bind EADDRINUSE null:8000","time":"2018-10-19T00:42:44.536Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":13033,"level":60,"err":{"message":"bind EADDRINUSE null:8000","name":"Error","stack":"Error: bind EADDRINUSE null:8000\n at Object._errnoException (util.js:1022:11)\n at _exceptionWithHostPort (util.js:1044:20)\n at listenOnMasterHandle (net.js:1427:16)\n at rr (internal/cluster/child.js:121:12)\n at Worker.send (internal/cluster/child.js:88:7)\n at process.onInternalMessage (internal/cluster/utils.js:42:8)\n at emitTwo (events.js:131:20)\n at process.emit (events.js:214:7)\n at emit (internal/child_process.js:772:12)\n at _combinedTickCallback (internal/process/next_tick.js:141:11)\n at process._tickCallback (internal/process/next_tick.js:180:9)","code":"EADDRINUSE","errno":"EADDRINUSE","syscall":"bind","address":null,"port":8000,"levelPath":"fatal/service-runner/unhandled"},"msg":"bind EADDRINUSE null:8000","time":"2018-10-19T00:42:44.537Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":13016,"level":40,"message":"first worker died during startup, continue startup","worker_pid":13033,"exit_code":1,"startup_attempt":2,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2018-10-19T00:42:44.642Z","v":0} {"name":"../src/lib/index.js","hostname":"lovelace","pid":13039,"level":30,"levelPath":"info","msg":"loading ...","time":"2018-10-19T00:42:45.684Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":13039,"level":60,"err":{"message":"bind EADDRINUSE null:8000","name":"Error","stack":"Error: bind EADDRINUSE null:8000\n at Object._errnoException (util.js:1022:11)\n at _exceptionWithHostPort (util.js:1044:20)\n at listenOnMasterHandle (net.js:1427:16)\n at rr (internal/cluster/child.js:121:12)\n at Worker.send (internal/cluster/child.js:88:7)\n at process.onInternalMessage (internal/cluster/utils.js:42:8)\n at emitTwo (events.js:131:20)\n at process.emit (events.js:214:7)\n at emit (internal/child_process.js:772:12)\n at _combinedTickCallback (internal/process/next_tick.js:141:11)\n at process._tickCallback (internal/process/next_tick.js:180:9)","code":"EADDRINUSE","errno":"EADDRINUSE","syscall":"bind","address":null,"port":8000,"levelPath":"fatal/service-runner/unhandled"},"msg":"bind EADDRINUSE null:8000","time":"2018-10-19T00:42:45.724Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":13039,"level":60,"err":{"message":"bind EADDRINUSE null:8000","name":"Error","stack":"Error: bind EADDRINUSE null:8000\n at Object._errnoException (util.js:1022:11)\n at _exceptionWithHostPort (util.js:1044:20)\n at listenOnMasterHandle (net.js:1427:16)\n at rr (internal/cluster/child.js:121:12)\n at Worker.send (internal/cluster/child.js:88:7)\n at process.onInternalMessage (internal/cluster/utils.js:42:8)\n at emitTwo (events.js:131:20)\n at process.emit (events.js:214:7)\n at emit (internal/child_process.js:772:12)\n at _combinedTickCallback (internal/process/next_tick.js:141:11)\n at process._tickCallback (internal/process/next_tick.js:180:9)","code":"EADDRINUSE","errno":"EADDRINUSE","syscall":"bind","address":null,"port":8000,"levelPath":"fatal/service-runner/unhandled"},"msg":"bind EADDRINUSE null:8000","time":"2018-10-19T00:42:45.724Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":13016,"level":40,"message":"first worker died during startup, continue startup","worker_pid":13039,"exit_code":1,"startup_attempt":3,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2018-10-19T00:42:45.833Z","v":0} {"name":"../src/lib/index.js","hostname":"lovelace","pid":13045,"level":30,"levelPath":"info","msg":"loading ...","time":"2018-10-19T00:42:46.901Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":13045,"level":60,"err":{"message":"bind EADDRINUSE null:8000","name":"Error","stack":"Error: bind EADDRINUSE null:8000\n at Object._errnoException (util.js:1022:11)\n at _exceptionWithHostPort (util.js:1044:20)\n at listenOnMasterHandle (net.js:1427:16)\n at rr (internal/cluster/child.js:121:12)\n at Worker.send (internal/cluster/child.js:88:7)\n at process.onInternalMessage (internal/cluster/utils.js:42:8)\n at emitTwo (events.js:131:20)\n at process.emit (events.js:214:7)\n at emit (internal/child_process.js:772:12)\n at _combinedTickCallback (internal/process/next_tick.js:141:11)\n at process._tickCallback (internal/process/next_tick.js:180:9)","code":"EADDRINUSE","errno":"EADDRINUSE","syscall":"bind","address":null,"port":8000,"levelPath":"fatal/service-runner/unhandled"},"msg":"bind EADDRINUSE null:8000","time":"2018-10-19T00:42:46.937Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":13045,"level":60,"err":{"message":"bind EADDRINUSE null:8000","name":"Error","stack":"Error: bind EADDRINUSE null:8000\n at Object._errnoException (util.js:1022:11)\n at _exceptionWithHostPort (util.js:1044:20)\n at listenOnMasterHandle (net.js:1427:16)\n at rr (internal/cluster/child.js:121:12)\n at Worker.send (internal/cluster/child.js:88:7)\n at process.onInternalMessage (internal/cluster/utils.js:42:8)\n at emitTwo (events.js:131:20)\n at process.emit (events.js:214:7)\n at emit (internal/child_process.js:772:12)\n at _combinedTickCallback (internal/process/next_tick.js:141:11)\n at process._tickCallback (internal/process/next_tick.js:180:9)","code":"EADDRINUSE","errno":"EADDRINUSE","syscall":"bind","address":null,"port":8000,"levelPath":"fatal/service-runner/unhandled"},"msg":"bind EADDRINUSE null:8000","time":"2018-10-19T00:42:46.937Z","v":0} {"name":"parsoid","hostname":"lovelace","pid":13016,"level":60,"err":{"message":"Cannot read property 'pid' of undefined","name":"TypeError","stack":"TypeError: Cannot read property 'pid' of undefined\n at Worker.startupWorkerExit (/usr/lib/parsoid/node_modules/service-runner/lib/master.js:184:57)\n at emitTwo (events.js:126:13)\n at Worker.emit (events.js:214:7)\n at ChildProcess.worker.process.once (internal/cluster/master.js:185:12)\n at Object.onceWrapper (events.js:317:30)\n at emitTwo (events.js:126:13)\n at ChildProcess.emit (events.js:214:7)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)","levelPath":"fatal/service-runner/unhandled"},"msg":"Cannot read property 'pid' of undefined","time":"2018-10-19T00:42:47.045Z","v":0}