51Testing软件测试论坛

标题: controller报java.net.NoRouteToHostException [打印本页]

作者: 亚瑟王    时间: 2012-1-4 14:48
标题: controller报java.net.NoRouteToHostException
公司内网,用jdbc测试mysql时,报少量的NoRouteToHostException,求助此问题如何解决
Error: System.err: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **
java.net.NoRouteToHostException
MESSAGE: No route to host: connect

STACKTRACE:

java.net.NoRouteToHostException: No route

to host: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at java.net.Socket.connect(Socket.java:478)
        at java.net.Socket.<init>(Socket.java:375)
        at java.net.Socket.<init>(Socket.java:218)
        at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)
        at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:185)
        at stressDB.ShortQuery.getConnection(ShortQuery.java:115)
        at stressDB.ShortQuery.queryDB(ShortQuery.java:41)
        at Actions.action(Actions.java:24)
作者: wangyanzhao    时间: 2012-1-5 13:11
用ODBC协议试一试




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2