[keycloak-user] Unable to unmarshall bytes for CLIENT_CACHE_ENTRY_CREATED

Nicolas Ocquidant nocquidant at gmail.com
Tue Nov 20 05:25:02 EST 2018


Hi

This is my very simple UC to reproduce:

1. Start one Infinispan node with passivation=false and shared=true (I
don't think parameters are important here)
2. Start one Keycloak node configured with a remote-cache
3. Populate Keycloak  using admin console (one realm, one client, one role
and one user)
3. Ask for an access token with curl (no client_secret)

Than, in Codec21.readCacheEvent():

case CLIENT_CACHE_ENTRY_CREATED:
   Object createdKey = dataFormat.keyToObj(ByteBufUtil.readArray(buf),
status, whitelist); <-- BOOM

My config is:

<distributed-cache name="sessions" owners="1" remote-timeout="600000"
statistics-enabled="true">
<binary-memory eviction-type="COUNT" size="10000"/>
<remote-store cache="sessions" socket-timeout="600000"
remote-servers="remote-cache" passivation="false" fetch-state="false"
purge="false" preload="false" shared="true">
<property name="rawValues">true</property>
<property
name="marshaller">org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory</property>
</remote-store>
</distributed-cache>

The stack trace is (see below).

It is a config issue?
Thanks for your help
--nick

11:09:13,373 WARN
[org.infinispan.client.hotrod.impl.transport.netty.HeaderDecoder]
(Thread-0) ISPN004039: Unable to complete reading event from server /
127.0.0.1:11222:
org.infinispan.client.hotrod.exceptions.HotRodClientException:: ISPN004034:
Unable to unmarshall bytes
01012926033E2439633136373130642D653432332D343134342D396163652D393461356564353639313462
        at
org.infinispan.client.hotrod.marshall.MarshallerUtil.bytes2obj(MarshallerUtil.java:48)
        at
org.infinispan.client.hotrod.DataFormat.keyToObj(DataFormat.java:93)
        at
org.infinispan.client.hotrod.impl.protocol.Codec21.readCacheEvent(Codec21.java:75)
        at
org.infinispan.client.hotrod.impl.transport.netty.HeaderDecoder.decode(HeaderDecoder.java:153)
        at
org.infinispan.client.hotrod.impl.transport.netty.HintedReplayingDecoder.callDecode(HintedReplayingDecoder.java:98)
        at
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
        at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
        at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
        at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
        at
io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
        at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
        at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
        at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
        at
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
        at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
        at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
        at
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
        at
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
        at
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:647)
        at
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:582)
        at
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:499)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:461)
        at
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Unsupported protocol version 1
        at
org.jboss.marshalling.river.RiverUnmarshaller.start(RiverUnmarshaller.java:1349)
        at
org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.startObjectInput(AbstractJBossMarshaller.java:129)
        at
org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromByteBuffer(AbstractJBossMarshaller.java:110)
        at
org.infinispan.commons.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:82)
        at
org.infinispan.client.hotrod.marshall.MarshallerUtil.bytes2obj(MarshallerUtil.java:32)
        ... 25 more


More information about the keycloak-user mailing list