RedisTemplate报错 Cannot create KQueueEventLoopGroup

Project scenario

Error reporting spring-boot-starter-data-redisused in the projectRedisTemplateCannot create KQueueEventLoopGroup

Problem Description

The specific error information is as follows:

java.lang.IllegalStateException: Cannot create KQueueEventLoopGroup
	at io.lettuce.core.KqueueProvider$AvailableKqueueResources.newEventLoopGroup(KqueueProvider.java:256)
	at io.lettuce.core.KqueueProvider.newEventLoopGroup(KqueueProvider.java:113)
	at io.lettuce.core.resource.DefaultEventLoopGroupProvider.createEventLoopGroup(DefaultEventLoopGroupProvider.java:153)
	at io.lettuce.core.resource.DefaultEventLoopGroupProvider.getOrCreate(DefaultEventLoopGroupProvider.java:116)
	at io.lettuce.core.resource.DefaultEventLoopGroupProvider.allocate(DefaultEventLoopGroupProvider.java:65)
	at io.lettuce.core.AbstractRedisClient.getEventLoopGroup(AbstractRedisClient.java:187)
	at io.lettuce.core.AbstractRedisClient.channelType(AbstractRedisClient.java:173)
	at io.lettuce.core.RedisClient.connectStatefulAsync(RedisClient.java:304)
	at io.lettuce.core.RedisClient.connectStandaloneAsync(RedisClient.java:271)
	at io.lettuce.core.RedisClient.connect(RedisClient.java:204)

Start debugging

Insert image description here
I went in and made a breakpoint, and found that the wrong prototype came out.
Insert image description here
I checked the corresponding keywords based on the wrong prototype, and the solution I found is as follows.

solution

The final solution is to unify the jar version of netty. Please study the following article in detail.
https://blog.csdn.net/lupengfei1009/article/details/103182625

Guess you like

Origin blog.csdn.net/Fine_Cui/article/details/125045462