配置Tomcat集群时地址冲突异常解决

TOMCAT集群配置好后运行正常,首次访问该服务后出现以下错误:
警告:  Error receiving mcast package. Sleeping 500ms
java.lang.IllegalArgumentException: Invalid package, should start with:{84, 82, 73, 66, 69, 83, 45, 66}
        at org.apache.catalina.tribes.membership.MemberImpl.getMember(MemberImpl.java:322)
        at org.apache.catalina.tribes.membership.MemberImpl.getMember(MemberImpl.java:298)
        at org.apache.catalina.tribes.membership.MemberImpl.getMember(MemberImpl.java:403)
        at org.apache.catalina.tribes.membership.McastServiceImpl.receive(McastServiceImpl.java:320)
        at org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread.run(McastServiceImpl.java:414)

 

tomcat集群教程的默认配置address="228.0.0.4"修改为address="228.0.0.5"

 <Channel className="org.apache.catalina.tribes.group.GroupChannel">
            <Membership className="org.apache.catalina.tribes.membership.McastService"
                        address="228.0.0.5"
                        port="45564"
                        frequency="500"
                        dropTime="3000"/>
出现此问题的原因可能是局域网中存在其他集群机器组

 

 

具体位置在server.xml文件中:

<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster">

      <Channel className="org.apache.catalina.tribes.group.GroupChannel">
            <Membership className="org.apache.catalina.tribes.membership.McastService"
                        address="228.0.0.5"
                        port="45564"
                        frequency="500"
                        dropTime="3000"/>

     </Channel>

     ......

</Cluster>

 

你可能感兴趣的:(tomcat集群)