# Websocket connect err.","error":"websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection

**URL:** <https://forum.mattermost.com/t/websocket-connect-err-error-websocket-the-client-is-not-using-the-websocket-protocol-upgrade-token-not-found-in-connection/9110>\
**Category:** Troubleshooting\
**Created:** [March 6, 2020, 4:49pm UTC](https://forum.mattermost.com/t/websocket-connect-err-error-websocket-the-client-is-not-using-the-websocket-protocol-upgrade-token-not-found-in-connection/9110 "2020-03-06T16:49:43Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![fabreg](https://avatars.discourse-cdn.com/v4/letter/f/ecd19e/32.png) [@fabreg](https://forum.mattermost.com/u/fabreg)\
**Post date:** [March 11, 2020, 4:21pm UTC](https://forum.mattermost.com/t/websocket-connect-err-error-websocket-the-client-is-not-using-the-websocket-protocol-upgrade-token-not-found-in-connection/9110/3 "2020-03-11T16:21:43Z")

</div>

Hello @amy.blais,  
and thanks for your reply.  
I read that page at least four times and tried all solutions proposed but no luck.  
Tried to switched AlloCorsFrom many times with different values, also with ‘\*’ but after a while error arise.  
Tried also to change this line:

> proxy\_set\_header Connection “”;

to

> proxy\_set\_header Connection “upgrade”;

in the location / { bla bla directive , but does not help.

For sure the error comes from nginx cause it’s clearly stated in Google Chrome Developer console:

> WebSocket connection to ‘wss://mm.website.com/api/v4/websocket’ failed: Error during WebSocket handshake: Unexpected response code: 400

Searching in the forum I noticed this problem has been alredy discussed various times (i.e. [How to fix websocket error? - #11 by amy.blais](https://forum.mattermost.com/t/how-to-fix-websocket-error/5472/11) ) but apparently without a “standard”  
solution.

The only different thing from the documentation is the backend ip: I need to put 127.0.0.1 cause my virtual machine does not have an internal ip.

Thank you.

---

_[View the full topic](https://forum.mattermost.com/t/websocket-connect-err-error-websocket-the-client-is-not-using-the-websocket-protocol-upgrade-token-not-found-in-connection/9110)._
