Welcome! Log In Create A New Profile

Advanced

Unifi Controller Websocket Connection Error

Posted by PPee 
Unifi Controller Websocket Connection Error
April 01, 2021 03:17AM
Hi All,

I have strange problem:

I have two instances of the unifi controller. The main one on my synology in a docker container, and a backup version on a Raspberry Pi also in a docker container. Setup of the containers is exactly the same.

Access to both instances is via reverse proxy - nginx.

setup of nginx is identical:

```
server{

listen 443 ssl http2;

server_name unifi.xxx.com;

location / {

proxy_pass "https://192.168.1.242:8443";

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

}

location /wss {

proxy_pass "https://192.168.1.242:8443";

proxy_http_version 1.1;

proxy_buffering off;

proxy_set_header upgrade $http_upgrade;

proxy_set_header Connection "Upgrade";

proxy_read_timeout 86400;

}

}

server{

listen 443 ssl http2;

server_name unifi2.xxxx.com;

location / {

proxy_pass "https://192.168.1.38:8443";

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

}

location /wss {

proxy_pass "https://192.168.1.38:8443";

proxy_http_version 1.1;

proxy_buffering off;

proxy_set_header upgrade $http_upgrade;

proxy_set_header Connection "Upgrade";

proxy_read_timeout 86400;

}

}

```

The strange thing is that the main unifi at first started up perfectly, and the backup instance unifi2 gave a websocket connection error. Now both give a Websocket Connection Error message. Is there a problem with my settings in the nginx.conf?


Thx,

PPee
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 60
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready