[OpenSIPS-Users] Opensips 1.5 + mysql over tcp

Brett Nemeroff brett at nemeroff.com
Thu Jan 29 23:43:38 CET 2009


Have you tried to connect to the db using the mysql command line client?ie:
mysql -u username -p -h 1.2.3.4 opensips

The most likely solution is that you don't have networking enabled in mysql.
Does a "netstat -nlp" show mysqld running and on a IP port?

It's also possible that your user/password isn't valid for users from your
IP. I'm not sure what IP the server will think you are at if you connect to
the server on it's own address
-Brett


On Thu, Jan 29, 2009 at 4:09 PM, TCB <tawandac at gmail.com> wrote:

> I have noticed a very strange behaviour when trying to run opensips with a
> db via TCP . This error does
> not occur when OSIPS connects via unix socket to the DB, i have googled
> this error an found not
> solution. As you can see from the log the first few connections succeed but
> then DB conn fails at some point.
> You can see the full debug here http://rafb.net/p/Hv7O2b67.html
> --Error--
>
> Jan 29 23:57:37 [5569] DBG:core:db_bind_mod: using db bind api for
> db_mysql
> Jan 29 23:57:37 [5569] DBG:core:db_do_init: connection 0x81cbb80 not found
> in pool
> Jan 29 23:57:37 [5569] DBG:db_mysql:db_mysql_new_connection: opening
> connection: mysql://xxxx:xxxx@10.10.10.1/opensips
> Jan 29 23:57:37 [5569] DBG:db_mysql:db_mysql_new_connection: connection
> type is 10.10.10.1 via
> TCP/IP
>
> Jan 29 23:57:37 [5569] DBG:db_mysql:db_mysql_new_connection: protocol
> version is 10
> Jan 29 23:57:37 [5569] DBG:db_mysql:db_mysql_new_connection: server version
> is 5.0.72-log
> Jan 29 23:57:37 [5569] DBG:core:db_new_result: allocate 28 bytes for result
> set at 0x81cbc60
>
> --error --
>
> Jan 29 23:47:37 [5340] DBG:core:db_bind_mod: using db bind api for db_mysql
> Jan 29 23:47:37 [5340] DBG:core:db_do_init: connection 0x81cbb78 not found
> in pool
> Jan 29 23:47:37 [5340] DBG:db_mysql:db_mysql_new_connection: opening
> connection: mysql://xxxx:xxxx@10.10.10.1/opensips
> Jan 29 23:47:39 [5340] ERROR:db_mysql:db_mysql_new_connection: driver
> error: Can't connect to MySQL server on '10.01.10.1' (4)
> Jan 29 23:47:39 [5340] ERROR:core:db_do_init: could not add connection to
> the poolJan 29 23:47:39 [5340] ERROR:lcr:mod_init: Unable to open database
> connection
>
> Over 127.0.0.1 TCP it works fine !
>
> Jan 29 23:52:02 [5443] DBG:db_mysql:db_mysql_new_connection: connection
> type is 127.0.0.1 via TCP/IP
> Jan 29 23:52:02 [5443] DBG:db_mysql:db_mysql_new_connection: protocol
> version is 10
> Jan 29 23:52:02 [5443] DBG:db_mysql:db_mysql_new_connection: server version
> is 5.0.67-0ubuntu6
>
> Could this be a bug ?
> --
> TC
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090129/84a02e9f/attachment.htm 


More information about the Users mailing list