[GH-ISSUE #3614] failed to connect to websocket on reverse proxy #1291

Closed
opened 2026-03-07 21:02:08 +03:00 by kerem · 5 comments
Owner

Originally created by @mikeTWC1984 on GitHub (Jul 25, 2025).
Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/3614

Description

I'm using kubernetes to deploy cloudbeaver. We have nginx ingress. So basically it's reverse proxy, also doing http to https upgrade.
Somehow after going to version 25.1.3 from 25.1.2 (1 minor version) cloudbeaver UI is failing to connect to /api/ws on kubernetes (reverse proxy), 25.1.2 works fine. Local docker setup for 25.1.3 also works

Steps to reproduce

No response

Expected/Desired Behavior

Should connect to /api/ws behind proxy

CloudBeaver Version

25.1.3

Additional context

No response

Originally created by @mikeTWC1984 on GitHub (Jul 25, 2025). Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/3614 ### Description I'm using kubernetes to deploy cloudbeaver. We have nginx ingress. So basically it's reverse proxy, also doing http to https upgrade. Somehow after going to version 25.1.3 from 25.1.2 (1 minor version) cloudbeaver UI is failing to connect to /api/ws on kubernetes (reverse proxy), 25.1.2 works fine. Local docker setup for 25.1.3 also works ### Steps to reproduce _No response_ ### Expected/Desired Behavior Should connect to /api/ws behind proxy ### CloudBeaver Version 25.1.3 ### Additional context _No response_
kerem 2026-03-07 21:02:08 +03:00
Author
Owner

@EasyLOB commented on GitHub (Jul 27, 2025):

Hi,
I have a similar problem.
When I connect to CloudBeaver directly, everything works fine.
When I connect to CloudBeaver through NGINX Reverse Proxy the interface works fine, but when I execute a SQL it does not complete: I get a forever "Loading...".
I even turned off the http to https redirection, but it also does not work.
The NGINX (below) is the same I use in many other applications.

Thanks

server {
    listen 80;
    #listen [::]:80;

    server_name MY-CLOUDBEAVER-DOMAIN;

    # 80 -> 443
    #return 301 https://$host$request_uri;

    # Reverse Proxy
    location / {
        proxy_pass http://127.0.0.1:28978;
        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;
    }
}

server {
    listen 443 ssl;
    #listen [::]:443 ssl;
    ssl_certificate /etc/letsencrypt/live/MY-DOMAIN/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/MY-DOMAIN/privkey.pem;
	
    server_name MY-CLOUDBEAVER-DOMAIN;

    # Reverse Proxy
    location / {
        proxy_pass http://127.0.0.1:28978;
        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;
    }
}
<!-- gh-comment-id:3124691549 --> @EasyLOB commented on GitHub (Jul 27, 2025): Hi, I have a similar problem. When I connect to CloudBeaver directly, everything works fine. When I connect to CloudBeaver through NGINX Reverse Proxy the interface works fine, but when I execute a SQL it does not complete: I get a forever "Loading...". I even turned off the http to https redirection, but it also does not work. The NGINX (below) is the same I use in many other applications. Thanks ```txt server { listen 80; #listen [::]:80; server_name MY-CLOUDBEAVER-DOMAIN; # 80 -> 443 #return 301 https://$host$request_uri; # Reverse Proxy location / { proxy_pass http://127.0.0.1:28978; 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; } } server { listen 443 ssl; #listen [::]:443 ssl; ssl_certificate /etc/letsencrypt/live/MY-DOMAIN/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/MY-DOMAIN/privkey.pem; server_name MY-CLOUDBEAVER-DOMAIN; # Reverse Proxy location / { proxy_pass http://127.0.0.1:28978; 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; } } ```
Author
Owner

@EasyLOB commented on GitHub (Jul 27, 2025):

Hi,
I found a "WebSocket" error in Browser F12 Console.
So, after changing the NGINX configuration t allow WebSocket, everything is working fine :-)

server {
    listen 80;
    #listen [::]:80;

    server_name MY-CLOUDBEAVER-DOMAIN;

    # 80 -> 443
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    #listen [::]:443 ssl;
    ssl_certificate /etc/letsencrypt/live/MY-DOMAIN/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/MY-DOMAIN/privkey.pem;

    server_name MY-CLOUDBEAVER-DOMAIN;

    # Reverse Proxy
    location / {
        proxy_pass http://127.0.0.1:28978;

        # WebSocket
        proxy_http_version 1.1;
        proxy_read_timeout 86400;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";

        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;
    }
}
<!-- gh-comment-id:3124727227 --> @EasyLOB commented on GitHub (Jul 27, 2025): Hi, I found a "WebSocket" error in Browser F12 Console. So, after changing the NGINX configuration t allow WebSocket, everything is working fine :-) ``` server { listen 80; #listen [::]:80; server_name MY-CLOUDBEAVER-DOMAIN; # 80 -> 443 return 301 https://$host$request_uri; } server { listen 443 ssl; #listen [::]:443 ssl; ssl_certificate /etc/letsencrypt/live/MY-DOMAIN/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/MY-DOMAIN/privkey.pem; server_name MY-CLOUDBEAVER-DOMAIN; # Reverse Proxy location / { proxy_pass http://127.0.0.1:28978; # WebSocket proxy_http_version 1.1; proxy_read_timeout 86400; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; 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; } } ```
Author
Owner

@EvgeniaBzzz commented on GitHub (Oct 30, 2025):

Are there any other connection difficulties?
We have added some info about websockets to the wiki.

<!-- gh-comment-id:3469051452 --> @EvgeniaBzzz commented on GitHub (Oct 30, 2025): Are there any other connection difficulties? We have added some info about websockets to [the wiki](https://github.com/dbeaver/cloudbeaver/wiki/WebSockets).
Author
Owner

@mikeTWC1984 commented on GitHub (Nov 6, 2025):

I tried v25.2.4, and no longer see ws errors when running on Kubernetes

<!-- gh-comment-id:3498927986 --> @mikeTWC1984 commented on GitHub (Nov 6, 2025): I tried v25.2.4, and no longer see ws errors when running on Kubernetes
Author
Owner

@EvgeniaBzzz commented on GitHub (Nov 7, 2025):

Thanks for the update

<!-- gh-comment-id:3501393235 --> @EvgeniaBzzz commented on GitHub (Nov 7, 2025): Thanks for the update
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#1291
No description provided.