Pydio install debian buster websocket timeout error

I just installed pydio on a public server. I had tested this on a local server and everything seemed fine and working.
This installation was on a Debian 10 buster. I have this on a VM behind iptables but have configured nat to accept and pass port 8081, which is the port I used.

This machine does serve many domains using virtualmin.

I had a lot of issues getting is going, however after I flushed the DB, cleared the files in /var/cells/services and re-ran cells configure to use 0.0.0.0 with self-signed certs

+---+----------------------+--------------------+-------------------------------+
| # |       BIND(S)        |        TLS         |         EXTERNAL URL          |
+---+----------------------+--------------------+-------------------------------+
| 0 | https://0.0.0.0:8081 | Self-Signed | https://sub.domain.ca |
+---+----------------------+--------------------+------------------------------

I can now access the GUI, either through apache reverse proxy with default explained here by https://sub.domain.ca, and by https://sub.domain.ca:8081

However now I am getting a websocket error.

CONNECTION ISSUE: Websocket seems t obe disconnected, please make sure that the server is up and websocket connection is working

The bottom of the GUI also gives

Unsuccessful HTTP response

Web Console gives this

WebSocket connection to ‘wss://shares.smbservices.ca/ws/event’ failed
WebSocket Closed Connection:The connection was closed abnormally, e.g., without sending or receiving a Close control frame (code 1006)

What I find strange is I have mattermost and RocketChat working on this server, both using websockets and they are working fine. So there must be some kind of config issues.

any ideas?

as for logs
journalctl -fu cells -S -1h is pretty clean

Apr 14 13:18:32 sub.domain.ca cells[9995]: 2022-04-14T13:18:32.429-0400        ERROR        pydio.rest.activity        Could not prepare start         {"error": "timeout"}
Apr 14 13:18:33 sub.domain.ca cells[9995]: 2022-04-14T13:18:33.208-0400        ERROR        pydio.gateway.websocket        Could not prepare start         {"error": "timeout"}

Hi, very probably an issue with the reverse-proxy and the websocket forwarding. Did you check how you configured apache for the other apps (mattermost/rocketchat) ?

@charles

I tried playing with the rocket chat websockets strings, but got nothing out of it.

the web console also gives me:

WebSocket connection to ‘wss://shares.smbservices.ca/ws/event’ failed:
WebSocket Closed Connection:The connection was closed abnormally, e.g., without sending or receiving a Close control frame (code 1006)
VM1611:1 POST https://shares.smbservices.ca/a/activity/stream 500
Error: Unsuccessful HTTP response
at Request.eval (eval at (starting.html:1:1), :1:3614697)
at Request.Emitter.emit (eval at (starting.html:1:1), :1:3398540)
at XMLHttpRequest.xhr.onreadystatechange (eval at (starting.html:1:1), :1:3619224)

Here is what I have configured in case there is something someone can catch that I cannot
( I’ve removed the domains, please excuse any typos )

rocket chat

<VirtualHost *:443>
    SuexecUserGroup "#1010" "#1007"
    ServerName rocket.domain.ca
    DocumentRoot ../rocket.domain.ca/public_html
    ErrorLog ../rocket.domain.ca/rocket.ca_error_log
    CustomLog ../rocket.domain.ca/rocket.ca_access_log combined

        #       rocket chat
        RewriteEngine On
        RewriteCond %{HTTP:Upgrade} =websocket [NC]
        RewriteRule /(.*) wss://localhost:3000/$1 [P,L]
        RewriteCond %{HTTP:Upgrade} !=websocket [NC]
        RewriteRule /(.*) http://localhost:3000/$1 [P,L]

        ProxyPassReverse /           http://localhost:3000/

        SSLCertificateFile /etc/letsencrypt/live/rocket.domain.ca/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/rocket.domain.ca/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/live/domain.ca/chain.pem


</VirtualHost>

Mattermost

        ProxyPreserveHost On

        # Set web sockets
        RewriteEngine On
        RewriteCond %{REQUEST_URI} /api/v[0-9]+/(users/)?websocket [NC]
        RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
        RewriteCond %{HTTP:CONNECTION} \bUpgrade\b [NC]
        RewriteRule .* ws://127.0.0.1:8065%{REQUEST_URI} [P,QSA,L]

        <Location />
                Require all granted
                ProxyPass http://127.0.0.1:8065/
                ProxyPassReverse http://127.0.0.1:8065/
                ProxyPassReverseCookieDomain 127.0.0.1 matter.domain.ca
        </Location>

        SSLCertificateFile /etc/letsencrypt/live/rocket.domain.ca/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/rocket.domain.ca//privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/live/domain.ca/chain.pem

Pydio config

<VirtualHost *:443>
    ServerName sub.domain.ca
    AllowEncodedSlashes On
    RewriteEngine On
    SSLProxyEngine On
        #       This needed to be added because the certificates common name did not match the server name
        #       This was for error apache AH01084: pass request body failed, in browser showed 'Reason: Error during SSL Handshake with remote server' 
        SSLProxyCheckPeerCN off

    ## The order of the directives matters.
    # If Cells is not running with https, consider using ws instead of wss
    ProxyPassMatch "/ws/(.*)" ws://localhost:8081/ws/$1 nocanon

    ## This rewrite condition is required if using Cells-Sync
    RewriteCond %{HTTP:Content-Type} =application/grpc [NC]
    RewriteRule /(.*) h2://localhost:8081/$1 [P,L]

    ProxyPass "/" "https://localhost:8081/"
    ProxyPassReverse "/" "https://localhost:8081/"

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.