
8th October 2006, 17:54
|
|
Senior Member
|
|
Join Date: Nov 2005
Posts: 130
Thanks: 0
Thanked 3 Times in 2 Posts
|
|
localhost.localdomain is blocked : mysql
Hi all,
I've got a client with one of the debian sarge setup and after a few hours when you try to login to ispconfig you get the following error;
Host 'localhost.localdomain' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'
it is referencing a php file below /home/admispconfig
Once I issue the flush-hosts everything works fine for a while. Another note is it doesn't seem to affect other php/mysql applications.
Any suggestions. I'm not finding any logs that have any meaningful entires.
Cheers!
Ken
|

9th October 2006, 15:00
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,595 Times in 2,446 Posts
|
|
What's the exact error message?
Quote:
|
Originally Posted by KenKnight
Another note is it doesn't seem to affect other php/mysql applications.
|
ISPConfig uses its own Apache and PHP, that's why it doesn't affect other PHP applications.
Quote:
|
Originally Posted by KenKnight
I'm not finding any logs that have any meaningful entires.
|
You can check the logs in /root/ispconfig/httpd/logs.
|

9th October 2006, 22:59
|
|
Senior Member
|
|
Join Date: Nov 2005
Posts: 130
Thanks: 0
Thanked 3 Times in 2 Posts
|
|
Hi Falko,
Here's a copy of the error in the browser;
Warning: mysql_connect() [function.mysql-connect]: Host 'localhost.localdomain' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts' in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 77
As soon as I do the flush-hosts command everything will work fine.
Also, the ispconfig_access_log is showing nothing but stand http GET commands on various files of the site.
Cheers!
Ken
|

8th January 2007, 09:48
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 1,186
Thanks: 60
Thanked 13 Times in 11 Posts
|
|
I have a somewhat similar problem, today a clients website showed this error:
Quote:
Coppermine critical error:
Unable to connect to database !
MySQL said: Host 'localhost' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'
|
when he was trying to access his gallery. after a flush-hosts all is fine...
my munit and hotsanic tools do not show any big traffic, neither mysql accesses...
any clues how to avoid this?
|

9th January 2007, 15:07
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,595 Times in 2,446 Posts
|
|
Are there any errors in your logs?
Did you have a power failure, or was the system reset?
|

9th January 2007, 16:26
|
|
Junior Member
|
|
Join Date: Jan 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
When you get this error message it means that mysqld has gotten a lot (max_connect_errors) of connect requests from the host 'hostname' that have been interrupted in the middle. After max_connect_errors failed requests, mysqld assumes that something is wrong (like an attack from a cracker), and blocks the site from further connections until someone executes the command mysqladmin flush-hosts.
By default, mysqld blocks a host after 10 connection errors. You can easily adjust this by starting the server like this:
shell> safe_mysqld -O max_connect_errors=10000 &
Note that if you get this error message for a given host, you should first check that there isn't anything wrong with TCP/IP connections from that host. If your TCP/IP connections aren't working, it won't do you any good to increase the value of the max_connect_errors variable!
Hope this helps
Peter
|

9th January 2007, 22:20
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 1,186
Thanks: 60
Thanked 13 Times in 11 Posts
|
|
well I have not enabled logging for mysql, I'll do that next thing in the morning. no other relevant logs.
regarding max connection errrors: the databases are only accesse from localhost... so connections are ok ;-)
|

10th January 2007, 04:17
|
|
Junior Member
|
|
Join Date: Jan 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The fact that the database is accessed locally doesn't mean it doesn't use TCP connections which means you can't assume they are OK, cause your error message states something is wrong.
I'm not saying the connection itself is faulty, like a faulty switch somewhere, but you could get aborted connections because people are tired of waiting and shut down their browser, or people keep hitting the refresh button on the browser, which opens a new connection to MySQL and so overflowing the connections.
If the site is visited a lot the default of 10 errors is reached easily especially if it's a shared databases by more then one program, Like Gallery and Php-nuke together.
Peter
|

10th January 2007, 09:31
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 1,186
Thanks: 60
Thanked 13 Times in 11 Posts
|
|
forgive my ignorance, I modified the max connect errors to 100 - I'll see how this works out.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 11:04.
|
Recent comments
1 day 9 hours ago
1 day 14 hours ago
1 day 19 hours ago
1 day 21 hours ago
2 days 11 hours ago
2 days 11 hours ago
2 days 16 hours ago
2 days 22 hours ago
2 days 23 hours ago
3 days 1 hour ago