Tomcat的session共享问题

ZhouLS 发布于 2012/10/29 18:21
阅读 2K+
收藏 0

现在我在做Tomcat的负载均衡,负载实现了,可是没有实现session共享。其中有一个问题是关于组播的问题,有一台服务器上加入一条iptables规则后Tomcat就启动不了,

iptables -I RH-Firewall-1-INPUT 12 -i eth1 -d 228.0.0.4/255.255.255.255 -j ACCEPT

加入后启动Tomcat结果如下:

SEVERE: 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:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
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.performBasicCheck(TcpFailureDetector.java:234)
at org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.checkMembers(TcpFailureDetector.java:200)
at org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.heartbeat(TcpFailureDetector.java:193)
at org.apache.catalina.tribes.group.ChannelInterceptorBase.heartbeat(ChannelInterceptorBase.java:97)
at org.apache.catalina.tribes.group.GroupChannel.heartbeat(GroupChannel.java:149)
at org.apache.catalina.tribes.group.GroupChannel$HeartbeatThread.run(GroupChannel.java:661)
启动的端口:

tcp        0      0 :::9480                     :::*                        LISTEN      3752/java           

只启动了这一个端口,正确的要能启动三个端口的,分别是9480 、9409、 8405

当关闭iptables 服务,情况与上面的相同,只有开启iptabls 服务,并不能加入上面的那条iptables规则才能正常启动tomcat,但是此时无法实现session的共享。

那么牛人能给些帮助解决一下。谢谢了!

加载中
返回顶部
顶部