[Kamailio-Users] kamailio with sqlops fails to start if DB is down

logivoip at gmail.com logivoip at gmail.com
Tue Jun 30 04:44:56 CEST 2009


Hi All,

First off - thank you for this module.

I have configured two redundant DB sources in my kamailio confiuration.  The
DB's are accessed from Kamailio for redundancy pruposes.
Kamailio and the primary DB are on the same hardware node.  The secondary DB
is on a remote host.
If Kamailio is up and both MySQL DB's are up, the config works like a
charm.  If the primary or the secondary DB becomes unreachable while
Kamailio is up, the config handles the exception and all works well.

However, if any of the DB servers becomes unreachable and Kamailio is
restarted, Kamailio can no longer start.

Below is an excerpt from my config file:

# -- sqlops params
modparam("sqlops","sqlcon","pridb=>mysql://root:@localhost/db_table")
modparam("sqlops","sqlcon","secdb=>mysql://root:@192.168.1.231/db_table")


/var/log/messages

Jun 26 06:16:00 test-ser /sbin/kamailio[20217]:
ERROR:db_mysql:db_mysql_new_connection: driver error: Can't connect to local
MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Jun 26 06:16:00 test-ser /sbin/kamailio[20217]: ERROR:core:db_do_init: could
not add connection to the pool
Jun 26 06:16:00 test-ser /sbin/kamailio[20217]: ERROR:sqlops:sql_connect:
failed to connect to the database [pridb]
Jun 26 06:16:00 test-ser /sbin/kamailio[20217]: ERROR:core:init_mod_child:
failed to initializing module sqlops, rank 1
Jun 26 06:16:00 test-ser /sbin/kamailio[20217]: ERROR:core:main_loop:
init_child failed for UDP listener


What is the proper way of using multiple database servers with Kamailio?

Thanks in advance.


--JR
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/users/attachments/20090629/76a134f0/attachment.htm>


More information about the Users mailing list