Has anyone seen this error before?
" ERROR: db_mysql [km_dbase.c:121]: db_mysql_submit_query(): driver error on query: Host '192.168.xxx.xxx is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"
I fixed it using flush hosts but I'm curious why this popped up? Is there a way to limit connections for Kamailio and why am I reaching that limit with *only 2* SIP endpoints? This is not a heavily utilized database by any means.
Benjamin Fitzgerald LETS Corporation (925) 235-1154 ben@letscorp.us
*******Confidential Notice: This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this message in error, please delete this message from all computers and contact Orion Systems/LETS Corp immediately by return e-mail and/or telephone at (925) 566-5600
Ben,
AFAIK, every Kamailio child process creates its own MySQL connection handle. What are your 'children' set to?
Thanks for your quick reply. I left it default, my config is like this:
fork=yes children=4
and if I check the process list for Kamailio it looks like there are 11 processes. Even so, this is not near the maximum connections supported by MySQL.
Benjamin Fitzgerald LETS Corporation (925) 235-1154 ben@letscorp.us
*******Confidential Notice: This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this message in error, please delete this message from all computers and contact Orion Systems/LETS Corp immediately by return e-mail and/or telephone at (925) 566-5600
On Mon, Aug 17, 2015 at 9:54 AM, Alex Balashov abalashov@evaristesys.com wrote:
Ben,
AFAIK, every Kamailio child process creates its own MySQL connection handle. What are your 'children' set to?
-- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.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
Ben,
if you look at the MySQL server, what does netstat tell you, e.g.
netstat --inet -n | grep 3306?
-- Alex
Alex,
There are 15 total connections and 8 of them are from Kamailio. my.cnf limit is currently set to 500.
Benjamin Fitzgerald LETS Corporation (925) 235-1154 ben@letscorp.us
*******Confidential Notice: This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this message in error, please delete this message from all computers and contact Orion Systems/LETS Corp immediately by return e-mail and/or telephone at (925) 566-5600
On Mon, Aug 17, 2015 at 10:01 AM, Alex Balashov abalashov@evaristesys.com wrote:
Ben,
if you look at the MySQL server, what does netstat tell you, e.g.
netstat --inet -n | grep 3306?
-- Alex
-- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.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
I should add, I fixed the error and restarted Kamailio - so it's possible that Kamailio had way more connections at the time of the error but I did not check the stats at that time, I was focused on fixing it. However, I would think it's unlikely for Kamailio to create so many connections.
Benjamin Fitzgerald LETS Corporation (925) 235-1154 ben@letscorp.us
*******Confidential Notice: This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this message in error, please delete this message from all computers and contact Orion Systems/LETS Corp immediately by return e-mail and/or telephone at (925) 566-5600
On Mon, Aug 17, 2015 at 10:06 AM, Ben Fitzgerald ben@letscorp.us wrote:
Alex,
There are 15 total connections and 8 of them are from Kamailio. my.cnf limit is currently set to 500.
Benjamin Fitzgerald LETS Corporation (925) 235-1154 ben@letscorp.us
*******Confidential Notice: This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this message in error, please delete this message from all computers and contact Orion Systems/LETS Corp immediately by return e-mail and/or telephone at (925) 566-5600
On Mon, Aug 17, 2015 at 10:01 AM, Alex Balashov <abalashov@evaristesys.com
wrote:
Ben,
if you look at the MySQL server, what does netstat tell you, e.g.
netstat --inet -n | grep 3306?
-- Alex
-- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.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
Oh, I misread your initial post. The error message is about connection "errors", not excessive connections.
The language of the error is ambiguous. "many connection errors" could mean lots of connections, or lots of errors related to connections.
Benjamin Fitzgerald LETS Corporation (925) 235-1154 ben@letscorp.us
*******Confidential Notice: This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this message in error, please delete this message from all computers and contact Orion Systems/LETS Corp immediately by return e-mail and/or telephone at (925) 566-5600
On Mon, Aug 17, 2015 at 10:08 AM, Alex Balashov abalashov@evaristesys.com wrote:
Oh, I misread your initial post. The error message is about connection "errors", not excessive connections.
-- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.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
Actually I think I've found the issue. The two servers are connected via two different ethernet interfaces. I initially setup the Kamailio user with the IP of eth1 and that worked but Kamailio was trying to connect to MySQL using eth0 (which I did not have that IP authorized to connect). By trying to connect over and over and failing, MySQL blocked the connection ( http://dev.mysql.com/doc/refman/5.0/en/blocked-host.html).
Benjamin Fitzgerald LETS Corporation (925) 235-1154 ben@letscorp.us
*******Confidential Notice: This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this message in error, please delete this message from all computers and contact Orion Systems/LETS Corp immediately by return e-mail and/or telephone at (925) 566-5600
On Mon, Aug 17, 2015 at 10:12 AM, Ben Fitzgerald ben@letscorp.us wrote:
The language of the error is ambiguous. "many connection errors" could mean lots of connections, or lots of errors related to connections.
Benjamin Fitzgerald LETS Corporation (925) 235-1154 ben@letscorp.us
*******Confidential Notice: This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this message in error, please delete this message from all computers and contact Orion Systems/LETS Corp immediately by return e-mail and/or telephone at (925) 566-5600
On Mon, Aug 17, 2015 at 10:08 AM, Alex Balashov <abalashov@evaristesys.com
wrote:
Oh, I misread your initial post. The error message is about connection "errors", not excessive connections.
-- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.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
On 08/17/2015 01:19 PM, Ben Fitzgerald wrote:
Actually I think I've found the issue. The two servers are connected via two different ethernet interfaces. I initially setup the Kamailio user with the IP of eth1 and that worked but Kamailio was trying to connect to MySQL using eth0 (which I did not have that IP authorized to connect). By trying to connect over and over and failing, MySQL blocked the connection (http://dev.mysql.com/doc/refman/5.0/en/blocked-host.html).
That sounds like a viable diagnosis!