kubernetes - org.apache.catalina.ha.tcp.ReplicationValve.sendReplicationMessage 无法在 kind 集群中执行复制请求
问题描述
我正在使用 Kubernetes 集群(使用 kind)并尝试“提升和转移”基于 jsf 的应用程序。我已经设法将应用程序部署到一个容器中,目前,我正在尝试在 kubernetes 中实现一个 Tomee 集群。
我已经成功创建了用于 DNS 查找的 Tomcat 服务 ingress-nginix,并使用 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,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.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,4000, alive=-1, securePort=-1, UDP Port=-1, id={1 65 7 100 58 23 -51 120 37 88 125 110 -115 -21 -20 -43 }, payload={}, command={}, 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
...
谁能指出我正确的方向?
解决方案
推荐阅读
- php - 如何使用 php 从表单中插入自动填充数据
- android - java.lang.IndexOutOfBoundsException:检测到不一致。无效的视图支架适配器 positionViewHolder
- python - 为什么代码无法抓取 HTML 类中的任何内容?
- php - 删除关联数组的键不起作用
- angular - 在 Angular 5 中监听文档键事件
- java - javax.naming.NameNotFoundException:名称 [jdbc/rhwebDB] 未绑定在此上下文中。找不到 [jdbc]
- java - 登录时出现此错误:在 org.json.JSONTokener.syntaxError(JSONTokener.java:449)
- python - 无法从谷歌搜索中获取文章结果
- php - php ssh linux屏幕执行
- telnet - 当我在手机上使用命令 telnet 时它不起作用