Hi again,
Though I've made redundant kamailio work from your suggestions and recent
threads on same topic. Thanks guys.
This is how I made kamailio redundant servers work, since I had two servers
both using HeartBeat i.e a floating IP in between the Server A/ Server B.
As mentioned by you guys;
in */etc/sysctl.conf* file insert this line
*net.ipv4.ip_nonlocal_bind = 1*
on console execute "*sysctl -p*"
Then on my linux server I had to explicitly set the routes to use the
Floating IP interface(s) as default
*route add -net 192.168.2.0/24 dev eth0:0*
*route add -net PU.BL.IC.IP/2 <http://192.168.2.0/24>9 dev eth1:0*
Where eth0:0 and eth1:0 are the virtual IP interface for that particular
subnet. These were important because I was having ERRORS from kamailio
about socket. So putting in the default routes to use the floating IPs'
interfaces solved that error. (Kamailio was receiving requests from Virtual
IP but default routes on linux were forceing the traffic to use physical IP
and hence communication loop was incomplete)
After that all I had to do was change the listen=192.168.2.15 field on my
kamailio server where 192.168.2.15 was floating IP on interface eth0:0 and
same for Public IP.
That was all, everything working great. I could use the physical IP as well
as the floating IP both on same setup with exception of RTPproxy not
picking up the physical IPs due to the default route thing.
Regards,
Sammy
On Fri, Jan 27, 2012 at 2:36 PM, Sammy Govind <govoiper(a)gmail.com> wrote:
Hi again,
Really nice and good setup Javier, I'd definitely start implementing
this.How about geographically separated redundant servers!? DNS SRV? or
some specialized hardware for that ?
Can the new distributed messaging queue help in this kind of reliable
redundant setup ?
http://kamailio.org/docs/modules/stable/modules_k/dmq.html
Thanks
Regards,
Sammy.
On Thu, Jan 26, 2012 at 6:56 PM, Javier Gallart <jgallartm(a)gmail.com>wrote;wrote:
> Hello
>
> the net.ipv4.ip_nonlocal_bind = 1 options works fine. We have a very
> basic redundancy level, but it fits our current needs; sometimes it's even
> harder to troubleshoot the redundancy failures than the actual failures. We
> have 2 identical servers running kamailio and listening to the same ip
> addresses/ports (you need to enable the sysctl option for that). A
> heartbeat process controls in what machine the actual ip addresses are
> active. The DB is in one of the servers but we update the shared memory in
> both. For us having the DB down for a while is not critical because all the
> data is in memory. When one servers goes down the other one takes over
> immediately. It's a very comfortable setup also for doing upgrades in the
> configuration in a controlled manner.
> Hope it helps
>
> Regards
>
> Javi
>
>> ------------------------------
>>
>> Message: 6
>> Date: Thu, 26 Jan 2012 12:13:18 +0500
>> From: Sammy Govind <govoiper(a)gmail.com>
>> Subject: Re: [SR-Users] Kamailio Redundancy examples/pointers required
>> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
>> Users Mailing List" <sr-users(a)lists.sip-router.org>
>> Message-ID:
>> <CAJUJwtjMGTuNe1Cu5+BDthgj0xrSJrBM03XzcjZhWJ8Ar7=
>> onQ(a)mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>>
>> Hi,
>> Thanks for taking out time for this. really appreciate your ideas. Here
>> are
>> few things I've found useful so far.
>>
>>
http://kamailio.org/events/2011-fosdem/p_usrloc.pdf
>> This looks like one thing that one could have to ensure more reliability
>> but we do need other application level and physical level failover
>> techniques additionally.
>>
>> For using any technique like Linux-HA, Heartbeat, keepalived, UCARP or
>> any
>> floating/virtual IP techniques I really hope that the sysctl option
>> mentioned in b/m thread really works.
>>
http://www.mail-archive.com/sr-users@lists.sip-router.org/msg03714.html
>>
>
>>
http://old.nabble.com/Kamilio-Failover-Options-td21947502.html
>> DNS SRV is one option. Using another Kamailio on top of two Kamailio is
>> again a SPOF so I think its of no use at all.
>>
>> I hope to get a very reliable and working solution out of these forums.
>>
>> Regards,
>> Sammy
>>
>> On Wed, Jan 25, 2012 at 9:49 PM, Andreas Granig <agranig(a)sipwise.com>
>> wrote:
>>
>> > Hi Sammy,
>> >
>> > On 01/25/2012 02:08 PM, Sammy Govind wrote:
>> > > I've been looking for ways to create a redundant Kamailio cluster.
>> I've
>> > > googled alot but haven't got any concrete or final wording on any
one
>> > > solution that'll just work perfectly. The basic requirement is
that
>> in
>> >
>> > HA is never really easy :)
>> >
>> > > case of Kamailio application failure or in case of physical machine
>> > > error the whole setup just starts working on secondary server.
>> > >
>> > > Please suggest anything whichever you guys are using. Any reference
>> URLs
>> > > would be very much appreciated.
>> >
>> > For 1+1 setups, you can use a master/master replication (people also
>> use
>> > drbd to sync the whole table space, not sure how good that works) on db
>> > level, use write-back mode in kamailio to make sure your registrations
>> > are written to DB immediately, then use heartbeat to do the IP/process
>> > fail-overs on network/power failures. On top, you can do manual checks
>> > to trigger a fail-over in case of high-level failures. I guess this is
>> > the typical and most straight-forward scenario. Your mileage might
>> vary,
>> > depending on specific environment variables (e.g. you might want to
>> > announce your active server via RIP/OSPF using quagga instead of the
>> > more common gratuitous arp if your servers are geographically split).
>> >
>> > For scaling larger, put a kamailio instance acting as load-balancer in
>> > front of your proxies and scale them by providing some sharding
>> > information to the lb.
>> >
>> > Also the new db_cassandra backend in master branch looks pretty
>> > promising when it comes to HA/scaling. Maybe someone can provide some
>> > best practices regarding that as well?
>> >
>> > Andreas
>> >
>> >
>> > _______________________________________________
>> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> > sr-users(a)lists.sip-router.org
>> >
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>> >
>> >
>>