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 · 14 comments
Open

New installation 2.2.6 failed #6742

FredMa01 opened this issue Nov 4, 2024 · 14 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

@ralfi
Copy link

ralfi commented Nov 20, 2024

Hi,
same error today after git pull & docker rebuild today.
I try with and without the RewriteRule in apache config. Works many months until today.
Seems really related to apache proxy conf, with vpn and direct ip access everything works.

@ralfi
Copy link

ralfi commented Nov 20, 2024

2024-11-20T14:07:32.703] [INFO] settings - Your Etherpad version is 2.2.6 (970df6c)
[2024-11-20T14:07:34.466] [INFO] http - HTTP server listening for connections
[2024-11-20T14:07:34.466] [INFO] settings - You can access your Etherpad instance at http://0.0.0.0:9001/
[2024-11-20T14:07:34.466] [INFO] settings - The plugin admin page is at http://0.0.0.0:9001/admin/plugins
[2024-11-20T14:07:34.466] [INFO] server - Etherpad is running
[2024-11-20T14:08:04.651] [INFO] Minify - Compress CSS file skins/colibris/index.css.
[2024-11-20T14:08:04.680] [INFO] Minify - Compress JS file skins/colibris/index.js.
[2024-11-20T14:08:11.111] [INFO] Minify - Compress CSS file css/pad.css.
[2024-11-20T14:08:11.175] [INFO] Minify - Compress CSS file skins/colibris/pad.css.
[2024-11-20T14:08:11.176] [INFO] Minify - Compress CSS file /opt/etherpad-lite/src/plugin_packages/ep_table_of_contents/static/css/toc.css.
[2024-11-20T14:08:11.177] [INFO] Minify - Compress CSS file /opt/etherpad-lite/src/plugin_packages/ep_special_characters/static/css/main.css.
[2024-11-20T14:08:11.178] [INFO] Minify - Compress JS file skins/colibris/pad.js.
▲ [WARNING] Comments in CSS use "/* ... */" instead of "//" [js-comment-in-css]

    plugin_packages/.versions/[email protected]/static/css/toc.css:94:43:
      94 │ ...nts-active #toc { width: 20% } // a bit smaller when the commen...
         ╵                                   ~~

[2024-11-20T14:08:11.234] [INFO] Minify - Compress JS file /opt/etherpad-lite/src/plugin_packages/ep_special_characters/static/js/main.js.
[2024-11-20T14:08:11.235] [INFO] Minify - Compress JS file /opt/etherpad-lite/src/plugin_packages/ep_table_of_contents/static/js/toc.js.
[2024-11-20T14:08:13.351] [INFO] access - [CREATE] pad:Test2 socket:1H_RooNan3KdAMvIAAAB IP:ANONYMOUS authorID:a.uRzDLKvhfHru91Fo
[2024-11-20T14:08:13.594] [INFO] Minify - Compress CSS file css/iframe_editor.css.
[2024-11-20T14:08:13.598] [INFO] Minify - Compress CSS file /opt/etherpad-lite/src/plugin_packages/ep_font_size/static/css/size.css.
[2024-11-20T14:08:13.607] [INFO] Minify - Compress CSS file /opt/etherpad-lite/src/plugin_packages/ep_font_family/static/css/fonts.css.
[2024-11-20T14:08:13.608] [INFO] Minify - Compress CSS file /opt/etherpad-lite/src/plugin_packages/ep_font_color/static/css/color.css.
[2024-11-20T14:08:13.609] [INFO] Minify - Compress CSS file /opt/etherpad-lite/src/plugin_packages/ep_headings2/static/css/editor.css.
[2024-11-20T14:08:13.627] [INFO] Minify - Compress CSS file /opt/etherpad-lite/src/plugin_packages/ep_special_characters/static/css/ace.css.
[2024-11-20T14:10:55.495] [INFO] access - [LEAVE] pad:Test2 socket:1H_RooNan3KdAMvIAAAB IP:ANONYMOUS authorID:a.uRzDLKvhfHru91Fo
[2024-11-20T14:17:40.238] [INFO] access - [CREATE] pad:Test2 socket:F17lsAp-RJtmK2nMAAAD IP:ANONYMOUS authorID:a.uRzDLKvhfHru91Fo
[2024-11-20T14:17:44.087] [INFO] access - [LEAVE] pad:Test2 socket:F17lsAp-RJtmK2nMAAAD IP:ANONYMOUS authorID:a.uRzDLKvhfHru91Fo
[2024-11-20T14:17:47.054] [INFO] access - [CREATE] pad:Test2 socket:mj_IqZy5YALPJlZJAAAF IP:ANONYMOUS authorID:a.uRzDLKvhfHru91Fo
[2024-11-20T14:17:48.947] [INFO] access - [LEAVE] pad:Test2 socket:mj_IqZy5YALPJlZJAAAF IP:ANONYMOUS authorID:a.uRzDLKvhfHru91Fo

see here a warn message with access via ip address over vpn, related?

@ralfi
Copy link

ralfi commented Nov 20, 2024

my apache reverse conf

    ProxyVia On
    ProxyRequests Off
    ProxyPreserveHost On

  <Location />
      ProxyPass http://localhost:9001/ retry=0 timeout=30
      ProxyPassReverse http://localhost:9001/
  </Location>

  <Location /socket.io>
      RewriteEngine On
      RewriteCond %{QUERY_STRING} transport=websocket    [NC]
      RewriteRule /(.*) ws://localhost:9001/socket.io/$1 [P,L]
      ProxyPass http://localhost:9001/socket.io retry=0 timeout=30
      ProxyPassReverse http://localhost:9001/socket.io
  </Location>

  <Proxy *>
      Options FollowSymLinks MultiViews
      AllowOverride All
      Order allow,deny
      Allow from all
  </Proxy>

#    Loglevel Info
#    ErrorLog ${APACHE_LOG_DIR}/etherpad-error.log
#    CustomLog ${APACHE_LOG_DIR}/etherpad-access.log combined

@ralfi
Copy link

ralfi commented Nov 21, 2024

@SamTV12345 Can you get a look please, of course also with disabled Rewrite Rule line

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

3 participants