NetXMS Support Forum

English Support => General Support => Topic started by: Abraxas on May 31, 2022, 02:01:26 PM

Title: HA setup with VRRPD
Post by: Abraxas on May 31, 2022, 02:01:26 PM
Hi,

I am trying to build a HA setup, but a bit different than what was described in the tutorial. I want it to be consistent with our other deployments.
We use VRRPd to load a VIP between 2 hosts. I setup MySQL with master-master replication between the 2 boxes, and when the VIP move takes place, a script clears the DB lock and starts the netxms daemon on the new master. The problem I am facing is that netxms binds to the primary  IP of the box, not the VIP.

How can I make it use the VIP, or where to clean it in the DB so that the new server does not complain it can't bind to it?

Best regards,
Alex
Title: Re: HA setup with VRRPD
Post by: Victor Kirhenshtein on July 04, 2022, 07:53:29 PM
Hi,

do you mean database lock in the DB so server complains that database is locked by another instance? If yes, you should list peer IP address in netxmsd.conf on cluster nodes. For example, if you have cluster nodes with addresses 10.0.0.1 and 10.0.0.2 (with whatever VIP moving between them), on node 10.0.0.1 you should add

PeerNode = 10.0.0.2

to netxmsd.conf and on node 10.0.0.2 add

PeerNode = 10.0.0.1

That way server will read the lock, check if server is running on peer node (by attempting to connect to agent and check running processes and by connecting to port 4701), and remove stalled lock if netxmsd is not running on peer node.

Best regards,
Victor