ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Tomcat cluster java.net.NoRouteToHostException: No route to host

Tomcat cluster java.net.NoRouteToHostException: No route to host

原创 Linux操作系统 作者:xz43 时间:2012-04-09 16:21:49 0 删除 编辑
最近配置一个Apache2.22+tomcat6的集群,出现一个很奇怪的问题。配置过程这里不做叙述,网上相关文章很多,这里记录问题。2台机器,1台(IP:26)上有apache和tomcat,另一台(IP:25)上只有tomcat,使用tomcat自带的exaple应用测试集群的分发,一切OK。部署应用后,不管是先启动26上的tomcat,还是先启动25上的tomcat,只要一启动26的tomcat,25的tomcat日志马上抛错:
信息: Invalid chunk starting at byte [0] and ending at byte [0] with a value of [null] ignored
21:19:27,299  INFO SetEncodeFilter:46 - request path:/console/userAction.edu
2012-4-6 21:20:19 org.apache.catalina.tribes.group.interceptors.TcpFailureDetector memberAlive
严重: Unable to perform. failure detection check, assuming member down.
java.net.NoRouteToHostException: No route to host
        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:520)
        at org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive(TcpFailureDetector.java:295)
        at org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive(TcpFailureDetector.java:280)
        at org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAdded(TcpFailureDetector.java:125)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.memberAdded(ChannelInterceptorBase.java:88)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.memberAdded(ChannelInterceptorBase.java:88)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.memberAdded(ChannelInterceptorBase.java:88)
        at org.apache.catalina.tribes.group.ChannelCoordinator.memberAdded(ChannelCoordinator.java:229)
        at org.apache.catalina.tribes.membership.McastService.memberAdded(McastService.java:457)
        at org.apache.catalina.tribes.membership.McastServiceImpl$2.run(McastServiceImpl.java:335)
 
网上也没该问题的有效解决方法,郁闷了好久,以为自己集群配置的问题,各个地方逐个检查也没成功。无意中想得防火墙,如是关闭了2台的防火墙,结果马上恢复正常。故意停掉一个tomcat,用户连接自动切换什么的也都正常了。
在防火墙配置文件开启了好几个端口,一旦启动防火墙,还是报错,呵呵。看来加的端口还不够。
 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9399028/viewspace-720727/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-11-16

  • 博文量
    407
  • 访问量
    1721973