Infinispan 集群错误:找不到幻数类

时间:2021-06-08 11:59:23

标签: infinispan

我有 2 个 spring boot 应用程序,每个应用程序都连接到它自己的 Infinispan 服务器,它们位于 2 个虚拟机上的集群中。

启动应用程序后,每隔几秒钟我就会在应用程序日志中收到此异常:

o.j.p.MPING: JGRP000191: failed receiving packet from /10.254.1.36:21246: java.lang.ClassNotFoundException: Class for magic number 23294 cannot be found

java.lang.ClassNotFoundException: Class for magic number 23294 cannot be found
        at org.jgroups.conf.ClassConfigurator.create(ClassConfigurator.java:118) ~[jgroups-4.2.9.Final.jar!/:4.2.9.Final]
        at org.jgroups.Message.readHeader(Message.java:836) ~[jgroups-4.2.9.Final.jar!/:4.2.9.Final]
        at org.jgroups.Message.readFrom(Message.java:709) ~[jgroups-4.2.9.Final.jar!/:4.2.9.Final]
        at org.jgroups.protocols.MPING.run(MPING.java:198) [jgroups-4.2.9.Final.jar!/:4.2.9.Final]
        at java.lang.Thread.run(Thread.java:834) [?:?]

o.j.p.MPING: JGRP000191: failed receiving packet from /10.254.1.28:63093: java.lang.ArrayIndexOutOfBoundsException: Index -27011 out of bounds for length 100

java.lang.ArrayIndexOutOfBoundsException: Index -27011 out of bounds for length 100
        at org.jgroups.conf.ClassConfigurator.create(ClassConfigurator.java:129) ~[jgroups-4.2.9.Final.jar!/:4.2.9.Final]
        at org.jgroups.Message.readHeader(Message.java:836) ~[jgroups-4.2.9.Final.jar!/:4.2.9.Final]
        at org.jgroups.Message.readFrom(Message.java:709) ~[jgroups-4.2.9.Final.jar!/:4.2.9.Final]
        at org.jgroups.protocols.MPING.run(MPING.java:198) [jgroups-4.2.9.Final.jar!/:4.2.9.Final]
        at java.lang.Thread.run(Thread.java:834) [?:?]

一切正常运行,运行良好,但应用日志在一段时间内变得太大且不可读,导致更多资源消耗。我看到它与 jGroups 有关,但它为什么出现以及如何解决这些异常,有人遇到过同样的问题吗?

感谢您的回答:)

1 个答案:

答案 0 :(得分:0)

因为它是 jgroups MPING 发现协议,所以我猜还有其他实例具有相同的 MPING 多播地址。 因此,可能会有其他具有不同 JGroups 版本的实例向您的集群发送响应或请求。

我建议不要使用 MPING 地址的默认值。 另一个选项是将配置更改为 TCPPING,您需要通过 IP:port 添加所有集群成员