I installed Kamailio 4.0 on a Ubuntu-Server 14.4 and a MySQL Server on another Ubuntu-server using Virtualbox.
192.168.0.131: MySQL Server
192.168.0.141:Kamailio 4.0
I changed the address of database from localhost to 192.168.0.131. But it does not connect. I googled a lot but could not find the solution. What information do you need to help me?
I have access to server with this command:
mysql -h 192.168.0.131 -u kamailio -p
Some Outputs:
ahmad@ubuntu2:/$ kamctl start
INFO: Starting Kamailio :
ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start failed
Kamailio Error log
ahmad@ubuntu2:/$ kamailio -E -e -dd
loading modules under /usr/local/lib/kamailio/modules_k/:/usr/lib/x86_64-linux-gnu/kamailio/modules/
0(2983) WARNING: <core> [socket_info.c:1407]: fix_hostname(): WARNING: fix_hostname: could not rev. resolve 192.168.0.141
0(2983) WARNING: <core> [socket_info.c:1407]: fix_hostname(): WARNING: fix_hostname: could not rev. resolve 200.200.200.246
0(2983) WARNING: <core> [socket_info.c:1407]: fix_hostname(): WARNING: fix_hostname: could not rev. resolve 192.168.0.141
0(2983) WARNING: <core> [socket_info.c:1407]: fix_hostname(): WARNING: fix_hostname: could not rev. resolve 200.200.200.246
Listening on
udp: 127.0.0.1:5060
udp: 192.168.0.141:5060
udp: 200.200.200.246:5060
tcp: 127.0.0.1:5060
tcp: 192.168.0.141:5060
tcp: 200.200.200.246:5060
Aliases:
tcp: localhost:5060
udp: localhost:5060
0(2983) INFO: <core> [tcp_main.c:4846]: init_tcp(): init_tcp: using epoll_lt as the io watch method (auto detected)
0(2985) INFO: rr [../outbound/api.h:49]: ob_load_api(): Failed to import bind_ob
0(2985) INFO: rr [rr_mod.c:159]: mod_init(): outbound module not available
0(2985) INFO: usrloc [hslot.c:53]: ul_init_locks(): locks array size 512
0(2985) INFO: auth [auth_mod.c:350]: mod_init(): auth: qop set, but nonce-count (nc_enabled) support disabled
0(2985) ERROR: db_mysql [km_my_con.c:109]: db_mysql_new_connection(): driver error: Can't connect to MySQL server on '192.168.0.131' (4)
0(2985) ERROR: <core> [db.c:322]: db_do_init2(): could not add connection to the pool 0(2985) ERROR: usrloc [dlist.c:635]: register_udomain(): failed to open database connection
0(2985) ERROR: registrar [reg_mod.c:516]: domain_fixup(): failed to register domain
0(2985) ERROR: <core> [route.c:1215]: fix_actions(): fixing failed (code=-1) at cfg:/etc/kamailio/kamailio.cfg:637
0(2985) ERROR: <core> [route.c:1215]: fix_actions(): fixing failed (code=-1) at cfg:/etc/kamailio/kamailio.cfg:640
0(2985) ERROR: <core> [route.c:1215]: fix_actions(): fixing failed (code=-1) at cfg:/etc/kamailio/kamailio.cfg:642
ERROR: error -1 while trying to fix configuration
ss output:
ahmad@ubuntu2:~$ sudo ss -l | grep mysql
u_str LISTEN 0 50 /var/run/mysqld/mysqld.sock 204079 * 0
tcp LISTEN 0 50 *:mysql *:*
0 Answers