首页 > 解决方案 > Infinispan v9.4.18 Hotrod 控制台异常 InvalidMagicIdException 报告

问题描述

我正在尝试通过使用跨数据中心复制模式从 Keycloak 外部化 Infinispan 服务器来设置远程缓存。我在这里关注 Keycloak 官方文档 https://www.keycloak.org/docs/latest/server_installation/#crossdc-mode

根据文档,Keycloak 和 Infinispan 版本的使用如下(我希望这些版本相互兼容,因为此信息来自 Keycloak 的官方网站) -

Keycloak 版本 - 11.0.2 Infinispan 版本 - 9.4.18

令我惊讶的是,我在 Infinispan V9.4.18 中发现了一个错误。infinispan 服务器不断报告以下异常。

我从他们的官方网站https://downloads.jboss.org/infinispan/9.4.18.Final/infinispan-server-9.4.18.Final.zip下载了 Infinispan 服务器(版本 infinispan-server-9.4.18) 没有做任何更改为任何 infinispan 配置文件,当我启动 Infinispan 服务器时,它启动时没有任何问题,但是当我尝试在http://127.0.0.1:11222启动 Hotrod 控制台时 (11222 是 hotrod 侦听的端口在我的本地主机上),它不会加载。我得到如下所示的问题:

¡P�<code>org.infinispan.server.hotrod.InvalidMagicIdException: 读取魔术字节或消息 id 时出错:71�P�</code>org.infinispan.server.hotrod.InvalidMagicIdException: 读取魔术字节或消息时出错id: 69…P…<code>org.infinispan.server.hotrod.InvalidMagicIdException: 读取魔法字节或消息 id: 84…P…</code>org.infinispan.server.hotrod.InvalidMagicIdException: 读取魔法错误字节或消息 ID:32¡P�<code>org.infinispan.server.hotrod.InvalidMagicIdException:读取魔术字节或消息 ID 时出错:47�P�</code>org.infinispan.server.hotrod.InvalidMagicIdException:读取魔术字节或消息 id 时出错:32¡P`org.infinispan.server.hotrod.InvalidMagicIdException:读取魔术字节时出错或

在服务器的控制台上,异常如下:

18:41:28,551 错误 [org.infinispan.server.hotrod.BaseRequestProcessor] (HotRod-ServerIO-4-1) ISPN005003:报告异常:org.infinispan.server.hotrod.InvalidMagicIdException:读取魔术字节或消息 ID 时出错:71在 org.infinispan.server.hotrod.HotRodDecoder.switch0(HotRodDecoder.java:208) 在 org.infinispan.server.hotrod.HotRodDecoder.switch1_0(HotRodDecoder.java:153) 在 org.infinispan.server.hotrod.HotRodDecoder.decode (HotRodDecoder.java:143) 在 io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:437) 在 io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:498)。 handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) 在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377) 在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355) at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93) at org .infinispan.server.core.transport.StatsChannelHandler.channelRead(StatsChannelHandler.java:26) 在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377) 在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java :363) 在 io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) 在 io.netty.channel 的 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)。AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel .nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java :650) 在 io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) 在 io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) 在 io.netty.util.concurrent。 SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) 在 io.netty.util.internal.ThreadExecutorMap$2。在 io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) 在 java.lang.Thread.run(Thread.java:748) 运行(ThreadExecutorMap.java:74)

18:41:28,593 错误 [org.infinispan.server.hotrod.BaseRequestProcessor] (HotRod-ServerIO-4-1) ISPN005003:报告异常:org.infinispan.server.hotrod.InvalidMagicIdException:读取魔术字节或消息 ID 时出错:69在 org.infinispan.server.hotrod.HotRodDecoder.switch0(HotRodDecoder.java:208) 在 org.infinispan.server.hotrod.HotRodDecoder.switch1_0(HotRodDecoder.java:153)

我尝试使用多个版本的 Infinispan 服务器(例如 9.4.18、9.4.20、10.0.1、11.0.3),但 Infinispan 版本 9.4.x 给了我问题,而 10.xx 和 11.xx)没有,我可以加载 Hotrod 控制台。没有任何问题(版本 10.xx 和 11.xx)。我关注的用于将 Keycloak 与外部远程 Infinispan 集成的 Keycloak 文档(https://www.keycloak.org/docs/latest/server_installation/#crossdc-mode)基于 Infinispan 版本 v9.4.18,它在架构上存在很大差异从版本 v10.0.1 或 v11.0.3 开始

我在这里看到了 Redhat 建议的一种解决方案https://access.redhat.com/solutions/3920921 围绕这个问题,这听起来像是 hotrod 客户端的协议版本问题(可能与 hotrod 服务器等不兼容)但在我的情况下我正在尝试通过浏览器加载 hotrod 服务器控制台。我本身没有任何 hotrod 客户端应用程序),因此该解决方案没有多大用处。 

有没有人遇到过或对我面临的以下 infinispan 问题有任何想法/指针,以及如何克服这个问题?

在这里欣赏指针/建议。非常感谢贾米尔

标签: infinispaninfinispan-9hot-rod

解决方案


在 10.0 之前的 Infinispan 版本中,管理控制台位于端口 9990。


推荐阅读