# Websockets error on mattermost 3.3.0

**URL:** <https://forum.mattermost.com/t/websockets-error-on-mattermost-3-3-0/2112>\
**Category:** Troubleshooting\
**Created:** [August 20, 2016, 1:25pm UTC](https://forum.mattermost.com/t/websockets-error-on-mattermost-3-3-0/2112 "2016-08-20T13:25:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tejasbubane](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/tejasbubane/32/879_2.png) [@tejasbubane](https://forum.mattermost.com/u/tejasbubane)\
**Post date:** [August 20, 2016, 1:25pm UTC](https://forum.mattermost.com/t/websockets-error-on-mattermost-3-3-0/2112/1 "2016-08-20T13:25:51Z")

</div>

#### 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](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):

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

---

<div class="post-metadata">

**Author:** ![congalong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/congalong/32/240_2.png) [@congalong](https://forum.mattermost.com/u/congalong)\
**Post date:** [August 22, 2016, 5:40pm UTC](https://forum.mattermost.com/t/websockets-error-on-mattermost-3-3-0/2112/2 "2016-08-22T17:40:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tejasbubane](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/tejasbubane/32/879_2.png) [@tejasbubane](https://forum.mattermost.com/u/tejasbubane)\
**Post date:** [August 23, 2016, 12:44pm UTC](https://forum.mattermost.com/t/websockets-error-on-mattermost-3-3-0/2112/3 "2016-08-23T12:44:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![crucidal](https://avatars.discourse-cdn.com/v4/letter/c/ecb155/32.png) [@crucidal](https://forum.mattermost.com/u/crucidal)\
**Post date:** [August 23, 2016, 2:00pm UTC](https://forum.mattermost.com/t/websockets-error-on-mattermost-3-3-0/2112/4 "2016-08-23T14:00:57Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Cancer](https://avatars.discourse-cdn.com/v4/letter/c/f04885/32.png) [@Cancer](https://forum.mattermost.com/u/Cancer)\
**Post date:** [August 24, 2016, 7:40am UTC](https://forum.mattermost.com/t/websockets-error-on-mattermost-3-3-0/2112/5 "2016-08-24T07:40:26Z")

</div>

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”;  
}
