JAVA 这是什么问题啊?

jiangcui111 2012-03-23 04:53:59
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
...全文
205 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
猛犸归来 2012-03-23
  • 打赏
  • 举报
回复
我们刚刚解决了一个类似的问题:对每一个节点(路由器,网关,防火墙)的数据传输进行抓包比较,查找那个节点丢包了,然后查询导致丢包的原因。
jiangcui111 2012-03-23
  • 打赏
  • 举报
回复
都是英文的啊!!!
MiceRice 2012-03-23
  • 打赏
  • 举报
回复
给你的链接里面有5条意见,需要尝试下:

This can happen for a variety of reasons. I just saw it myself a few weeks ago but I can't remember what the fix was for me.

1) Verify the address mysql is bound to, it's probably 127.0.0.1 (only) which I believe is the default (at least on standard Ubuntu server). You'll have to comment out the bind-address parameter in my.cnf to bind to all available addresses (you can't choose multiple, it's one or all).

2) If it is bound to 127.0.0.1 and you can't connect using "localhost", make sure it's not resolving to the IPv6 localhost address instead of IPv4. (or just use the IP address)

3) Double and triple-check the port that mysql is listening on.

4) Make sure you're using the right JDBC connector for your JDK.

5) Make sure you're not doing something really silly like starting mysql with --skip-networking.

I think my first suggestion has the most promise...in fact I think that's where I saw it recently...I was trying to connect to mysql remotely (also on Ubuntu 8.04).
jiangcui111 2012-03-23
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 ldh911 的回复:]
客户端发送了数据包,但是没有收到服务器端的任何返回信息,导致无法连接。

主要是检查网络环境,如防火墙、监听端口是否开启、中间的路由等。

可以参考下这里:
http://serverfault.com/questions/89955/unable-to-connect-to-mysql-through-jdbc-connector-through-tomcat-or-externall……
[/Quote]
怎么解决?
菖蒲老先生 2012-03-23
  • 打赏
  • 举报
回复
是考查英译汉么。。。
MiceRice 2012-03-23
  • 打赏
  • 举报
回复
客户端发送了数据包,但是没有收到服务器端的任何返回信息,导致无法连接。

主要是检查网络环境,如防火墙、监听端口是否开启、中间的路由等。

可以参考下这里:
http://serverfault.com/questions/89955/unable-to-connect-to-mysql-through-jdbc-connector-through-tomcat-or-externally

67,542

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