Troubleshooting HA

#1

Someone can help me, a couple of weeks ago an active-passive HA server was implemented, after performing the tests and other things worked well. After a week, I started presenting a bug that sent TCP / IP requests with the virtual IP but the SIP requests with the IP of the active server. Has this happened to someone?

“William Morales CSI” <sip:8705@192.168.100.38 <sip:57255@172.29.30.196

0 Likes

#2

And how does this phone know which server is the “active” node that calls should be hitting?

0 Likes

#3

Sorry is active-passive, the virtual ip is 192.168.100.38 and the active server is x.x.x.121, do you have seen this before?

0 Likes

#4

Honestly? No. That is mainly due to I don’t try to run Asterisk in a HA setup like this. Mainly because it’s pointless. The calls/session/transactions can’t traverse between two Asterisk system. The channels are unique to the Asterisk box that is processing the call. So at the end of the day when Node A drops or starts to perform bad and you have to cut to Node B (or another node) then you’re still losing all your calls and registrations.

I just use Kamailio in front of my boxes and deal with it that way.

0 Likes

#5

How did you implemented HA ? Did you used floating private IP concept ? Are both asterisk boxes in same subnet.

We implemented HA active-passive concept for asterisk in AWS.

0 Likes

#6

Yes, the implementation was like that.

0 Likes

#7

How did you configured the floating IP to network interface card of server ? Did you configured it permanently and two both boxes ?

0 Likes

#8

here is the configuation:

ASTERISK_DOWN=$(rasterisk -x “core show version” | grep “Unable to connect to remote asterisk” | wc -l)
IFACE_EMCALI=“eth2”
IFACE_CLARO=“eth3”
case “$1” in
start)
echo “$1, EJECUTANDO…” | log2file
if [ “$ASTERISK_DOWN” = “1” ]
then
echo “ACTIVE” > /etc/HA-ACTIVE
chmod 777 /etc/HA-ACTIVE
ifconfig $HA_VIRTUAL_DEV_LOCAL:0 $VIRTUAL_IP netmask $VIRTUAL_MASK
ifconfig $IFACE_EMCALI 10.35.3.174/30
ifconfig $IFACE_EMCALI:1 10.35.103.62/30
ifconfig $IFACE_CLARO 192.168.150.2/29

                    route add -host 172.29.30.196 gw 192.168.100.1 dev $HA_VIRTUAL_DEV_LOCAL:0
                    route add -host 201.184.78.68 gw 192.168.100.1 dev $HA_VIRTUAL_DEV_LOCAL:0
                    route add -host 5.196.194.62 gw 192.168.100.1 dev $HA_VIRTUAL_DEV_LOCAL:0
                    route add default gw 192.168.100.1 dev $HA_VIRTUAL_DEV_LOCAL:0
                    route add -net 10.35.103.60 netmask 255.255.255.252 dev $IFACE_EMCALI:1
                    route add -net 10.8.62.0 netmask 255.255.255.0 gw 192.168.150.1 dev $IFACE_CLARO

                    arping -b -c 3 -I $IFACE_EMCALI -s 10.35.3.174 10.35.3.173
                    arping -b -c 3 -I $IFACE_CLARO -s 192.168.150.2 192.168.150.1
                    ping -c 2 10.35.3.173
                    ping -c 2 10.8.62.137

                    #sh /var/dialvox/ha/PRINCIPAL_recover_mysql.sh #DESHABILITADO TEMPORALMENTE POR MYSQL_SYNC

                    rsync -az --delete -e "ssh $SSH_PARAMS" root@$IPAD_REMOTO:/var/spool/asterisk/voicemail/ /var/spool/asterisk/voicemail/$

                    sh /var/dialvox/ha/rsync_var_lib_asterisk.sh #NO ELIMINAR

                    echo "HA-INTERFACES-DIALVOX-LOADED" > /tmp/HA-INTERFACES-DIALVOX-LOADED
                    # INICIO CODIGO PERSONALIZADO

                    # FIN CODIGO PERSONALIZADO
            else
                    echo "$1, ASTERISK ESTA CORRIENDO ACTUALMENTE..." | log2file
            fi
            exit 0
0 Likes

#9

This is the configuration of the virtual ip file and main and backup computers.

ROL_SERVER=“PRINCIPAL”

EMAIL_NOTIF=“william.morales@xxxxxxxxxxxxxxxx.xxx.xxx.x”

IPAD_LOCAL=“192.168.100.121”
PORT_LOCAL=“xxxx”
HOSTNAME_LOCAL=“voip-javeriana”
HA_DEV_LOCAL=“eth0”
HA_VIRTUAL_DEV_LOCAL=“eth0”

VIRTUAL_IP=“192.168.100.38”
VIRTUAL_MASK=“255.255.255.0”

IPAD_REMOTO=“192.168.100.37”
PORT_REMOTO=“xxxx”
HOSTNAME_REMOTO=“voip-javeriana2”
HA_DEV_REMOTO=“eth8”
HA_VIRTUAL_DEV_REMOTO=“eth8”

0 Likes