Hi there,
New user to Kamailio here. We currently have it up and running in a virtualized environment with 1 Kamailio sever, 1 Asterisk server and 1 MySQL server.
I'm currently writing install scripts to make deploying new nodes/servers easy and to keep settings the same across the board. I've chosed to load the db_cluster.so module in kamailio.cfg, as we will have 2x MySQL servers in master-master replication which will contain the 'kamailio' and 'asterisk' tables.
I've just hit a stumbling block - in `kamctlrc`, there is a field called `DBHOST=`. How can I reference my cluster here?
In kamailio.cfg, I simply define DBURL as "cluster//<clustername>". What is the syntax for 'DBHOST=' in 'kamctlrc'? Can I reference the cluster? Can I have 2 separate DBHOST= lines?
Looking for some guidance on this one.
Thanks, Derek B.
On 15 Feb 2016, at 22:32, Derek Bolichowski derek@empire-team.com wrote:
Hi there,
New user to Kamailio here. We currently have it up and running in a virtualized environment with 1 Kamailio sever, 1 Asterisk server and 1 MySQL server.
I’m currently writing install scripts to make deploying new nodes/servers easy and to keep settings the same across the board. I’ve chosed to load the db_cluster.so module in kamailio.cfg, as we will have 2x MySQL servers in master-master replication which will contain the ‘kamailio’ and ‘asterisk’ tables.
I’ve just hit a stumbling block – in `kamctlrc`, there is a field called `DBHOST=`. How can I reference my cluster here?
In kamailio.cfg, I simply define DBURL as “cluster//<clustername>”. What is the syntax for ‘DBHOST=’ in ‘kamctlrc’? Can I reference the cluster? Can I have 2 separate DBHOST= lines?
Looking for some guidance on this one.
kamctlrc controls Kamctl that is an outside script that one can decide to use to manage Kamailio. It has it’s own set of database connection methods and can’t use the cluster module in Kamailio.
There are two cases where kamctl and kamdbctl (the sister script) use database - to create the actual database and to search/update. With a master/master you decide if you create the tables on one side and let mysql replicate or if you create it on both sides before you initialize replication.
For other queries you can choose to simply refer to one of the servers in kamctlrc - it’s usually not mission critical. If that server is down, your query will fail but the Kamailio service will run thanks to cluster logic in the db_cluster module.
If you want a similar functionality for kamctl you may want to install the mysql proxy that can do failover in a way similar to db_cluster.
Cheers, /O
I hate to reply to myself, but the DNS SRV /DOES/ work now. I was apparently impatient in waiting for my ISP's DNS servers to receive the changes, while Google and Level3 DNS were already updated :)
Derek B.
From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Derek Bolichowski Sent: February 15, 2016 4:33 PM To: sr-users@lists.sip-router.org Subject: [SR-Users] db_cluster.so module and kamctlrc DBHOST= field
Hi there,
New user to Kamailio here. We currently have it up and running in a virtualized environment with 1 Kamailio sever, 1 Asterisk server and 1 MySQL server.
I'm currently writing install scripts to make deploying new nodes/servers easy and to keep settings the same across the board. I've chosed to load the db_cluster.so module in kamailio.cfg, as we will have 2x MySQL servers in master-master replication which will contain the 'kamailio' and 'asterisk' tables.
I've just hit a stumbling block - in `kamctlrc`, there is a field called `DBHOST=`. How can I reference my cluster here?
In kamailio.cfg, I simply define DBURL as "cluster//<clustername>". What is the syntax for 'DBHOST=' in 'kamctlrc'? Can I reference the cluster? Can I have 2 separate DBHOST= lines?
Looking for some guidance on this one.
Thanks, Derek B.