java.net.NoRouteToHostException

 java  doc 针对这个异常的说明

/**
 * Signals that an error occurred while attempting to connect a
 * socket to a remote address and port.  Typically, the remote
 * host cannot be reached because of an intervening firewall, or
 * if an intermediate router is down.

 */

出现这个问题一般是防火墙默认策略限制导致(如果想看路由信息使用route -n )


这个在linux下是  iptables 在起作用,可以精细的设置多个主机之间的端口访问限制策略,我为了图方便故将这个服务关闭了。

service iptables stop

猜你喜欢

转载自dikar.iteye.com/blog/941240
今日推荐