# Pydio install debian buster websocket timeout error

**URL:** <https://forum.pydio.com/t/pydio-install-debian-buster-websocket-timeout-error/4438>\
**Category:** Pydio Cells\
**Created:** [April 14, 2022, 6:52pm UTC](https://forum.pydio.com/t/pydio-install-debian-buster-websocket-timeout-error/4438 "2022-04-14T18:52:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guy\_St-Louis](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/guy_st-louis/32/1730_2.png) [@Guy\_St-Louis](https://forum.pydio.com/u/Guy_St-Louis)\
**Post date:** [April 14, 2022, 6:52pm UTC](https://forum.pydio.com/t/pydio-install-debian-buster-websocket-timeout-error/4438/1 "2022-04-14T18:52:49Z")

</div>

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

```auto
+---+----------------------+--------------------+-------------------------------+
| # | 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](https://pydio.com/en/docs/kb/deployment/running-cells-behind-apache-reverse-proxy) by [https://sub.domain.ca](https://sub.domain.ca), and by [https://sub.domain.ca:8081](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

```auto
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"}

```

---

<div class="post-metadata">

**Author:** ![charles](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/charles/32/3_2.png) [@charles](https://forum.pydio.com/u/charles)\
**Post date:** [April 15, 2022, 10:57am UTC](https://forum.pydio.com/t/pydio-install-debian-buster-websocket-timeout-error/4438/2 "2022-04-15T10:57:48Z")

</div>

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) ?

---

<div class="post-metadata">

**Author:** ![Guy\_St-Louis](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/guy_st-louis/32/1730_2.png) [@Guy\_St-Louis](https://forum.pydio.com/u/Guy_St-Louis)\
**Post date:** [April 15, 2022, 5:31pm UTC](https://forum.pydio.com/t/pydio-install-debian-buster-websocket-timeout-error/4438/3 "2022-04-15T17:31:42Z")

</div>

@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](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

```auto
<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

```auto
        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

```auto
<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

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/6/61f19fa52ec15fd4250db51aea351adba0e831fd.png) [@system](https://forum.pydio.com/u/system)\
**Post date:** [May 16, 2023, 10:30am UTC](https://forum.pydio.com/t/pydio-install-debian-buster-websocket-timeout-error/4438/4 "2023-05-16T10:30:07Z")

</div>

Closed on May 16, 2023, 10:30am UTC

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