Could not create pool connection. The DBMS driver exception was: null, message from server: "Host '192.168.XX.XX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
早上打开浏览器准备登陆某个系统,发现Error 404--Not Found,有点奇怪,这个服务器应该没人用了才对,然后到weblogic后台去看日志,报如下错误:
“Could not create pool connection. The DBMS driver exception was: null, message from server: "Host '192.168.XX.XX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'”
首先我使用的是mysql数据库
到网上搜罗了一下相关错误,发现是因为“同一个ip在短时间内产生太多(超过mysql数据库max_connection_errors的最大值)中断的数据库连接而导致的阻塞;”
既然知道了原因,就好解决了:提高max_connection_errors的值或者清除缓存
1.清除缓存
cmd窗口远程连接数据库,执行flush hosts;
2.提高max_connection_errors的值
首先查看该属性设置为多大
命令:show global variables like '%max_connect_errors%';
当客户端连接服务端超时(超过connect_timeout), 服务端就会给这个客户端记录一次error,当出错的次数达到max_connect_errors的时候,这个客户端就会被锁定。所以根据业务来尽量把这个值设置大一点,我们可以根据具体需要设置大一点,这里设置为1000.(并非越大越好,越大被攻击时安全性越低)。
使用命令:set global max_connect_errors=1000;
如果需要永久生效,得去修改mysql配置文件里相应属性。可能配置文件里没有这个属性,需要自己手动添加:
参考文章:https://jingyan.baidu.com/album/9f7e7ec087dcbe6f2815542d.html
Could not create pool connection. The DBMS driver exception was: null, message from server: "Host '192.168.XX.XX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'的更多相关文章
- message from server: "Host '192.168.6.68' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts
系统或者程序连接数据报错 null, message from server: "Host '192.168.6.68' is blocked because of many connect ...
- ERROR 1129 (HY000): Host '192.168.7.210' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
一.问题现象 mysql远程连接报错 ERROR (HY000): Host '192.168.7.210' is blocked because of many connection errors; ...
- dcloud_base连接失败(root:admin123!@#qwe@tcp(192.168.8.205:3306)/dcloud_base) Error 1129: Host '192.168.8.205' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
mysql -uroot -p admin123!@#qwe show global variables like '%max_connect_errors%'; set global max_con ...
- Cannot create PoolableConnectionFactory (null, message from server: "Host 'admin-PC' is not allowed to connect to this MySQL server")
1.别人在用自己的tomcat访问我留的查询接口时,出现Cannot create PoolableConnectionFactory (null, message from server: &qu ...
- mysql连接报错 Host ‘xxx’is blocked because of many connection errors;unblock with 'mysqladmin flush-hosts'
程序无法连接MySQL,提示: null, message from server: "Host '192.168.6.68' is blocked because of many con ...
- Call From master/192.168.128.135 to master:8485 failed on connection exception: java.net.ConnectException: Connection refused
hadoop集群搭建了ha,初次启动正常,最近几天启动时偶尔发现,namenode1节点启动后一段时间(大约10几秒-半分钟左右),namenode1上namenode进程停掉,查看日志: -- :: ...
- Hadoop格式化 From hu-hadoop1/192.168.11.11 to hu-hadoop2:8485 failed on connection exception: java.net.
192.168.11.12:8485: Call From hu-hadoop1/192.168.11.11 to hu-hadoop2:8485 failed on connection excep ...
- MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法
环境:linux,mysql5.5.21 错误:Host is blocked because of many connection errors; unblock with 'mysqladmin ...
- 黄聪:MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法(转)
转自:http://www.cnblogs.com/susuyu/archive/2013/05/28/3104249.html 环境:linux,mysql5.5.21 错误:Host is blo ...
随机推荐
- 用VSCode开发一个基于asp.net core 2.0/sql server linux(docker)/ng5/bs4的项目(3)
第一部分: http://www.cnblogs.com/cgzl/p/8478993.html 第二部分: http://www.cnblogs.com/cgzl/p/8481825.html 由于 ...
- lvs-nat 模式-piranha
系统: redhat 6.5 mini 机器名 ip vip gw lvs01(主lvs) 192.168.10.10(外网) 192.168.20.10(内网) 192.168.10.254 lvs ...
- SpringBoot 文件上传临时文件路径问题
年后放假回来,一向运行OK的项目突然图片上传不了了,后台报错日志如下: java.io.IOException: The temporary upload location [/tmp/tomcat. ...
- Web开发工具——Jupyter notebook
jupyter-notebook 安装及远程访问 Introduction Jupyter Notebook(此前被称为 IPython notebook)是一个交互式笔记本,支持运行 40 多种编程 ...
- [BZOJ1058][ZJOJ2007]报表统计
BZOJ Luogu 题目描述 Q的妈妈是一个出纳,经常需要做一些统计报表的工作.今天是妈妈的生日,小Q希望可以帮妈妈分担一些工作,作为她的生日礼物之一. 经过仔细观察,小Q发现统计一张报表实际上是维 ...
- Bzoj5093: 图的价值
题面 Bzoj Sol 一张无向无重边自环的图的边数最多为\(\frac{n(n-1)}{2}\) 考虑每个点的贡献 \[n*2^{\frac{n(n-1)}{2} - (n-1)}\sum_{i=0 ...
- SpringMVC 注解式开发
SpringMVC的注解式开发是指,处理器是基于注解的类的开发.对于每一个定义的处理器,无需再配置文件中逐个注册,只需在代码中通过对类与方法的注解,便可完成注册.即注解替换是配置文件中对于处理器的注册 ...
- 你真的了解interface和内部类么
java 访问控制符 private : 只能被当前类访问 protected : 可以被同包的类和任何子类访问(包内,包外) default : 可以被包内的任何内访问 public ...
- html5判断浏览器来源并跳转
<script type="text/javascript"> var system ={}; var p = navigator.platform; system.w ...
- Java的string学习笔记 与char数组和bufferstring的比较
---恢复内容开始--- 一直用的C 导致这种类望而生畏 现在终于鼓起勇气学习一下 首先学习string类型 String s1 = "AbCdEf"; String s2 = & ...