I’m trying to deploy a HA Cluster for Asterisk, but i hadn’t succeed yet.
I’m trying to do it with heartbeat and two computers/servers.
I created a virtual IP that’s the one who link the two servers.
It is supposed that authkeys, ha.cf, and haresources files are created correctly.
It is supposed that when i do /etc/init.d/heartbeat start, it will automatically run /etc/init.d/asterisk start, but it does not happen, why?
Is there such a way to test the high availaibility for asterisk? Or there is a easiest way to perform it? I’m not an expert in Centos and this is a little bit difficult.
Thanks for the help,
So I’ll try not to be spammy here, If you are utilizing Asterisk as a PBX and AsteriskNOW or the FreePBX Distro, then the “easiest way” to perform it is to purchase the FreePBX HA module, you will want to utilize the HA options when installing each server, and then purchase the FreePBX HA module for each system. $1500 per system.
The HA module sets up all of the configuration for you directly from the GUI of the PBX. It’s so simple that even LINBIT (sponsors and developers of DRDB) utilize it for their corporate PBX.
Obviously using the module is not a no cost/free solution, but it is easily replicated and supported and the ROI is quickly seen when deploying in a commercial setting. If your goal is to educate yourself or have the time to learn and support all of the various components directly then your results and ROI may vary. I’m certain the community can point you to some relevant guides outlining manual HA configuration.
DISCLOSURE: I work for Sangoma, sponsors and developers of FreePBX, and the High Availability FreePBX HA Module.
If you’re just looking for simple IP failover in the cases of server failures, you could just use keepalived.
it seems that the systems runs well, despite of the asterisk in server2 doesn’t initiate automatically when heartbeat starts. (I have to initiate Asterisk manually on that server)
The system works like it follows:
- Server1 is active with asterisk running and Server2 is active with asterisk running. The call enters into Server1.
- Then I shut down heartbeat in Server1, and the call enters into Server2.
- Then I restart heartbeat in Server1, and the call enters again into Server1.
I have the following doubt: when i shut down only the asterisk service in Server1 (not heartbeat) the call should enter in Server2? This it is doesn’t work. What could be the problem?
Thanks for the help,
For the non-starting, did you run “make config” when you compiled, or did you install from a repository?
For the failover problems, you’ll need to refer to the log files.