【问题标题】:Infinispan cluster error: Class for magic number cannot be foundInfinispan 集群错误:找不到幻数类
【发布时间】:2021-08-25 09:55:13
【问题描述】:

我有 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 有关,但为什么会出现以及如何解决这些异常,有人遇到过同样的问题吗?

感谢您的回答:)

【问题讨论】:

    标签: infinispan


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2018-09-01
      • 1970-01-01
      • 2021-07-21
      • 2016-06-08
      • 2013-04-02
      • 2019-03-28
      • 2018-09-27
      • 2013-06-17
      • 2017-11-09
      相关资源
      最近更新 更多