Rancher 2 HA setup Error connecting to WebSocket

Rancher versions: 2.0.2

I followed the official guide to install rancher in HA (3 hosts) setup but I have this alert regularly :

Rancher

Whats is the reason for this alert ?

@damcar,

Did you deployed it behind nginx loadbalancer?

My config below works perfectly, maybe it can help you:

this file (01-caas.example.com.conf) is on the includes dir of my nginx config:

upstream rancher {
    least_conn;
    server 10.10.10.10:443 max_fails=3 fail_timeout=5s;
    server 10.10.10.11:443 max_fails=3 fail_timeout=5s;
    server 10.10.10.12:443 max_fails=3 fail_timeout=5s;
}

server {
    listen 80;
    server_name caas.example.com;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl ;
    server_name caas.example.com;

    ssl on;
    ssl_certificate /etc/nginx/ssl/cert.pem;
    ssl_certificate_key /etc/nginx/ssl/cert.key;

    location / {
        proxy_pass https://rancher;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }
} 

the main file of my nginx (nginx.conf) is:

worker_processes 4;
worker_rlimit_nofile 40000;

events {
    worker_connections 8192;
}

http {
    include /etc/nginx/includes/*.conf;
}

In my env I have setup the nginx via docker containers, but it works for any regular deploy too.

[]'s

1 Like