Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encountered unregistered class ID with setRegistrationRequired(false) #1138

Open
Packsolite opened this issue Oct 18, 2024 · 2 comments
Open

Comments

@Packsolite
Copy link

Describe the bug
When trying to use redisson pub sub i get the following error:

[02:36:42] [/WARN]: org.redisson.client.RedisException: Unexpected exception while processing command
[02:36:42] [/WARN]: 	at org.redisson.command.CommandAsyncService.convertException(CommandAsyncService.java:369)
[02:36:42] [/WARN]: 	at org.redisson.command.CommandAsyncService.get(CommandAsyncService.java:182)
[02:36:42] [/WARN]: 	at org.redisson.RedissonObject.get(RedissonObject.java:98)
[02:36:42] [/WARN]: 	at org.redisson.RedissonSet.scanIterator(RedissonSet.java:88)
[02:36:42] [/WARN]: 	at org.redisson.RedissonSet$1.iterator(RedissonSet.java:107)
[02:36:42] [/WARN]: 	at org.redisson.iterator.BaseIterator.hasNext(BaseIterator.java:61)
[02:36:42] [/WARN]: 	at eu.smashmc.core.bukkit.command.misc.GlobalChatCommand.onMessage(GlobalChatCommand.java:90)
[02:36:42] [/WARN]: 	at eu.smashmc.core.bukkit.command.misc.GlobalChatCommand.onMessage(GlobalChatCommand.java:30)
[02:36:42] [/WARN]: 	at org.redisson.PubSubMessageListener.onMessage(PubSubMessageListener.java:79)
[02:36:42] [/WARN]: 	at org.redisson.client.RedisPubSubConnection.onMessage(RedisPubSubConnection.java:68)
[02:36:42] [/WARN]: 	at org.redisson.client.handler.CommandPubSubDecoder.lambda$enqueueMessage$2(CommandPubSubDecoder.java:221)
[02:36:42] [/WARN]: 	at java.base/java.util.concurrent.ThreadPerTaskExecutor$TaskRunner.run(ThreadPerTaskExecutor.java:314)
[02:36:42] [/WARN]: 	at java.base/java.lang.VirtualThread.run(VirtualThread.java:309)
[02:36:42] [/WARN]: Caused by: com.esotericsoftware.kryo.KryoException: Encountered unregistered class ID: 12
[02:36:42] [/WARN]: 	at com.esotericsoftware.kryo.util.DefaultClassResolver.readClass(DefaultClassResolver.java:159)
[02:36:42] [/WARN]: 	at com.esotericsoftware.kryo.Kryo.readClass(Kryo.java:758)
[02:36:42] [/WARN]: 	at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:869)
[02:36:42] [/WARN]: 	at org.redisson.codec.Kryo5Codec$4.decode(Kryo5Codec.java:181)
[02:36:42] [/WARN]: 	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:444)
[02:36:42] [/WARN]: 	at org.redisson.client.handler.CommandDecoder.decodeList(CommandDecoder.java:501)
[02:36:42] [/WARN]: 	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:453)
[02:36:42] [/WARN]: 	at org.redisson.client.handler.CommandDecoder.decodeList(CommandDecoder.java:501)
[02:36:42] [/WARN]: 	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:453)
[02:36:42] [/WARN]: 	at org.redisson.client.handler.CommandDecoder.decodeCommand(CommandDecoder.java:220)
[02:36:42] [/WARN]: 	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:148)
[02:36:42] [/WARN]: 	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:124)
[02:36:42] [/WARN]: 	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529)
[02:36:42] [/WARN]: 	at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:366)
[02:36:42] [/WARN]: 	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
[02:36:42] [/WARN]: 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
[02:36:42] [/WARN]: 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
[02:36:42] [/WARN]: 	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
[02:36:42] [/WARN]: 	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
[02:36:42] [/WARN]: 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
[02:36:42] [/WARN]: 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
[02:36:42] [/WARN]: 	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
[02:36:42] [/WARN]: 	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
[02:36:42] [/WARN]: 	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
[02:36:42] [/WARN]: 	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
[02:36:42] [/WARN]: 	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
[02:36:42] [/WARN]: 	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
[02:36:42] [/WARN]: 	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
[02:36:42] [/WARN]: 	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[02:36:42] [/WARN]: 	... 2 more

To Reproduce
Redisson 3.37.0
Try to publish an instance of this class:

	@AllArgsConstructor
	@NoArgsConstructor
	@Getter
	public static class ChatMessage {
		private UUID id;
		private String name;
		private String format;
		private String message;
		private String source;
	}

Environment:

  • OS: Debian GNU/Linux 10 (buster)
  • JDK Version: java 21.0.1 2023-10-17 LTS
  • Kryo Version: 5.6.2
@theigl
Copy link
Collaborator

theigl commented Oct 23, 2024

It is not possible to diagnose the issue from your stacktrace. Please provide a reproducer that does not use Redisson.

Did you just start using Kryo or did this work for you in previous versions?

@Packsolite
Copy link
Author

Hi, i found out this might be a redisson issue. I created an issue over there aswell: redisson/redisson#6233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants