Hi Shahzap ,

       Thanks for your detail mail 

       Now  i have reinstalled  other server ,still i am having the same problem 

       If i use localhost it is working correctly ,if i changed to remote sever not working( i have changed DB HOST = 192.168.1.170 (remote server )

mysql -u openser -h 192.168.1.170 -p -     I can able to connect 


SHOW GRANTS FOR 'openser'@'192.168.1.170';  it is also granted

Output 
+--------------------------------------------------------------------------------------------------------------------+
| Grants for openser@192.168.1.170                                                                                   |
+--------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'openser'@'192.168.1.170' IDENTIFIED BY PASSWORD '*6A673AEF9A79D8A0A4A11EE2FCDCA705FAEC1AE4' |
| GRANT ALL PRIVILEGES ON `openser`.* TO 'openser'@'192.168.1.170'                                                   |
+--------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)



My error messages  :

 kamailio: WARNING: <core> [socket_info.c:1392]: WARNING: fix_hostname: could not rev. resolve 192.168.1.60
Feb 14 01:40:58 192 kamailio: WARNING: <core> [socket_info.c:1392]: WARNING: fix_hostname: could not rev. resolve 192.168.1.60
Feb 14 01:40:58 192 kamailio: INFO: <core> [tcp_main.c:4832]: init_tcp: using epoll_lt as the io watch method (auto detected)
Feb 14 01:40:58 192 /usr/local/sbin/kamailio[7569]: INFO: usrloc [hslot.c:53]: locks array size 512
Feb 14 01:40:58 192 /usr/local/sbin/kamailio[7569]: INFO: auth [auth_mod.c:329]: auth: qop set, but nonce-count (nc_enabled) support disabled
Feb 14 01:40:59 192 /usr/local/sbin/kamailio[7569]: INFO: <core> [udp_server.c:179]: INFO: udp_init: SO_RCVBUF is initially 229376
Feb 14 01:40:59 192 /usr/local/sbin/kamailio[7569]: INFO: <core> [udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142
Feb 14 01:40:59 192 /usr/local/sbin/kamailio[7569]: INFO: <core> [udp_server.c:179]: INFO: udp_init: SO_RCVBUF is initially 229376
Feb 14 01:40:59 192 /usr/local/sbin/kamailio[7569]: INFO: <core> [udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142
Feb 14 01:41:00 192 avahi-daemon[5122]: Withdrawing address record for 192.168.1.60 on eth0.
Feb 14 01:41:00 192 avahi-daemon[5122]: Host name conflict, retrying with <192-165>
Feb 14 01:41:00 192 avahi-daemon[5122]: Registering new address record for fe80::a00:27ff:feea:b793 on eth0.*.
Feb 14 01:41:00 192 avahi-daemon[5122]: Registering new address record for 192.168.1.60 on eth0.IPv4.
Feb 14 01:41:00 192 avahi-daemon[5122]: Registering HINFO record with values 'X86_64'/'LINUX'.
Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7575]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7575]: ERROR: <core> [db.c:320]: could not add connection to the pool
Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7575]: ERROR: auth_db [authdb_mod.c:174]: unable to connect to the database
Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7575]: ERROR: <core> [sr_module.c:896]: init_mod_child(): Error while initializing module auth_db (/usr/local/lib64/kamailio/modules_k/auth_db.so)
Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7575]: ERROR: <core> [pt.c:350]: ERROR: fork_process(): init_child failed for  process 6, pid 7575, "udp receiver child=1 sock=192.168.1.60:5060"
Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7576]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7576]: ERROR: <core> [db.c:320]: could not add connection to the pool
Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7576]: ERROR: auth_db [authdb_mod.c:174]: unable to connect to the database
Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7576]: ERROR: <core> [sr_module.c:896]: init_mod_child(): Error while initializing module auth_db (/usr/local/lib64/kamailio/modules_k/auth_db.so)
Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7576]: ERROR: <core> [pt.c:350]: ERROR: fork_process(): init_child failed for  process 7, pid 7576, "udp receiver child=2 sock=192.168.1.60:5060"
Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7576]: : <core> [main.c:1625]: main_loop: Cannot fork


 With Regards

N.Prakash

On Wed, Feb 13, 2013 at 7:22 PM, Muhammad Shahzad <shaheryarkh@gmail.com> wrote:
There is no such thing as local mysql db and remote mysql db connection as far as kamailio is concerned, it uses native libmysqlclient library for mysql operations over TCP socket, EVEN if mysql service is running locally.

Please pay ATTENTION on this error,

Feb 13 03:45:50 ASTERFONE  /usr/local/sbin/kamailio[7654]: ERROR: db_mysql [km_my_con.c:109]: driver error: Unknown database 'openser'

Problem is NOT connecting to mysql service, problem is accessing database named "openser". It either does not exists at all or the user has no permission to access it.

Also I asked you to try below command,

mysql -u openser -h 192.168.1.170 -p openser

You are connecting with mysql with only GREEN words in command, ignoring RED one, which is the important here, since it ensures that you are not only connecting to mysql server but also going to run SQL queries on "openser" database, therefore, it will check for its existence and permission of this user for accessing mentioned database.

You can also run following SQL on mysql console to identify the same problem yourself or send me its output and i will explain it to you,

SHOW GRANTS FOR 'openser'@'192.168.1.170';

Thank you,



On Wed, Feb 13, 2013 at 5:45 AM, Prakash N <prakash.n@tevatel.com> wrote:
Hi Shahzad ,

   It is working through command ( I have already mentioned in my mail)

  I think there is some format error (modparam("acc", "db_url", DBURL)
  I hope i need define some other variable for remote mysql ,if i give local db it is working 

  Please advice what variable or parameter or  some other thing i am missing for remote MYSQL db

With Regards

N.Prakash



On Tue, Feb 12, 2013 at 10:42 PM, Muhammad Shahzad <shaheryarkh@gmail.com> wrote:
Try this,

mysql -u openser -h 192.168.1.170 -p openser

If it gives same error, then user openser does not have permission to access openser db as kamailio says.

Thank you.


On Tue, Feb 12, 2013 at 5:43 PM, Prakash N <prakash.n@tevatel.com> wrote:

Hi Shahzad,

  Please find the error ,but the 'openser' already there in remote mysql server and we can able to reach through command 
with that database  



Feb 13 03:45:50 ASTERFONE  /usr/local/sbin/kamailio[7654]: ERROR: db_mysql [km_my_con.c:109]: driver error: Unknown database 'openser'
Feb 13 03:45:50 ASTERFONE  /usr/local/sbin/kamailio[7654]: ERROR: <core> [db.c:320]: could not add connection to the pool
Feb 13 03:45:50 ASTERFONE  /usr/local/sbin/kamailio[7654]: ERROR: auth_db [authdb_mod.c:174]: unable to connect to the database
Feb 13 03:45:50 ASTERFONE  /usr/local/sbin/kamailio[7654]: ERROR: <core> [sr_module.c:896]: init_mod_child(): Error while initializing module auth_db (/usr/local/lib64/kamailio/modules_k/auth_db.so)
Feb 13 03:45:50 ASTERFONE  /usr/local/sbin/kamailio[7654]: ERROR: <core> [pt.c:350]: ERROR: fork_process(): init_child failed for  process 4, pid 7654, "udp receiver child=3 sock=127.0.0.1:5060"
Feb 13 03:45:50 ASTERFONE  /usr/local/sbin/kamailio[7654]: : <core> [main.c:1625]: main_loop: Cannot fork
Feb 13 03:45:50 ASTERFONE  /usr/local/sbin/kamailio[7650]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)

On Tue, Feb 12, 2013 at 9:01 PM, Muhammad Shahzad <shaheryarkh@gmail.com> wrote:
syslogs are dumped to /var/log/message in CentOS.

Thank you.


On Tue, Feb 12, 2013 at 3:47 PM, Prabhakaran B <prabhakaran@tevatel.com> wrote:
Dear Shahzad 
Im usig centos 6.3,  im not able to find the sylog

i have defined debug on kamailio.cfg if i give kamailio -dd -D 2 to et the debug message 

please advice anyother way to get debug message for our issue

With Regards
B.Prabhakaran

On Tue, Feb 12, 2013 at 7:37 PM, Muhammad Shahzad <shaheryarkh@gmail.com> wrote:
There is no mysql error in logs.

Set debug=4 on line 143 instead of defining WITH_DEBUG, since that flag force kamailio to listen on localhost address only while db is on 192.168.1.x. Then send me debug log file again (logs will appear in syslog).

Thank you.


On Tue, Feb 12, 2013 at 2:54 PM, Prakash N <prakash.n@tevatel.com> wrote:
Dear Shahzad,

  Please find the debug detail


kamailio -dd -D 2

 0(4971) DEBUG: <core> [cfg/cfg_script.c:47]: DEBUG: new_cfg_script_var(): declaring asterisk.bindip
 0(4971) DEBUG: <core> [cfg/cfg_script.c:47]: DEBUG: new_cfg_script_var(): declaring asterisk.bindport
 0(4971) DEBUG: <core> [cfg/cfg_script.c:47]: DEBUG: new_cfg_script_var(): declaring kamailio.bindip
 0(4971) DEBUG: <core> [cfg/cfg_script.c:47]: DEBUG: new_cfg_script_var(): declaring kamailio.bindport
 0(4971) DEBUG: <core> [cfg.y:1785]: loading modules under /usr/local/lib64/kamailio/modules_k/:/usr/local/lib64/kamailio/modules/
loading modules under /usr/local/lib64/kamailio/modules_k/:/usr/local/lib64/kamailio/modules/
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module db_mysql.so
 0(4971) DEBUG: <core> [sr_module.c:499]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/db_mysql.so>
 0(4971) DEBUG: <core> [sr_module.c:522]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/db_mysql/db_mysql.so>
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules/db_mysql.so>
 0(4971) DEBUG: <core> [db_query.c:375]: About to allocate sql_buf size = 65535
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module mi_fifo.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/mi_fifo.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module kex.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/kex.so>
 0(4971) DEBUG: <core> [sr_module.c:343]: register PV from: kex
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module tm.so
 0(4971) DEBUG: <core> [sr_module.c:499]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/tm.so>
 0(4971) DEBUG: <core> [sr_module.c:522]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/tm/tm.so>
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules/tm.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module tmx.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/tmx.so>
 0(4971) DEBUG: <core> [sr_module.c:343]: register PV from: tmx
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module sl.so
 0(4971) DEBUG: <core> [sr_module.c:499]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/sl.so>
 0(4971) DEBUG: <core> [sr_module.c:522]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/sl/sl.so>
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules/sl.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module rr.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/rr.so>
 0(4971) DEBUG: <core> [sr_module.c:343]: register PV from: rr
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module pv.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/pv.so>
 0(4971) DEBUG: <core> [sr_module.c:343]: register PV from: pv
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module maxfwd.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/maxfwd.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module usrloc.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/usrloc.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module registrar.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/registrar.so>
 0(4971) DEBUG: <core> [sr_module.c:343]: register PV from: registrar
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module textops.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/textops.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module siputils.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/siputils.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module xlog.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/xlog.so>
 0(4971) DEBUG: <core> [sr_module.c:343]: register PV from: xlog
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module sanity.so
 0(4971) DEBUG: <core> [sr_module.c:499]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/sanity.so>
 0(4971) DEBUG: <core> [sr_module.c:522]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/sanity/sanity.so>
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules/sanity.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module ctl.so
 0(4971) DEBUG: <core> [sr_module.c:499]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/ctl.so>
 0(4971) DEBUG: <core> [sr_module.c:522]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/ctl/ctl.so>
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules/ctl.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module cfg_rpc.so
 0(4971) DEBUG: <core> [sr_module.c:499]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/cfg_rpc.so>
 0(4971) DEBUG: <core> [sr_module.c:522]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/cfg_rpc/cfg_rpc.so>
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules/cfg_rpc.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module mi_rpc.so
 0(4971) DEBUG: <core> [sr_module.c:499]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/mi_rpc.so>
 0(4971) DEBUG: <core> [sr_module.c:522]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/mi_rpc/mi_rpc.so>
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules/mi_rpc.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module acc.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/acc.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module auth.so
 0(4971) DEBUG: <core> [sr_module.c:499]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/auth.so>
 0(4971) DEBUG: <core> [sr_module.c:522]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/auth/auth.so>
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules/auth.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module auth_db.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/auth_db.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module debugger.so
 0(4971) DEBUG: <core> [sr_module.c:499]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/debugger.so>
 0(4971) DEBUG: <core> [sr_module.c:522]: load_module: module file not found </usr/local/lib64/kamailio/modules_k/debugger/debugger.so>
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules/debugger.so>
 0(4971) DEBUG: <core> [cfg.y:1772]: loading module uac.so
 0(4971) DEBUG: <core> [sr_module.c:564]: load_module: trying to load </usr/local/lib64/kamailio/modules_k/uac.so>
 0(4971) DEBUG: <core> [sr_module.c:343]: register PV from: uac
 0(4971) DEBUG: <core> [mem/f_malloc.c:293]: fm_malloc_init: F_OPTIMIZE=16384, /ROUNDTO=2048
 0(4971) DEBUG: <core> [mem/f_malloc.c:295]: fm_malloc_init: F_HASH_SIZE=2099, fm_block size=33896
 0(4971) DEBUG: <core> [mem/f_malloc.c:296]: fm_malloc_init(0x7ffbe2e78000, 33554432), start=0x7ffbe2e78000
 0(4971) DEBUG: <core> [mem/shm_mem.c:203]: shm_mem_init: success
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'mi_fifo' matches module 'mi_fifo'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <fifo_name> in module mi_fifo [/usr/local/lib64/kamailio/modules_k/mi_fifo.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <fifo_name> in module mi_fifo [/usr/local/lib64/kamailio/modules_k/mi_fifo.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'tm' matches module 'tm'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <failure_reply_mode> in module tm [/usr/local/lib64/kamailio/modules/tm.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <failure_reply_mode> in module tm [/usr/local/lib64/kamailio/modules/tm.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'tm' matches module 'tm'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <fr_timer> in module tm [/usr/local/lib64/kamailio/modules/tm.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <fr_timer> in module tm [/usr/local/lib64/kamailio/modules/tm.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'tm' matches module 'tm'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <fr_inv_timer> in module tm [/usr/local/lib64/kamailio/modules/tm.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <fr_inv_timer> in module tm [/usr/local/lib64/kamailio/modules/tm.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'rr' matches module 'rr'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <enable_full_lr> in module rr [/usr/local/lib64/kamailio/modules_k/rr.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <enable_full_lr> in module rr [/usr/local/lib64/kamailio/modules_k/rr.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'rr' matches module 'rr'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <append_fromtag> in module rr [/usr/local/lib64/kamailio/modules_k/rr.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <append_fromtag> in module rr [/usr/local/lib64/kamailio/modules_k/rr.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'registrar' matches module 'registrar'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <method_filtering> in module registrar [/usr/local/lib64/kamailio/modules_k/registrar.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <method_filtering> in module registrar [/usr/local/lib64/kamailio/modules_k/registrar.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'registrar' matches module 'registrar'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <max_expires> in module registrar [/usr/local/lib64/kamailio/modules_k/registrar.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <max_expires> in module registrar [/usr/local/lib64/kamailio/modules_k/registrar.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'registrar' matches module 'registrar'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <gruu_enabled> in module registrar [/usr/local/lib64/kamailio/modules_k/registrar.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <gruu_enabled> in module registrar [/usr/local/lib64/kamailio/modules_k/registrar.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'acc' matches module 'acc'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <early_media> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <early_media> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'acc' matches module 'acc'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <report_ack> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <report_ack> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'acc' matches module 'acc'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <report_cancels> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <report_cancels> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'acc' matches module 'acc'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <detect_direction> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <detect_direction> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [cfg.lex:1878]: ### returning define ID [FLT_ACC] value [1]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'acc' matches module 'acc'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <log_flag> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <log_flag> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [cfg.lex:1878]: ### returning define ID [FLT_ACCMISSED] value [2]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'acc' matches module 'acc'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <log_missed_flag> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <log_missed_flag> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'acc' matches module 'acc'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <log_extra> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <log_extra> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [cfg.lex:1878]: ### returning define ID [FLT_ACCFAILED] value [3]
 0(4971) DEBUG: <core> [modparam.c:96]: set_mod_param_regex: 'acc' matches module 'acc'
 0(4971) DEBUG: <core> [sr_module.c:770]: find_param_export: found <failed_transaction_flag> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]
 0(4971) DEBUG: <core> [modparam.c:113]: set_mod_param_regex: found <failed_transaction_flag> in module acc [/usr/local/lib64/kamailio/modules_k/acc.so]

On Tue, Feb 12, 2013 at 6:38 PM, Muhammad Shahzad <shaheryarkh@gmail.com> wrote:
These are not debug logs. I need to see what happens before below line,

Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4424]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)

You can enabled debug log either by setting line 143 to 5 OR define WITH_DEBUG.

Thank you.


On Tue, Feb 12, 2013 at 2:00 PM, Prakash N <prakash.n@tevatel.com> wrote:
Dear Shahzad ,

 Please find the error

Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4424]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4424]: ERROR: <core> [db.c:320]: could not add connection to the pool
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4424]: ERROR: auth_db [authdb_mod.c:174]: unable to connect to the database
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4424]: ERROR: <core> [sr_module.c:896]: init_mod_child(): Error while initializing module auth_db (/usr/local/lib64/kamailio/modules_k/auth_db.so)
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4424]: ERROR: <core> [pt.c:350]: ERROR: fork_process(): init_child failed for  process 2, pid 4424, "udp receiver child=1 sock=127.0.0.1:5060"
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4424]: : <core> [main.c:1625]: main_loop: Cannot fork
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4427]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4427]: ERROR: <core> [db.c:320]: could not add connection to the pool
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4427]: ERROR: auth_db [authdb_mod.c:174]: unable to connect to the database
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4427]: ERROR: <core> [sr_module.c:896]: init_mod_child(): Error while initializing module auth_db (/usr/local/lib64/kamailio/modules_k/auth_db.so)
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4427]: ERROR: <core> [pt.c:350]: ERROR: fork_process(): init_child failed for  process 5, pid 4427, "udp receiver child=0 sock=192.168.1.101:5060"
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4428]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4428]: ERROR: <core> [db.c:320]: could not add connection to the pool
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4429]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4423]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4427]: : <core> [main.c:1625]: main_loop: Cannot fork
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4432]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4428]: ERROR: auth_db [authdb_mod.c:174]: unable to connect to the database
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4429]: ERROR: <core> [db.c:320]: could not add connection to the pool
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4423]: ERROR: <core> [db.c:320]: could not add connection to the pool
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4433]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4430]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4431]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4439]: : <core> [pass_fd.c:293]: ERROR: receive_fd: EOF on 16
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4432]: ERROR: <core> [db.c:320]: could not add connection to the pool
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4428]: ERROR: <core> [sr_module.c:896]: init_mod_child(): Error while initializing module auth_db (/usr/local/lib64/kamailio/modules_k/auth_db.so)
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4429]: ERROR: auth_db [authdb_mod.c:174]: unable to connect to the database
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4423]: ERROR: usrloc [ul_mod.c:407]: child(1): failed to connect to database
Feb 13 00:06:05 localhost /usr/local/sbin/kamailio[4433]: ERROR: <core> [db.c:320]: could not add connection to the pool


With Regards

N.Prakash 


On Tue, Feb 12, 2013 at 6:23 PM, Muhammad Shahzad <shaheryarkh@gmail.com> wrote:
kamailio.cfg looks OK, can you increase the debug level to 4+, start kamailio and send me logs? May be we can find something in logs.

Thank you.


On Tue, Feb 12, 2013 at 1:40 PM, Prakash N <prakash.n@tevatel.com> wrote:

Hi Govoiper

Free Memory on my server 2309 MB

                         total       used       free     shared    buffers     cached
    Mem:          2795        486       2309          0         70        180
   -/+ buffers/cache:        234       2561
   Swap:         2927          0          2927


Kamailio error:

ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start failed


tail  -f  /var/log/messages:


Feb 12 23:41:28 localhost /usr/local/sbin/kamailio[4280]: INFO: <core> [udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4281]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4281]: ERROR: <core> [db.c:320]: could not add connection to the pool
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4281]: ERROR: usrloc [ul_mod.c:407]: child(1): failed to connect to database
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4281]: ERROR: <core> [sr_module.c:896]: init_mod_child(): Error while initializing module usrloc (/usr/local/lib64/kamailio/modules_k/usrloc.so)
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4283]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4283]: ERROR: <core> [db.c:320]: could not add connection to the pool
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4283]: ERROR: auth_db [authdb_mod.c:174]: unable to connect to the database
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4283]: ERROR: <core> [sr_module.c:896]: init_mod_child(): Error while initializing module auth_db (/usr/local/lib64/kamailio/modules_k/auth_db.so)
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4283]: ERROR: <core> [pt.c:350]: ERROR: fork_process(): init_child failed for  process 3, pid 4283, "udp receiver child=2 sock=127.0.0.1:5060"
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4283]: : <core> [main.c:1625]: main_loop: Cannot fork

