2015-02-02 17:49:09,035 ERROR basic.DBManager - Failded to establish the connection.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure

The last packet sent successfully to the
server was 0 milliseconds ago. The driver has not received any
packets from the server.
 at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
 at
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
 at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
 at
java.lang.reflect.Constructor.newInstance(Unknown Source)
 at
com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)

at
com.mysql.jdbc.MysqlIO.(MysqlIO.java:344)
 at
com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2333)

at
com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2370)

at
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2154)

at
com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:792)
 at
com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
 at
sun.reflect.GeneratedConstructorAccessor4.newInstance(Unknown
Source)
 at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
 at
java.lang.reflect.Constructor.newInstance(Unknown Source)
 at
com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)

at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)

at java.sql.DriverManager.getConnection(Unknown
Source)
 at java.sql.DriverManager.getConnection(Unknown
Source)
 ...

Caused by: java.net.SocketException: No
buffer space available (maximum connections reached?):
connect
 at
java.net.DualStackPlainSocketImpl.connect0(Native Method)
 at
java.net.DualStackPlainSocketImpl.socketConnect(Unknown
Source)
 at
java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
 at
java.net.AbstractPlainSocketImpl.connectToAddress(Unknown
Source)
 at
java.net.AbstractPlainSocketImpl.connect(Unknown Source)
 at java.net.PlainSocketImpl.connect(Unknown
Source)
 at java.net.SocksSocketImpl.connect(Unknown
Source)
 at java.net.Socket.connect(Unknown Source)
 at java.net.Socket.connect(Unknown Source)
 at java.net.Socket.(Unknown Source)
 at java.net.Socket.(Unknown Source)
 at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)

at
com.mysql.jdbc.MysqlIO.(MysqlIO.java:294)
 ... 19 more
Exception in thread "main" java.lang.NullPointerException
 ...

最后的NullPointerException是指connection。

解决方案:减少connection的数量。

参考:http://ilyljc007.blog.163.com/blog/static/1623518992011111162336911/

原因:与db的连接过多。即使connection closed也不行。

error:No buffer space available (maximum connections reached的更多相关文章

  1. IDEA 服务启动报:No buffer space available (maximum connections reached): connect的解决方案。

    错误提示:严重: Error starting endpointjava.io.IOException: Unable to establish loopback connectionat sun.n ...

  2. 连接db2数据库出现No buffer space available (maximum connections reached?)

    Caused by: javax.naming.NamingException: [jcc][t4][2043][11550][3.57.82] 异常 java.net.SocketException ...

  3. 关于 No buffer space available (maximum connections reached?): connect 的处理

    一.问题: hudson一个应用打包部署一直不成功,检查报错 检查项目的JOB配置,开始以为是SVN的问题,但是重启SVN后问题一直存在 二.分析: TCP协议中,关闭TCP连接的是Server端(当 ...

  4. java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind

    1. 启动注册表编辑器. HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters 2. 新建 值名称:MaxUser ...

  5. Windows 7下解决: java.net.SocketException: No buffer space available (maximum connections reached?)

    查了一大堆网上的资料全都没用,Google得知,是Windows 7 的socket泄漏 : https://supportkb.riverbed.com/support/index?page=con ...

  6. socket-详细分析No buffer space available

    关键词:socket,tcp三次握手,tcp四次握手,2MSL最大报文生存时间,LVS,负载均衡 新年上班第一天,突然遇到一个socket连接No buffer space available的问题, ...

  7. paip java.net.SocketException No buffer space available的解决办法及总结

    java.net.SocketException No buffer space available的解决办法及总结 作者Attilax  艾龙,  EMAIL:1466519819@qq.com 来 ...

  8. socket-详细分析No buffer space available(转)

    新年上班第一天,突然遇到一个socket连接No buffer space available的问题,导致接口大面积调用(webservice,httpclient)失败的问题,重启服务器后又恢复了正 ...

  9. java socket / No buffer space available

    s https://www.cnblogs.com/yiwangzhibujian/p/7107785.html Socket用在哪呢,主要用在进程间,网络间通信. https://www.cnblo ...

随机推荐

  1. [转]让Nginx支持ThinkPHP的URL重写和PATHINFO

    From : http://www.jzxue.com/wangzhankaifa/php/201108/08-8396.html   ThinkPHP支持通过PATHINFO和URL rewrite ...

  2. Lucene学习——IKAnalyzer中文分词

    一.环境 1.平台:MyEclipse8.5/JDK1.5 2.开源框架:Lucene3.6.1/IKAnalyzer2012 3.目的:测试IKAnalyzer的分词效果 二.开发调试 1.下载框架 ...

  3. android 巧用动画使您app风骚起来

    巧用Android的自定义动画,使你更加的有动感,是大多数Android开发人员的目标,那怎么做到这点.请听下文分解: 3.0以前,android支持两种动画模式,tween animation(幅间 ...

  4. c语言统计程序执行时间

    c语言程序执行时间 #include <iostream> #include <cstdio> #include <ctime> int main() { std: ...

  5. 如何防止XSRF攻击

    XSRF全称是 cross-site request forgery(跨站点请求伪造),也称为CSRF,是一种常见的web攻击方式. 攻击形式描述如下: 1.用户登录并访问一个正常的站点 http:/ ...

  6. spring 读取配置文件,将值注入到静态字段

    resources/config/config-dev.properties es.ip.node=xxxxxxxcluster.name=xxxxxxxclient.transport.sniff= ...

  7. Dijkstra和Floyd_warshall

    import java.util.Arrays; import java.util.Scanner; /*题目描写叙述: 有n个城市.城市间有m条道路.每条道路都有长度d.给你起点城市s终点终点t.要 ...

  8. 互联网公司linux运维生产场景常用软件工具一览

    linux的世界真的很精彩,还没入门的朋友赶紧进来吧! 操作系统:Centos※,Freebsd,Ubuntu,Redhat linux,suse linux网站服务:apache※,nginx※,l ...

  9. SSH连接linux时,长时间不操作就断开的解决方案

    转自:http://www.cnblogs.com/jifeng/archive/2011/06/25/2090118.html 修改/etc/ssh/sshd_config文件,找到 ClientA ...

  10. Spring boot 各种入门及问题

    Spring boot 入门 整合(完整版): https://blog.csdn.net/winter_chen001/article/details/77249029 mybatis-genera ...