[OpenSIPS-Users] problem with avpops_db_init

Liviu Chircu liviu at opensips.org
Fri Aug 22 10:56:01 CEST 2014


Hello Anton,

I bet MySQL isn't listening on localhost on your live machine, but 
rather on eth0.
If you really can't get it working, please post the output of:

sudo netstat -tlnp | grep mysql

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 08/22/2014 09:57 AM, ?????? ????? ?????????? wrote:
> Hello,
> That's part of the config:
>
> /loadmodule "nat_traversal.so"
> loadmodule "avpops.so" //
> //modparam("auth_db", "load_credentials", 
> "$avp(loadedip)=domain;$avp(subscriber_username)=username;maxaor")
> modparam("avpops","db_url",//
> //"mysql://opensips:opensipsrw@127.0.0.1/opensips") //
> //route[subscriberquota] {//
> //    avp_db_query("select quota from subscriber where 
> username='$var(subscriber)'","$avp(subscriberquota)");//
> //    if ($avp(subscriberquota) == 0) {//
> //        xlog("Subscriberquota route, NO LIMIT FOR USER 
> <$var(subscriber)>");//
> //        return;//
> //    }//
> //    $var(size) = 0;//
> //    get_profile_size("subscriberquota", "$var(subscriber)", 
> "$var(size)");//
> //    if( $var(size) >= $avp(subscriberquota) ){//
> //        sl_send_reply("503", "Simultaneous calls limit reached");//
> //        xlog("Subscriberquota route, Limit of $var(size) active 
> calls has been reached for subscriber $var(subscriber)");//
> //        exit;//
> //    }//
> //set_dlg_profile("subscriberquota","$var(subscriber)");//
> //    get_profile_size("subscriberquota", "$var(subscriber)", 
> "$var(size)");//
> //    xlog("Subscriberquota route, there are now $var(size) active 
> calls for subscriber $var(subscriber)");//
> //    return;//
> //} //
> /
> on the test server (VM VirtualBox - Centos 6.5 32bit) everything works 
> fine, but on the live server - startup error:
>
> Aug 21 03:34:44 corp-32-45 opensips: WARNING:core:fix_socket_list: 
> could not rev. resolve 172.16.5.4
> Aug 21 03:34:44 corp-32-45 /usr/sbin/opensips[7263]: NOTICE:core:main: 
> version: opensips 1.11.2-tls (x86_64/linux)
> Aug 21 03:34:44 corp-32-45 /usr/sbin/opensips[7263]: 
> NOTICE:signaling:mod_init: initializing module ...
> Aug 21 03:34:44 corp-32-45 /usr/sbin/opensips[7263]: 
> WARNING:usrloc:mod_init: Integer flags are now deprecated! Use unique 
> quoted strings!
> Aug 21 03:34:44 corp-32-45 /usr/sbin/opensips[7263]: 
> WARNING:acc:mod_init: Integer flags are now deprecated! Use unique 
> quoted strings!
> Aug 21 03:34:44 corp-32-45 /usr/sbin/opensips[7263]: 
> WARNING:acc:mod_init: Integer flags are now deprecated! Use unique 
> quoted strings!
> Aug 21 03:34:44 corp-32-45 /usr/sbin/opensips[7263]: 
> WARNING:acc:mod_init: Integer flags are now deprecated! Use unique 
> quoted strings!
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7268]: 
> ERROR:db_mysql:db_mysql_connect: driver error(2003): Can't connect to 
> MySQL server on '127.0.0.1' (110)
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7267]: 
> ERROR:db_mysql:db_mysql_connect: driver error(2003): Can't connect to 
> MySQL server on '127.0.0.1' (110)
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7267]: 
> ERROR:db_mysql:db_mysql_new_connection: initial connect failed
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7268]: 
> ERROR:db_mysql:db_mysql_new_connection: initial connect failed
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7268]: 
> ERROR:core:db_do_init: could not add connection to the pool
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7267]: 
> ERROR:core:db_do_init: could not add connection to the pool
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7267]: 
> ERROR:avpops:avpops_db_init: cannot initialize database connection for 
> mysql://opensips:opensipsrw@127.0.0.1/opensips
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7268]: 
> ERROR:avpops:avpops_db_init: cannot initialize database connection for 
> mysql://opensips:opensipsrw@127.0.0.1/opensips
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7267]: 
> ERROR:core:init_mod_child: failed to initializing module avpops, rank -2
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7268]: 
> ERROR:core:init_mod_child: failed to initializing module avpops, rank 1
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7267]: 
> ERROR:core:start_module_procs: error in init_child for PROC_MODULE
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7268]: 
> ERROR:core:main_loop: init_child failed for UDP listener
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7270]: 
> ERROR:db_mysql:db_mysql_connect: driver error(2003): Can't connect to 
> MySQL server on '127.0.0.1' (110)
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7270]: 
> ERROR:db_mysql:db_mysql_new_connection: initial connect failed
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7270]: 
> ERROR:core:db_do_init: could not add connection to the pool
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7270]: 
> ERROR:avpops:avpops_db_init: cannot initialize database connection for 
> mysql://opensips:opensipsrw@127.0.0.1/opensips
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7270]: 
> ERROR:core:init_mod_child: failed to initializing module avpops, rank 3
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7270]: 
> ERROR:core:main_loop: init_child failed for UDP listener
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7270]: 
> ERROR:core:main_loop: failed to send status code
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7287]: 
> CRITICAL:core:receive_fd: EOF on 8
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7287]: 
> CRITICAL:core:receive_fd: EOF on 9
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7287]: 
> CRITICAL:core:receive_fd: EOF on 11
> Aug 21 03:35:47 corp-32-45 /usr/sbin/opensips[7263]: 
> ERROR:nat_traversal:save_keepalive_state: failed to open keepalive 
> state file for writing: Permission denied
>
> *Please help solve the problem*
>
>
> _______________________________________________
> 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/20140822/9fde2689/attachment-0001.htm>


More information about the Users mailing list