[OpenSIPS-Users] Reboot errors

Carlo Dimaggio jaasmailing at gmail.com
Thu Oct 16 14:45:52 CEST 2008


Il giorno 16/ott/08, alle ore 14:20, Uwe Kastens ha scritto:

> Hi,
>
>>> Check you init-scripts. You should start mysql before opensips  :)
>>
>> Yes, I know. Mysql is on another server and it is always on- 
>> line... :-)
>> In fact, the previous modules are correctly loaded...
>
> So you are sure, because you are using other "mysql based" modules  
> with
> opensips which are loaded correctly? So the mysql server is  
> reachable if
> opensips starts?

Yes, the mysql server is always reachable...
The problem is not only for the "uri_db" because if I change the  
position of this module (for example after the "alias_db.so"), the  
errors are:

Oct 16 14:36:39 sip /sbin/opensips[4589]:  
ERROR:db_mysql:db_mysql_new_connection: driver error: Can't connect  
to MySQL server on 'XXX.XXX.XXX.XXX' (4)
Oct 16 14:36:39 sip /sbin/opensips[4589]: ERROR:core:db_do_init:  
could not add connection to the pool
Oct 16 14:36:39 sip /sbin/opensips[4589]:  
ERROR:permissions:init_trusted: unable to connect database
Oct 16 14:36:39 sip /sbin/opensips[4589]: ERROR:permissions:mod_init:  
failed to initialize the allow_trusted function
Oct 16 14:36:39 sip /sbin/opensips[4589]: ERROR:core:init_mod: failed  
to initialize module permissions
Oct 16 14:36:39 sip /sbin/opensips[4589]: ERROR:core:main: error  
while initializing modules


Thanks

----

loadmodule "usrloc.so"
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "nat_bflag", 6)
modparam("usrloc", "db_url","mysql://user:pass@XXX.XXX.XXX.XXX/ 
opensips")
modparam("usrloc", "use_domain", 1)

loadmodule "registrar.so"
modparam("registrar", "received_avp", "$avp(i:42)")

loadmodule "rr.so"
modparam("rr", "enable_full_lr", 1)

loadmodule "tm.so"

loadmodule "xlog.so"
modparam("xlog", "buf_size", 4096)
modparam("xlog", "force_color", 0)

loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")

loadmodule "mi_datagram.so"
modparam("mi_datagram", "socket_name", "/var/run/opensips/
opensips_mi.sock")

loadmodule "domain.so"
modparam("domain", "db_url","mysql://user:pass@XXX.XXX.XXX.XXX/ 
opensips")

loadmodule "nathelper.so"
modparam("nathelper","natping_interval", 0)
modparam("nathelper","received_avp", "$avp(i:42)")

loadmodule "textops.so"

loadmodule "mediaproxy.so"
modparam("mediaproxy","mediaproxy_socket", "/var/run/mediaproxy/
dispatcher.sock")

loadmodule "uri.so"

loadmodule "sl.so"
modparam("sl", "enable_stats", 1)

loadmodule "maxfwd.so"

loadmodule "db_mysql.so"
modparam("db_mysql", "ping_interval", 300)
modparam("db_mysql", "auto_reconnect", 1)
modparam("db_mysql", "timeout_interval", 2)

loadmodule "auth.so"

loadmodule "auth_db.so"
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "db_url","mysql://user:pass@XXX.XXX.XXX.XXX/ 
opensips")
modparam("auth_db", "use_domain", 1)


loadmodule "avpops.so"
modparam("avpops", "avp_url", "mysql://user:pass@XXX.XXX.XXX.XXX/ 
opensips")
modparam("avpops", "avp_table", "usr_preferences")
modparam("avpops", "use_domain", 1)

loadmodule "permissions.so"
modparam("permissions", "db_mode", 1)
modparam("permissions", "trusted_table", "trusted")
modparam("permissions", "db_url","mysql://user:pass@XXX.XXX.XXX.XXX/ 
opensips")

loadmodule "lcr.so"
modparam("lcr", "fr_inv_timer_avp", "$avp(i:704)")
modparam("lcr", "gw_uri_avp", "$avp(i:709)")
modparam("lcr", "contact_avp", "$avp(i:711)")
modparam("lcr", "ruri_user_avp", "$avp(i:500)")
modparam("lcr", "rpid_avp", "$avp(i:302)")
modparam("lcr", "flags_avp", "$avp(i:712)")
modparam("lcr", "db_url","mysql://user:pass@XXX.XXX.XXX.XXX/opensips")

loadmodule "alias_db.so"
modparam("alias_db", "db_url","mysql://user:pass@XXX.XXX.XXX.XXX/ 
opensips")
modparam("alias_db", "use_domain", 1)

loadmodule "uri_db.so"
modparam("uri_db", "db_url","mysql://user:pass@XXX.XXX.XXX.XXX/ 
opensips")

loadmodule "acc.so"
modparam("acc", "radius_config", "/etc/radiusclient-ng/
radiusclient.conf")
modparam("acc", "radius_flag",  2)
modparam("acc", "radius_missed_flag", 3)
modparam("acc", "radius_extra", "User-Name=$Au; Calling-Station-Id= 
$from; Called-Station-Id=$to; Sip-Translated-Request-URI=$ruri; Sip- 
RPid=$avp(s:rpid); Source-IP=$si; Source-Port=$sp; Canonical-URI=$avp 
(s:can_uri); Billing-Party=$avp(s:billing_party); Divert-Reason=$avp 
(s:divert_reason); X-RTP-Stat=$hdr(X-RTP-Stat); User-Agent=$hdr(user- 
agent); Contact=$hdr(contact); Event=$hdr(event); SIP-Proxy-IP=$avp 
(s:sip_proxy_ip); ENUM-TLD=$avp(s:enum_tld)")

loadmodule "uac.so"		

loadmodule "options.so"		

loadmodule "siptrace.so"
modparam("siptrace", "db_url", "mysql://user:pass@XXX.XXX.XXX.XXX/ 
opensips")
modparam("siptrace", "trace_flag", 22)
modparam("siptrace", "trace_on", 1)

loadmodule "dialog.so"
modparam("dialog", "db_mode", 1)
modparam("dialog", "enable_stats", 1)
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "db_url", "mysql://user:pass@XXX.XXX.XXX.XXX/ 
opensips")

loadmodule "group.so"
modparam("group", "db_url","mysql://user:pass@XXX.XXX.XXX.XXX/opensips")

loadmodule "nat_traversal.so"
modparam("nat_traversal", "keepalive_interval", 90)
modparam("nat_traversal", "keepalive_method", "OPTIONS")
modparam("nat_traversal", "keepalive_state_file", "/var/run/opensips/ 
keepalive_state")



More information about the Users mailing list