[OpenSIPS-Users] OpenSIPS 1.6.3 MySQL Issues

Randall Degges rdegges at gmail.com
Wed Oct 20 10:06:11 CEST 2010


Hi everyone,

This is my first post on the mailing list.

I'm currently walking through a new OpenSIPS 1.6.3 install on a
ubuntu-server 10.04 (64-bit) box. I've purchased Flavio's book (OpenSIPS
1.6) from PacktPub which I was originally following, but it seemed to have
some incomplete installation instructions, so I've been using a variety of
sources (which I've cited at the end of this email).

My problem is: I can't get OpenSIPS to start at boot because some part of my
MySQL configuration is messed up. Below are links to the appropriate error
messages, as well as configuration files, so that you can get a sense of
what I'm trying to do here. Also, just as additional information: I'm
running MySQL on localhost (the same server that is running OpenSIPS), and I
eventually plan to add in radius support for call accounting purposes.

My error messages from /var/log/syslog: http://pastie.org/1234861
My /etc/init.d/opensips file: http://pastie.org/1234862
My /etc/default/opensips file: http://pastie.org/1234863
My /etc/opensips/opensips.cfg file: http://pastie.org/1234864
My /etc/opensips/opensipsctlrc file: http://pastie.org/1234869

The main error (if you don't want to look through the entire startup log)
is:

Oct 20 07:55:09 OS01 /sbin/opensips[2372]: DBG:db_mysql:db_mysql_connect:
opening connection: mysql://xxxx:xxxx@localhost/opensips
Oct 20 07:55:09 OS01 /sbin/opensips[2372]: ERROR:db_mysql:db_mysql_connect:
driver error(2002): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
Oct 20 07:55:09 OS01 /sbin/opensips[2372]:
ERROR:db_mysql:db_mysql_new_connection: initial connect failed
Oct 20 07:55:09 OS01 /sbin/opensips[2372]: ERROR:core:db_do_init: could not
add connection to the pool
Oct 20 07:55:09 OS01 /sbin/opensips[2372]: ERROR:usrloc:register_udomain:
failed to open database connection
Oct 20 07:55:09 OS01 /sbin/opensips[2372]: ERROR:registrar:domain_fixup:
failed to register domain
Oct 20 07:55:09 OS01 /sbin/opensips[2372]: ERROR:core:fix_actions: fixing
failed (code=-1) at cfg line 330
Oct 20 07:55:09 OS01 /sbin/opensips[2372]: CRITICAL:core:fix_expr:
fix_actions error
Oct 20 07:55:09 OS01 /sbin/opensips[2372]: ERROR:core:main: failed to fix
configuration with err code -1

I've already created the appropriate database (opensips) using the command:
'opensipsdbctl create', which I'm assuming set the proper permissions and
user passwords for the users 'opensips' and 'opensipsro'.

As another quick bit of debugging information, here is the following MySQL
statement ran on my database:

mysql> SELECT user, host FROM mysql.user;
+------------------+-----------+
| user             | host      |
+------------------+-----------+
| root             | 127.0.0.1 |
| debian-sys-maint | localhost |
| opensips         | localhost |
| opensipsro       | localhost |
| root             | localhost |
+------------------+-----------+
5 rows in set (0.00 sec)

I'm at a loss of what to do to get OpenSIPS to connect to MySQL. I've read
through both the official book by Flavio, as well as numerous guides on the
websites, and on VoIP-info, but I've still had no luck.

If anyone can give me some advice or point out a mistake I've made, I'd be
extremely grateful!

Here are some of the references I've used to help me configure my system so
far:

http://www.amazon.com/Building-Telephony-Systems-OpenSIPS-1-6/dp/1849510741/ref=sr_1_1?ie=UTF8&qid=1287561923&sr=8-1
http://www.voip-info.org/wiki/view/Opensips+Installation,+How+to.
http://www.mail-archive.com/users@lists.opensips.org/

Thanks SO much for your time.

-Randall

-- 
Randall Degges
*http://rdegges.com/*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20101020/77e576ee/attachment.htm 


More information about the Users mailing list