Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New installation 2.2.6 failed #6742

Open
FredMa01 opened this issue Nov 4, 2024 · 10 comments
Open

New installation 2.2.6 failed #6742

FredMa01 opened this issue Nov 4, 2024 · 10 comments

Comments

@FredMa01
Copy link

FredMa01 commented Nov 4, 2024

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
Copy link
Member

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

@SamTV12345
Copy link
Member

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
Copy link
Author

FredMa01 commented Nov 6, 2024

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
Copy link
Member

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
Copy link
Author

FredMa01 commented Nov 6, 2024

sorry :
a2enmode rewrite

@SamTV12345
Copy link
Member

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

@SamTV12345
Copy link
Member

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

@FredMa01
Copy link
Author

FredMa01 commented Nov 6, 2024

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 :
#6693

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

@SamTV12345
Copy link
Member

Could be. Did you have any success in experimenting with the apache config?

@FredMa01
Copy link
Author

FredMa01 commented Nov 15, 2024

I think that there is a problem with the apache config on the new versions of etherpad > 2.1.0 proposed here :
https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy#apache
The line RewriteRule /(.*) ws://localhost:9001/socket.io/$1 [P,L] is blocking and needs to be deactivated
Then you have to add these 2 lines

ProxyPass ws://localhost:9001/socket.io
ProxyPassReverse ws://localhost:9001/socket.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants