Mattermost, Inc.

Websockets error on mattermost 3.3.0

Summary

I am getting websockets error when upgraded to mattermost v3.3.0

Steps to reproduce

Installed mattermost 3.1.0 via docker. Upgraded to 3.3.0 using these steps:
Fetch the repo again (https://github.com/mattermost/mattermost-docker.git)
and set HEAD to 3.3.0 tag.

$ docker-compose build
$ docker-compose up

Expected behavior

Should boot up the containers and run properly

Observed behavior

See this error in the logs (host URL changed):

db_1  | LOG:  database system is ready to accept connections
db_1  | LOG:  autovacuum launcher started
db_1  | LOG:  incomplete startup packet
app_1 | Configure database connection...SKIP
app_1 | Wait until database db:5432 is ready...
web_1 | Starting Nginx
web_1 | ln: failed to create symbolic link '/etc/nginx/sites-enabled/mattermost': File exists
web_1 | 2016/08/20 06:34:53 [error] 11#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 106.51.15.26, server: , request: "GET /api/v3/users/websocket HTTP/1.1", upstream: "http://172.17.0.3:80/api/v3/users/websocket", host: "example.com"
web_1 | 106.51.15.26 - - [20/Aug/2016:06:34:53 -0400] "GET /api/v3/users/websocket HTTP/1.1" 502 583 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Mattermost/1.3.0 Chrome/51.0.2704.84 Electron/1.2.2 Safari/537.36"
app_1 | Starting platform
web_1 | 2016/08/20 06:34:53 [error] 11#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 106.206.147.201, server: , request: "GET /api/v3/users/websocket HTTP/1.1", upstream: "http://172.17.0.3:80/api/v3/users/websocket", host: "example.com"
web_1 | 106.206.147.201 - - [20/Aug/2016:06:34:53 -0400] "GET /api/v3/users/websocket HTTP/1.1" 502 583 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Mattermost/1.2.1 Chrome/49.0.2623.75 Electron/0.37.8 Safari/537.36"
web_1 | 2016/08/20 06:34:53 [error] 11#0: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 106.51.15.230, server: , request: "GET /api/v3/users/websocket HTTP/1.1", upstream: "http://172.17.0.3:80/api/v3/users/websocket", host: "example.com"
web_1 | 106.51.15.230 - - [20/Aug/2016:06:34:53 -0400] "GET /api/v3/users/websocket HTTP/1.1" 502 583 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Mattermost/1.3.0 Chrome/51.0.2704.84 Electron/1.2.2 Safari/537.36"
web_1 | 2016/08/20 06:34:53 [error] 11#0: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 103.252.24.109, server: , request: "GET /api/v3/users/websocket HTTP/1.1", upstream: "http://172.17.0.3:80/api/v3/users/websocket", host: "example.com"
web_1 | 103.252.24.109 - - [20/Aug/2016:06:34:53 -0400] "GET /api/v3/users/websocket HTTP/1.1" 502 583 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Mattermost/1.3.0 Chrome/51.0.2704.84 Electron/1.2.2 Safari/537.36"

On the client mac app v1.3.0, getting some 404 error. Cannot see any online users (even though they are online) Tried restarting the client-app and containers.
PS: There is no error if I view the website via browser.

Am I missing something in the upgrade?

I’m seeing the same issue on desktop clients. Must be an API change.

I updated the desktop client to the latest version (1.3.0), still seeing the issue.

I’m experiencing the same issue.

EDIT: nvm. I’m experiencing this issue regardless of the mattermost version.
I’ll be opening up my own issue sometime :slight_smile:

You need change location.
location /api/v3/users/websocket {
proxy_pass http://mattermost_proxy;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
}