[SOLVED] One cluster URL

Sep 18, 2022
33
1
13
Hello,

I have a cluster with 6 nodes.
I want to know how can I set a one url for cluster which will go to one of the available nodes.
I am trying to avoid the using of more server to the haproxy.
There is an option to do it without adding external server?

Thank you.
 
Hello,

I have a cluster with 6 nodes.
I want to know how can I set a one url for cluster which will go to one of the available nodes.
I am trying to avoid the using of more server to the haproxy.
There is an option to do it without adding external server?

Thank you.
Hi,
ProxmoxVE allows you to manage everything transparently from each node in the cluster, so it does not depend directly to which node you connect to (at least under the assumption that everything is ok and all nodes are up and reachable).

If I understand you correctly, you would like to configure a HAProxy frontend in order to connect to one of the PVE nodes, configured as HAProxy backend. I would suggest you configure all nodes in the backend, so if HAProxy cannot reach one of them, it will connect you to another one.
 
OK, I used nginx.
But now I am getting error when trying to see Console of each Node:
failed waiting for client: timed out
TASK ERROR: command '/usr/bin/termproxy 5901 --path /nodes/pve1 --perm Sys.Console -- /usr/bin/ssh -e none -t 192.168.100.1 -- /bin/login -f root' failed: exit code 1

What to do?
 
OK, I used nginx.
But now I am getting error when trying to see Console of each Node:
failed waiting for client: timed out
TASK ERROR: command '/usr/bin/termproxy 5901 --path /nodes/pve1 --perm Sys.Console -- /usr/bin/ssh -e none -t 192.168.100.1 -- /bin/login -f root' failed: exit code 1

What to do?
This is an error you will get when the proxy for noVNCs websocket is not correct, see https://forum.proxmox.com/threads/no-novnc-with-proxy-exit-code-4.41598/#post-200168 and have a look at this wiki page https://pve.proxmox.com/wiki/Web_Interface_Via_Nginx_Proxy
 
  • Like
Reactions: Denham
I using this tutorial config and it same error on Console:
https://pve.proxmox.com/wiki/Web_Interface_Via_Nginx_Proxy

Code:
#user  nobody;
worker_processes auto;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    tcp_nopush     on;

    keepalive_timeout  65;

    upstream proxmox {
        server 192.168.100.1:8006;
        server 192.168.100.2:8006;
        server 192.168.100.3:8006;
        server 192.168.100.4:8006;
        server 192.168.100.5:8006;
        server 192.168.100.6:8006;
    }

    server {
        listen       8006 ssl;
        server_name _;
        ssl_certificate c:\\nginx\\ssl\\cert.pem;
        ssl_certificate_key c:\\nginx\\ssl\\key.pem;
        proxy_redirect off;

        location / {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_pass https://proxmox;
            proxy_buffering off;
            client_max_body_size 0;
            proxy_connect_timeout  3600s;
            proxy_read_timeout  3600s;
            proxy_send_timeout  3600s;
            send_timeout  3600s;
        }
    }
}
 
I using this tutorial config and it same error on Console:
https://pve.proxmox.com/wiki/Web_Interface_Via_Nginx_Proxy

Code:
#user  nobody;
worker_processes auto;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    tcp_nopush     on;

    keepalive_timeout  65;

    upstream proxmox {
        server 192.168.100.1:8006;
        server 192.168.100.2:8006;
        server 192.168.100.3:8006;
        server 192.168.100.4:8006;
        server 192.168.100.5:8006;
        server 192.168.100.6:8006;
    }

    server {
        listen       8006 ssl;
        server_name _;
        ssl_certificate c:\\nginx\\ssl\\cert.pem;
        ssl_certificate_key c:\\nginx\\ssl\\key.pem;
        proxy_redirect off;

        location / {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_pass https://proxmox;
            proxy_buffering off;
            client_max_body_size 0;
            proxy_connect_timeout  3600s;
            proxy_read_timeout  3600s;
            proxy_send_timeout  3600s;
            send_timeout  3600s;
        }
    }
}
Might there be a firewall blocking the connection from your proxy to the pve host termproxy port? Edit: Nonsense since the connection should be local to the nodes... Nevertheless, can you check firewall logs for blocked packets?

Have you checked with nignx -t if your config is ok? Is the rest of the WebUI working as expected?
 
Last edited:
Nope, I understand the issue but not success to solve it.
If I put in upstream only one server it is working. But if I put multiple, only one Console will works and the other not.

EDIT: OK, it fixed by add "ip_hash" to the upstream section.
 
Last edited:
Very well, please mark this thread as solved if the problem no longer persists, thx.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!