Asterisk Load Balancing with Ultramonkey

Kurt Weasel <[email protected]> Fri, 24 Apr 2009 16:49:01 +0700
Newsgroups gmane.linux.highavailability.ultramonkey
Message-ID <[email protected]>
--===============0339845938==
Content-Type: multipart/alternative; boundary=001636c599f60d3fc2046849e8c6

--001636c599f60d3fc2046849e8c6
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi,

I have some problems to do asterisk load balancing with Ultramonkey.
I am trying to do asterisk (http://www.asterisk.org) load balancing with SIP
protocol.
The topology used is streamline high availability and load balancing (
http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html) i.e 2 linux
directors / real servers.
The OS I used for both directors / servers is Ubuntu 8.04 .Then I use
configuration exactly as it is presented in the example except for node name
and some changes.

Since I am using SIP, I add the following lines to ldirectord.cf file

*checktimeout=10
checkinterval=2
autoreload=no
quiescent=yes
logfile="/var/log/ldirectord.log"

virtual=192.168.6.240:5060 gate
  real=192.168.6.2:5060 gate
  real=192.168.6.3:5060 gate
  service=sip
  scheduler=rr
  persistent=600
  protocol=udp
  checktype=connect*

After all files are already configured, I stop the ldirectord and start
heartbeat as instructed. I check the master linux-director and says that
master running in server 1 (192.168.6.2) and master stopped in server 2
(192.168.6.3). Then I try to stop the heartbeat in server 1, the server 2
becomes the master. So in general, the heartbeat and ldirectord is working
theoretically.

Then, I restart both of my servers (server 1 becomes the master again) and
start asterisk service for both servers. After that, a client PC with an IP
of 192.168.6.101 is configured using X-Lite softphone to connect server
192.168.6.240. Server 1 (with IP 192.168.6.2 which assumes the role of
Virtual IP address 192.168.6.240) detect this and the X-Lite shows status
ready. This can be verified using command (you need asterisk installed to
verify this) :

*asterisk
asterisk - r
*CLI> sip show peers*

Then I try to test failover and entirely shutdown the Server 1. Then Server
2 assumes the master status theoretically (verified by using command
*/etc/ha.d/resource.d/LVSSyncDaemonSwap
master status*).

However, the real failover doesn't occur. When the client try to connect
192.168.6.240, it seems it can't find the asterisk service that is running
at 192.168.6.240. However when I ping both 192.168.6.240 and 192.168.6.3,
both server show respond.

Then I configure the X-Lite softphone to connect server 192.168.6.3. And it
shows connected. But it doesn't happen that way when I connect to
192.168.6.240

My question is why after the failure of server 1, asterisk at server 2 can't
assume server role? Theoretically, when the softphone try to connect to
192.168.6.240, asterisk at server 2 should detect this. Can someone give
tips of what should be done to make this right? Anyone has an experience
with this? Thank you.

Best Regards,
Kurt Weasel.

--001636c599f60d3fc2046849e8c6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,<br><br>I have some problems to do asterisk load balancing with Ultramon=
key.<br>I am trying to do asterisk (<a href=3D"http://www.asterisk.org">htt=
p://www.asterisk.org</a>) load balancing with SIP protocol.<br>The topology=
 used is streamline high availability and load balancing (<a href=3D"http:/=
/www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html">http://www.ultramonkey.=
org/3/topologies/sl-ha-lb-eg.html</a>) i.e 2 linux directors / real servers=
.<br>
The OS I used for both directors / servers is Ubuntu 8.04 .Then I use confi=
guration exactly as it is presented in the example except for node name and=
 some changes.<br><br>Since I am using SIP, I add the following lines to <a=
 href=3D"http://ldirectord.cf">ldirectord.cf</a> file<br>
<br><i>checktimeout=3D10<br>checkinterval=3D2<br>autoreload=3Dno<br>quiesce=
nt=3Dyes<br>logfile=3D&quot;/var/log/ldirectord.log&quot;<br><br>virtual=3D=
<a href=3D"http://192.168.6.240:5060">192.168.6.240:5060</a> gate<br>=A0 re=
al=3D<a href=3D"http://192.168.6.2:5060">192.168.6.2:5060</a> gate<br>
=A0 real=3D<a href=3D"http://192.168.6.3:5060">192.168.6.3:5060</a> gate<br=
>=A0 service=3Dsip<br>=A0 scheduler=3Drr<br>=A0 persistent=3D600<br>=A0 pro=
tocol=3Dudp<br>=A0 checktype=3Dconnect</i><br><br>After all files are alrea=
dy configured, I stop the ldirectord and start heartbeat as instructed. I c=
heck the master linux-director and says that master running in server 1 (19=
2.168.6.2) and master stopped in server 2 (192.168.6.3). Then I try to stop=
 the heartbeat in server 1, the server 2 becomes the master. So in general,=
 the heartbeat and ldirectord is working theoretically. <br>
<br>Then, I restart both of my servers (server 1 becomes the master again) =
and start asterisk service for both servers. After that, a client PC with a=
n IP of 192.168.6.101 is configured using X-Lite softphone to connect serve=
r 192.168.6.240. Server 1 (with IP 192.168.6.2 which assumes the role of Vi=
rtual IP address 192.168.6.240) detect this and the X-Lite shows status rea=
dy. This can be verified using command (you need asterisk installed to veri=
fy this) :<br>
<br><i>asterisk<br>asterisk - r<br>*CLI&gt; sip show peers</i><br><br>Then =
I try to test failover and entirely shutdown the Server 1. Then Server 2 as=
sumes the master status theoretically (verified by using command <i>/etc/ha=
.d/resource.d/LVSSyncDaemonSwap master status</i>).<br>
<br>However, the real failover doesn&#39;t occur. When the client try to co=
nnect 192.168.6.240, it seems it can&#39;t find the asterisk service that i=
s running at 192.168.6.240. However when I ping both 192.168.6.240 and 192.=
168.6.3, both server show respond. <br>
<br>Then I configure the X-Lite softphone to connect server 192.168.6.3. An=
d it shows connected. But it doesn&#39;t happen that way when I connect to =
192.168.6.240<br><br>My question is why after the failure of server 1, aste=
risk at server 2 can&#39;t assume server role? Theoretically, when the soft=
phone try to connect to 192.168.6.240, asterisk at server 2 should detect t=
his. Can someone give tips of what should be done to make this right? Anyon=
e has an experience with this? Thank you.<br>
<br>Best Regards,<br>Kurt Weasel.<br>

--001636c599f60d3fc2046849e8c6--

--===============0339845938==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ultramonkey-users mailing list
[email protected]
http://lists.vergenet.net/listinfo/ultramonkey-users

--===============0339845938==--