With Regards

N.Prakash

---------- Forwarded message ----------
From: SamyGo <govoiper@gmail.com>
Date: Tue, Feb 12, 2013 at 5:49 PM
Subject: Re: [SR-Users] [sr-dev] openser db on an external mysql server
To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List" <sr-users@lists.sip-router.org>
Cc: Muhammad Shahzad <shaheryarkh@gmail.com>, sr-dev@lists.sip-router.org, Prabhakaran B <prabhakaran@tevatel.com>, Indu Priya <indu@tevatel.com>


Hi Prakash,

Please paste All ERROR appearing and Warnings when you start your kamailio. What is the free memory situation on your server ?

Regards,
Sammy




On Tue, Feb 12, 2013 at 5:12 PM, Prakash N <prakash.n@tevatel.com> wrote:
Hi Muhammad,

   Yes, I have define Mysql on top in Kamailio.cfg



  I have attached Kamailio.cfg ,please advice

With Regards

N.Prakash


On Tue, Feb 12, 2013 at 5:37 PM, Muhammad Shahzad <shaheryarkh@gmail.com> wrote:
What is your connection string in kamailio i.e. DBURL? Also make sure you have defined WITH_MYSQL on the top of kamailio.cfg to load necessary drivers.

#!define WITH_MYSQL

