ether / etherpad-lite

Etherpad: A modern really-real-time collaborative document editor.
http://docs.etherpad.org/
Apache License 2.0
16.72k stars 2.85k forks source link

New installation 2.2.6 failed #6742

Open FredMa01 opened 1 week ago

FredMa01 commented 1 week ago

Describe the bug When opening pad after new installation of etherpad , I have the error : "Error: Reconnect timed out" Etherpad version 2.2.6 pnpm version: 9.12.3 Apache 2 with SSL enabled and configuration https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy#with-ssl-enabled

To Reproduce New installation : npm install -g pnpm git clone -b master https://github.com/ether/etherpad-lite.git etherpad pnpm i pnpm run build:etherpad chown -R etherpad:etherpad /home/etherpad pnpm run prod

Error Error: Uncaught Error: Reconnect timed out -- { errorId: 'DNpnZWeABTz4LZZt3ft4', type: 'Uncaught exception', msg: 'Error: Uncaught Error: Reconnect timed out', url: 'https://mypad.example.com/p/a', source: 'https://mypad.example.com/padbootstrap-QFqMdltcc9w.min.js', linenumber: 56, userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36', stack: 'Error: Reconnect timed out\n' + ' at Po. (https://mypad.example.com/padbootstrap-QFqMdltcc9w.min.js:56:85557)\n' + ' at at.emit (https://mypad.example.com/padbootstrap-QFqMdltcc9w.min.js:56:44848)\n' + ' at Po.reconnect (https://mypad.example.com/padbootstrap-QFqMdltcc9w.min.js:56:81013)\n' + ' at https://mypad.example.com/padbootstrap-QFqMdltcc9w.min.js:56:81283\n' + ' at Ro.a (https://mypad.example.com/padbootstrap-QFqMdltcc9w.min.js:56:79280)\n' + ' at at.emit (https://mypad.example.com/padbootstrap-QFqMdltcc9w.min.js:56:44848)\n' + ' at Ro._onError (https://mypad.example.com/padbootstrap-QFqMdltcc9w.min.js:56:61762)\n' + ' at at.emit (https://mypad.example.com/padbootstrap-QFqMdltcc9w.min.js:56:44848)\n' + ' at No.onError (https://mypad.example.com/padbootstrap-QFqMdltcc9w.min.js:56:46640)\n' + ' at ws.onerror (https://mypad.example.com/padbootstrap-QFqMdltcc9w.min.js:56:52951)'

SamTV12345 commented 1 week ago

I'll check this right now :). It is probably outdated.

SamTV12345 commented 1 week ago

I maybe need help how to even get the reverse proxy installed. Could you please give me a quickstart on how to install apache? I need some modules but no idea how to install or where to get them

FredMa01 commented 1 week ago

On Debian :

apt install apache2

Activate proxy modules : a2enmod proxy proxy_http headers proxy_wstunnel deflate

Edit virtualhost in /etc/apache2/sites-available/etherpad.conf https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy#apache

Activate virtualhost : a2ensite etherpad

Restart Apache2 : systemctl reload apache2

SamTV12345 commented 1 week ago

I get Nov 06 21:22:12 ubuntu apachectl[13570]: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

FredMa01 commented 1 week ago

sorry : a2enmode rewrite

SamTV12345 commented 1 week ago

Thanks now it works. I used the very basic script.

SamTV12345 commented 1 week ago

It all works with the basic script for me. I copied 1 to 1. Socket IO works even websockets are succesfully connected.

FredMa01 commented 1 week ago

If I use the very basic script, I have "Uncaught Error: Reconnect timed out". If I delete one line and add 2 in <Location /socket.io>:

- RewriteRule /(.*) ws://localhost:9001/socket.io/$1 [P,L]
+ ProxyPass ws://localhost:9001/socket.io
+ ProxyPassReverse ws://localhost:9001/socket.io

It all works ! I saw it in this issue with the same padbootstrap-xxxxxxxxxxxxxxxxx.min.js:56 Uncaught Error : https://github.com/ether/etherpad-lite/issues/6693

Strange... Perhaps something to change here : https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy#apache