Hi all,
For the 500 error with VisualEditor, according to: Extension:VisualEditor - MediaWiki,
Parsoid over HTTPS
By default, Parsoid only supports HTTP connections. However, it’s easy to provide HTTPS Parsoid by using Stunnel, a utility which offers SSL wrapping for arbitrary sockets. Most Unix distributions have ‘stunnel’ or ‘stunnel4’ package available from the repository. First install stunnel:
It looks like VisualEditor need Stunnel installed.
Also, on that page:
If you are using Let’s Encrypt, you can use the following (replacing
<domain>
with the primary URL you have the certificate for):
● I will use the chain/privkey
directly from /etc/pki/tls/
as they will always point to the right files when the certificate is updated.
● I will adjust:
cert = /etc/pki/tls/certs/chain.pem
key = /etc/pki/tls/private/privkey.pem
[parsoid]
accept = 8143
connect = 8142
But for the ports, I am not sure as nodejs
is listening on port: 8000…
# netstat -plntu | grep node
tcp6 0 0 :::8000 :::* LISTEN 1238/node
udp 0 0 0.0.0.0:59543 0.0.0.0:* 2593/node
udp 0 0 0.0.0.0:59823 0.0.0.0:* 2593/node
udp 0 0 0.0.0.0:51695 0.0.0.0:* 2621/node
#
… and also runs parsoid
.
# ps aux | grep -i node
root 1239 0.0 0.9 985128 36748 ? Ssl 11:04 0:02 /usr/bin/node /opt/parsoid/bin/server.js
root 2623 0.0 1.8 1306716 70752 ? Sl 11:04 0:08 /usr/bin/node /opt/parsoid node_modules/service-runner/service-runner.js
root 2668 0.0 1.7 1306892 66724 ? Sl 11:05 0:07 /usr/bin/node /opt/parsoid node_modules/service-runner/service-runner.js
root 13370 0.0 0.0 112736 996 pts/1 S+ 13:48 0:00 grep --color=auto -i node
#
For sure Parsoid is running…
# ps aux | grep parsoid
root 1239 0.0 0.9 985128 36748 ? Ssl 11:04 0:02 /usr/bin/node /opt/parsoid/bin/server.js
root 2623 0.0 1.8 1306716 70732 ? Sl 11:04 0:08 /usr/bin/node /opt/parsoid/node_modules/service-runner/service-runner.js
root 2668 0.0 1.7 1306892 66716 ? Sl 11:05 0:06 /usr/bin/node /opt/parsoid/node_modules/service-runner/service-runner.js
root 12100 0.0 0.0 112736 980 pts/1 S+ 13:25 0:00 grep --color=auto parsoid
…but listen to no port:
# netstat -plntu | grep -i parsoid
#
I saw from: HOWTO: Use SSL/port 465 in smarthost, that saitobenkei installed Stunnel but it was for a smtp
connection which is not exactly what I need.
My question is:
How to adjust /etc/stunnel/stunnel.conf
?
output=/var/log/stunnel
[smtp-tls-wrapper]
accept=127.0.0.1:11125
client=yes
connect=Your.ISP.SMTP.Server:465
I think that it will be easy to adjust from initd
to systemd
, as the file saitobenkei is using will be OK to use in /etc/systemd/system/stunnel.service
.
Other questions are:
EDITED: 2020-01-20_13h38 HAE
● Why VisualEditor can starts correctly when I create a new file but gives HTTP 500 when I want to save it?
● When I edit a file, VisualEditor does’t start ?
Thank you for any suggestion,
Michel-André
Hi all,
I have this in a log file:
Jan 19 01:32:59 server-name node: {"name":"parsoid","hostname":"server-name/domain-name","pid":2621,"level":60,"err":{"message":"","name":"lib/index.js","stack":"AccessDeniedError: Your wiki requires a logged-in account to access the API.\n at AccessDeniedError (/opt/parsoid/lib/mw/ApiRequest.js:214:3)\n at ConfigRequest._handleJSON (/opt/parsoid/lib/mw/ApiRequest.js:920:13)\n at ConfigRequest.ApiRequest._logWarningsAndHandleJSON (/opt/parsoid/lib/mw/ApiRequest.js:447:7)\n at ConfigRequest.ApiRequest._handleBody (/opt/parsoid/lib/mw/ApiRequest.js:483:7)\n at ConfigRequest.ApiRequest._requestCB (/opt/parsoid/lib/mw/ApiRequest.js:420:8)\n at Request.request [as _callback] (/opt/parsoid/lib/mw/ApiRequest.js:332:35)\n at Request.self.callback (/opt/parsoid/node_modules/request/request.js:185:22)\n at emitTwo (events.js:106:13)\n at Request.emit (events.js:191:7)\n at Request.<anonymous> (/opt/parsoid/node_modules/request/request.js:1157:10)\n at emitOne (events.js:96:13)\n at Request.emit (events.js:188:7)\n at IncomingMessage.<anonymous> (/opt/parsoid/node_modules/request/request.js:1079:12)\n at IncomingMessage.g (events.js:292:16)\n at emitNone (events.js:91:20)\n at IncomingMessage.emit (events.js:185:7)\n at endReadableNT (_stream_readable.js:978:12)\n at _combinedTickCallback (internal/process/next_tick.js:80:11)\n at process._tickCallback (internal/process/next_tick.js:104:9)","httpStatus":401,"levelPath":"fatal/request"},"msg":"Your wiki requires a logged-in account to access the API.","time":"2020-01-19T06:32:59.867Z","v":0}
What user should I create? // AccessDeniedError: Your wiki requires a logged-in account to access the API.
Michel-André