Thank you.


On Tue, Feb 12, 2013 at 12:56 PM, Prakash N <prakash.n@tevatel.com> wrote:
    Hi Shahzad ,
     
        It is not ,We can able to connect remote mysql ( please find the detail below),moreover we can able create openser db from Kamailio server to remote mysql server

Mysql server : 192.168.1.170
Kamailio server : 192.168.1.101

         
Mysql output :

  mysql -u openser -h 192.168.1.170 -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 68
Server version: 5.1.67 Source distribution

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

With Regards

N.Prakash
 

---------- Forwarded message ----------
From: Muhammad Shahzad <shaheryarkh@gmail.com>
Date: Tue, Feb 12, 2013 at 5:16 PM
Subject: Re: [sr-dev] [SR-Users] openser db on an external mysql server
To: Development mailing list of the sip-router project <sr-dev@lists.sip-router.org>
Cc: Daniel-Constantin Mierla <miconda@gmail.com>, sr-users@lists.sip-router.org, Indu Priya <indu@tevatel.com>, Prabhakaran B <prabhakaran@tevatel.com>


Its not a Kamailio error, it is problem with connecting to mysql server. Error 4 means No MySQL Server Running On Specified Host.

May be MySQL server is down or there is some firewall running or MySQL not listening on IP you specified.

Thank you.


On Tue, Feb 12, 2013 at 12:11 PM, Prakash N <prakash.n@tevatel.com> wrote:
     Dear Daniel,

        Thanks for your quick response

       We can able to create operseb db on remote  mysql server ,but   Kamailio not getting start

 Error detail:

 ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to MySQL server on '192.168.1.170' (4)
 ERROR: <core> [db.c:32 0]: could not add connection to the pool
 ERROR: auth_db [authdb _mod.c:174]: unable to connect to the database
 ERROR: <core> [sr_modu le.c:896]: init_mod_child(): Error while initializing module auth_db (/usr/local/lib64/kamailio/modules_k/auth_db.so)


I have attached my kamailo.cfg ( we followed Kamailio and Asterisk real time installation)   ,please advice  

With Regards

N.Prakash

---------- Forwarded message ----------
From: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue, Feb 12, 2013 at 2:41 PM
Subject: Re: [SR-Users] openser db on an external mysql server
To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List" <sr-users@lists.sip-router.org>, sr-dev@lists.sip-router.org, miconda@gmail.com
Cc: Prabhakaran B <prabhakaran@tevatel.com>


Hello,

kamailio database is created with:

kamdbctl create

the host of mysql server has to be specified in kamctlrc file via DBHOST variable - kamctlrc is located in same directory as kamailio.cfg.

In kamailio.cfg, update the db_url value (or DBURL define) to reflect the mysql server host.

Cheers,
Daniel


On 2/12/13 4:16 AM, Prakash N wrote:
Hi All,

  I am new this Kamailo ,ther is any step by step document to set up openser db on an external mysql server ?

With Regards

N.Prakash



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
 - http://conference.kamailio.com -



_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: shari_786pk@hotmail.com
Email: shaheryarkh@googlemail.com





--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: shari_786pk@hotmail.com
Email: shaheryarkh@googlemail.com


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users







--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: shari_786pk@hotmail.com
Email: shaheryarkh@googlemail.com




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: shari_786pk@hotmail.com
Email: shaheryarkh@googlemail.com




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: shari_786pk@hotmail.com
Email: shaheryarkh@googlemail.com




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: shari_786pk@hotmail.com
Email: shaheryarkh@googlemail.com




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: shari_786pk@hotmail.com
Email: shaheryarkh@googlemail.com




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: shari_786pk@hotmail.com
Email: shaheryarkh@googlemail.com