org.apache.catalina.ha.tcp.ReplicationValve.sendReplicationMessage 无法在同类集群中执行复制请求

问题描述

我正在使用 Kubernetes 集群(使用 kind)并尝试“提升和转移”基于 jsf 的应用程序。 我已成功将应用程序部署到容器中,目前,我正在尝试在 kubernetes 中实现一个 Tomee 集群。

我已经成功创建了 ingress-nginix,用于 DNS 查找的 Tomcat 服务,并且已经使用 CloudMembershipService 配置了 tomee:

<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="6">
       <Channel className="org.apache.catalina.tribes.group.GroupChannel">
         <Membership className="org.apache.catalina.tribes.membership.cloud.CloudMembershipService"
            membershipProviderClassName="org.apache.catalina.tribes.membership.cloud.DNSMembershipProvider"
             />
         <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
             filter=".*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt"/>    
       </Channel>
     </Cluster>

当我启动一个节点时一切正常,应用程序响应并且我看不到任何相关问题。此时(节点 1 打开了一个会话)我尝试扩展添加一个节点:我可以看到 pod 出现,正在部署的应用程序以及集群内的通信开始并使用集群成员资格,但随后我得到了 NullPointerException并且没有堆栈跟踪:

10-Jun-2021 07:53:33.928 WARNING [Catalina-utility-2] org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.performBasicCheck Member added,even though we weren't notified:[org.apache.catalina.tribes.membership.MemberImpl[tcp://10.244.2.9:4000,10.244.2.9,4000,alive=-1,securePort=-1,UDP Port=-1,id={58 104 -44 123 25 105 84 -23 -90 79 -106 -99 108 93 -3 -70 },payload={},command={},domain={}]]
10-Jun-2021 07:53:33.928 INFO [Catalina-utility-2] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Replication member added:[org.apache.catalina.tribes.membership.MemberImpl[tcp://10.244.2.9:4000,domain={}]]
10-Jun-2021 07:53:33.951 INFO [Tribes-Task-Receiver[Catalina-Channel]-1] org.apache.catalina.tribes.io.BufferPool.getBufferPool Created a buffer pool with max size:[104857600] bytes of type: [org.apache.catalina.tribes.io.BufferPool15Impl]
10-Jun-2021 07:53:35.497 INFO [main] org.primefaces.webapp.postconstructApplicationEventListener.processEvent Running on PrimeFaces 7.0
10-Jun-2021 07:53:35.499 INFO [main] org.primefaces.extensions.application.postconstructApplicationEventListener.processEvent Running on PrimeFaces Extensions 7.0
10-Jun-2021 07:53:35.519 INFO [main] org.apache.catalina.ha.session.DeltaManager.startInternal Register manager [localhost#/mui] to cluster element [Engine] with name [Catalina]
10-Jun-2021 07:53:35.519 INFO [main] org.apache.catalina.ha.session.DeltaManager.startInternal Starting clustering manager at [localhost#/mui]
10-Jun-2021 07:53:35.528 INFO [main] org.apache.catalina.ha.session.DeltaManager.getAllClusterSessions Manager [localhost#/mui],requesting session state from [org.apache.catalina.tribes.membership.MemberImpl[tcp://10.244.1.9:4000,10.244.1.9,id={1 65 7 100 58 23 -51 120 37 88 125 110 -115 -21 -20 -43 },domain={}]]. This operation will timeout if no session state has been received within [60] seconds.
10-Jun-2021 07:53:35.542 SEVERE [Tribes-Task-Receiver[Catalina-Channel]-4] org.apache.catalina.ha.session.DeltaManager.messageReceived Manager [localhost#/mui]: Unable to receive message through TCP channel
        java.lang.NullPointerException

起初,我认为问题是节点端口没有暴露,但我的配置是

...
    ports:
    - containerPort: 8080
    - containerPort: 4000
...

谁能指出我正确的方向?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...