Discussion:
[Kamailio-Users] [kamailio-users] can't connect with remote database
Chandrakant Solanki
2010-02-04 11:45:15 UTC
Permalink
Hi

I have 3 server with 172.16.0.10/13/14 IP address.

My DB is located for 172.16.0.10. I tried to connect mysql from terminal, it
works great.

But when I start kamailio it gives me following error..


*kamailio.cfg*

loadmodule "usrloc.so"
-----
-----
-----
modparam("usrloc", "socket_column", "socket")
modparam("usrloc", "use_domain", 0)
modparam("usrloc", "desc_time_order", 0)
modparam("usrloc", "timer_interval", 60)
modparam("usrloc", "db_url", "mysql://openser:openserrw at 172.16.0.10/openser
")


*error....

*Feb 4 17:10:53 localhost /usr/local/sbin/kamailio[28792]:
ERROR:core:db_do_init: could not add connection to the pool
Feb 4 17:10:53 localhost /usr/local/sbin/kamailio[28792]:
ERROR:usrloc:child_init: child(8): failed to connect to database
Feb 4 17:10:53 localhost /usr/local/sbin/kamailio[28792]:
ERROR:core:init_mod_child: failed to initializing module usrloc, rank 8
Feb 4 17:10:53 localhost /usr/local/sbin/kamailio[28792]:
ERROR:core:main_loop: init_child failed for UDP listener
Feb 4 17:10:53 localhost /usr/local/sbin/kamailio[28793]:
ERROR:db_mysql:db_mysql_new_connection: driver error: Can't connect to MySQL
server on '172.16.0.10' (4)*
*
--
Regards,

Chandrakant Solanki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20100204/2dfdd10a/attachment.htm>
marius zbihlei
2010-02-04 12:01:04 UTC
Permalink
Hi
I have 3 server with 172.16.0.10/13/14 <http://172.16.0.10/13/14> IP
address.
My DB is located for 172.16.0.10. I tried to connect mysql from
terminal, it works great.
But when I start kamailio it gives me following error..
Hello

Just to double check Have you tried:

mysql --user=openser -p --host=172.16.0.10 openser

from 172.16.0.13 and it works?

From localhost afaik mysql client might use Unix socks(/tmp/mysql.sock)
. Use should double check that your MySQL server allows TCP connections

Cheers

Marius
Chandrakant Solanki
2010-02-05 05:46:28 UTC
Permalink
On Thu, Feb 4, 2010 at 5:38 PM, Chandrakant Solanki <
Post by marius zbihlei
Hi
I have 3 server with 172.16.0.10/13/14 <http://172.16.0.10/13/14> IP
address.
My DB is located for 172.16.0.10. I tried to connect mysql from terminal,
it works great.
But when I start kamailio it gives me following error..
Hello
mysql --user=openser -p --host=172.16.0.10 openser
from 172.16.0.13 and it works?
From localhost afaik mysql client might use Unix socks(/tmp/mysql.sock) .
Use should double check that your MySQL server allows TCP connections
Cheers
Marius
Hi

mysql --user=openser -p --host=172.16.0.10 openser
--socket=/var/lib/mysql/mysql.

i have used this command from 172.16.0.13/14 it will works fine and connect
to DB on 172.16.0.10
--
Regards,

Chandrakant Solanki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20100205/8177ffaf/attachment.htm>
Continue reading on narkive:
Loading...