How to force leave node from the cluster

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
vlisnyi
OpenVpn Newbie
Posts: 9
Joined: Mon May 16, 2022 1:35 pm

How to force leave node from the cluster

Post by vlisnyi » Mon May 16, 2022 1:43 pm

I have a node that was reclaimed by AWS, in web UI it shows as

Code: Select all

    Unable to reach this node
    Reason: User timeout caused connection failure.
Manuals show that I can remove a node from the cluster by clicking "Remove" in the cluster-admin area or executing on the exact node

Code: Select all

sacli ClusterLeave
But in this case, I can not do this, because the node agent has already died (node terminated by AWS). I can try of course remove this node in MySQL database, but is there any ability to remove an already terminated node from the cluster in a proper way without modifying MySQL database tables.

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1332
Joined: Tue Feb 16, 2021 10:41 am

Re: How to force leave node from the cluster

Post by openvpn_inc » Tue May 17, 2022 10:31 am

Hi Vlisnyi,

In this case you can use these example commands on any of the functional nodes to remove a node called "deadnode":
./confdba --cluster --prof="deadnode" -dk sacli_ip
./confdba --cluster --prof="deadnode" -dk sacli_listen_ip
./confdba --cluster --prof="deadnode" -dk sacli_port

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

vlisnyi
OpenVpn Newbie
Posts: 9
Joined: Mon May 16, 2022 1:35 pm

Re: How to force leave node from the cluster

Post by vlisnyi » Tue May 17, 2022 11:43 am

Thanks for help, this removed records for deleted server from as_cluster database in config table, but seems like also need to remove the profile in the same database but in profile table

Code: Select all

/usr/local/openvpn_as/scripts/confdba --cluster --prof="test-vpn-1" --rm
I also test on another dead server

Code: Select all

/usr/local/openvpn_as/scripts/confdba --cluster --prof="test-vpn-2" --rm
and this command delete profile and all profile information and you don't need to execute 3 previous commands to clean config table

Post Reply