<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 2/14/13 7:09 PM, Daniel-Constantin
Mierla wrote:<br>
</div>
<blockquote cite="mid:511D2869.5040707@gmail.com" type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
I want to add few details about some case that I encountered in
the past. On some specific OS'es, especially centos, seems to be a
limit on the number of new connections allowed in the host. </blockquote>
<br>
To be more precise, it is about a limit on the rate of new
connections. So the problem is when many new connections are opened
at more or less same time. All is fine when new connections are
opened with some delay between them.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote cite="mid:511D2869.5040707@gmail.com" type="cite">That
results in some kamailio processes being able to connect, some
not, with over all result of failing to start kamailio.<br>
<br>
For that reason, there is a config parameter that can be used to
control the forking rate at startup:<br>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www.kamailio.org/wiki/cookbooks/devel/core#fork_delay">http://www.kamailio.org/wiki/cookbooks/devel/core#fork_delay</a><br>
<br>
In case of some kamailio process can connect and some cannot, try
with this parameter.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
<div class="moz-cite-prefix">On 2/13/13 5:12 PM, Muhammad Shahzad
wrote:<br>
</div>
<blockquote
cite="mid:CAFZQphyNb=Dhdw+N3s+L+Rm+HyF5fG5L1ORvyBPic616g6DxyA@mail.gmail.com"
type="cite">
<div>Now, we have different mysql error as well as different
network topology,</div>
<div><br>
</div>
<div>1. Kamailio IP has changed from, previously 192.168.1.170,
now it is 192.168.1.60 as the error says.</div>
<div><br>
</div>
<div><b><font color="#ff0000" size="4">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=<a
moz-do-not-send="true" href="http://192.168.1.60:5060/"
target="_blank">192.168.1.60:5060</a>"</font></b></div>
<div><br>
</div>
<div>2. MySQL server has changed, previously it was 192.168.1.1,
now its 192.168.1.170 as the error says,</div>
<div><br>
</div>
<div><b><font color="#ff0000" size="4">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)</font></b></div>
<div><br>
</div>
<div>3. MySQL connection error has changed, previously, "Unknown
database", now it is "Can't connect to MySQL server".</div>
<div><br>
</div>
<br>
Below i am giving steps again, please carefully check them,
<div> <br>
</div>
<div>1. On mysql server, make sure mysql service is running and
listening for connections on 192.168.1.170, (make sure this ip
is correct as well).</div>
<div><br>
</div>
<div>netstat -plan | grep 3306</div>
<div><br>
</div>
<div>2. On mysql server, make sure "openser" database is created
and fully populated.</div>
<div><br>
</div>
<div>mysql -p openser</div>
<div>SELECT * FROM version;</div>
<div><br>
</div>
<div>3. On mysql server, make sure you have user for kamailio
service 'openser'@'192.168.1.60' (make sure kamailio ip here
is correct) is created with full permissions on "openser"
database.</div>
<div><br>
</div>
<div>SHOW GRANTS FOR 'openser'@'192.168.1.60';</div>
<div><br>
<div>4. On kamailio server, make sure you can access openser
database using user name "openser" and password "operserrw"
manually (make sure user name and password are correct and
mentioned in kamailio.cfg correctly).<br>
<br>
mysql -u openser -h 192.168.1.170 -p openser</div>
<div>SELECT * FROM version;</div>
<div><br>
</div>
<div>5. On kamailio server, check db connection string (db
username, password and host), start kamailio service and
check debug logs in /var/log/message to see if kamailio is
able to connect to mysql database. If not then repeat step
1-4 again.<br>
<br>
Hope it solves the problem.<br>
<br>
<br>
Thank you.<br>
<br>
<br>
<div class="gmail_quote">On Wed, Feb 13, 2013 at 4:23 PM,
Prakash N <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:prakash.n@tevatel.com" target="_blank">prakash.n@tevatel.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi
Shahzap ,
<div><br>
</div>
<div> Thanks for your detail mail </div>
<div><br>
</div>
<div> Now i have reinstalled other server ,still
i am having the same problem </div>
<div><br>
</div>
<div> 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 )</div>
<div><br>
</div>
<div><span
style="color:rgb(0,153,0);font-family:arial,sans-serif;font-size:large">mysql
-u openser -h 192.168.1.170 -p - </span><font
color="#ff0000"><span
style="font-family:arial,sans-serif;font-size:large"> </span><span
style="font-family:arial,sans-serif;font-size:large">I can able to
connect</span></font><span
style="color:rgb(0,153,0);font-family:arial,sans-serif;font-size:large"> </span></div>
<div><span
style="color:rgb(0,153,0);font-family:arial,sans-serif;font-size:large"><br>
</span></div>
<div><span
style="color:rgb(0,153,0);font-family:arial,sans-serif;font-size:large"><br>
</span></div>
<div>SHOW GRANTS FOR 'openser'@'192.168.1.170'; it is
also granted</div>
<div><br>
</div>
<div>Output </div>
<div>
<div>+--------------------------------------------------------------------------------------------------------------------+</div>
<div>| Grants for <a moz-do-not-send="true"
href="mailto:openser@192.168.1.170"
target="_blank">openser@192.168.1.170</a>
|</div>
<div>+--------------------------------------------------------------------------------------------------------------------+</div>
<div>| GRANT USAGE ON *.* TO 'openser'@'192.168.1.170'
IDENTIFIED BY PASSWORD
'*6A673AEF9A79D8A0A4A11EE2FCDCA705FAEC1AE4' |</div>
<div>| GRANT ALL PRIVILEGES ON `openser`.* TO
'openser'@'192.168.1.170'
|</div>
<div>+--------------------------------------------------------------------------------------------------------------------+</div>
<div>2 rows in set (0.00 sec)</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><b><font color="#ff0000" size="4">My error messages
:</font></b></div>
<div><b><font color="#ff0000" size="4"><br>
</font></b></div>
<div><b><font color="#ff0000" size="4">
<div> kamailio: WARNING: <core>
[socket_info.c:1392]: WARNING: fix_hostname:
could not rev. resolve 192.168.1.60</div>
<div>Feb 14 01:40:58 192 kamailio: WARNING:
<core> [socket_info.c:1392]: WARNING:
fix_hostname: could not rev. resolve
192.168.1.60</div>
<div>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)</div>
<div>Feb 14 01:40:58 192
/usr/local/sbin/kamailio[7569]: INFO: usrloc
[hslot.c:53]: locks array size 512</div>
<div>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</div>
<div>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</div>
<div>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</div>
<div>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</div>
<div>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</div>
<div>Feb 14 01:41:00 192 avahi-daemon[5122]:
Withdrawing address record for 192.168.1.60 on
eth0.</div>
<div>Feb 14 01:41:00 192 avahi-daemon[5122]: Host
name conflict, retrying with <192-165></div>
<div>Feb 14 01:41:00 192 avahi-daemon[5122]:
Registering new address record for
fe80::a00:27ff:feea:b793 on eth0.*.</div>
<div>Feb 14 01:41:00 192 avahi-daemon[5122]:
Registering new address record for 192.168.1.60
on eth0.IPv4.</div>
<div>Feb 14 01:41:00 192 avahi-daemon[5122]:
Registering HINFO record with values
'X86_64'/'LINUX'.</div>
<div>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)</div>
<div>Feb 14 01:41:01 192
/usr/local/sbin/kamailio[7575]: ERROR:
<core> [db.c:320]: could not add
connection to the pool</div>
<div>Feb 14 01:41:01 192
/usr/local/sbin/kamailio[7575]: ERROR: auth_db
[authdb_mod.c:174]: unable to connect to the
database</div>
<div>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)</div>
<div>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=<a moz-do-not-send="true"
href="http://192.168.1.60:5060"
target="_blank">192.168.1.60:5060</a>"</div>
<div>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)</div>
<div>Feb 14 01:41:01 192
/usr/local/sbin/kamailio[7576]: ERROR:
<core> [db.c:320]: could not add
connection to the pool</div>
<div>Feb 14 01:41:01 192
/usr/local/sbin/kamailio[7576]: ERROR: auth_db
[authdb_mod.c:174]: unable to connect to the
database</div>
<div>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)</div>
<div>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=<a moz-do-not-send="true"
href="http://192.168.1.60:5060"
target="_blank">192.168.1.60:5060</a>"</div>
<div>Feb 14 01:41:01 192
/usr/local/sbin/kamailio[7576]: : <core>
[main.c:1625]: main_loop: Cannot fork</div>
<div><br>
</div>
</font></b></div>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
- <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://conference.kamailio.com">http://conference.kamailio.com</a> -</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
- <a class="moz-txt-link-freetext" href="http://conference.kamailio.com">http://conference.kamailio.com</a> -</pre>
</body>
</html>