基于redis实现的auth2鉴权登录服务
完整错误
手动换了行,方便查看
Wrapped by: org.springframework.data.redis.connection.RedisPipelineException: Pipeline contained one or more invalid commands;
nested exception is org.redisson.client.WriteRedisConnectionException:
Unable to write command into connection! Node source: NodeSource
[slot=null, addr=null, redisClient=null, redirect=null, entry=MasterSlaveEntry
[masterEntry=[freeSubscribeConnectionsAmount=1, freeSubscribeConnectionsCounter=value:50:queue:0,
freeConnectionsAmount=23, freeConnectionsCounter=value:63:queue:0, freezed=false,
freezeReason=null, client=[addr=rediss://…:6379], nodeType=MASTER, firstFail=0]]],
connection: RedisConnection@968537160 [redisClient=[addr=rediss://:6379],
channel=[id: 0x6a0eb23a, L:/:49244 - R:/:6379],
currentCommand=null], command: null, params: null after 3 retry attempts
at org.redisson.spring.data.connection.RedissonConnection.closePipeline(RedissonConnection.java:145)
at org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore.removeAccessToken(RedisTokenStore.java:295)
at org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore.removeAccessTokenUsingRefreshToken(RedisTokenStore.java:397)
at org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore.removeAccessTokenUsingRefreshToken(RedisTokenStore.java:376)
at org.springframework.security.oauth2.provider.token.DefaultTokenServices.refreshAccessToken(DefaultTokenServices.java:162)
at org.springframework.security.oauth2.provider.refresh.RefreshTokenGranter.getAccessToken(RefreshTokenGranter.java:47)
at org.springframework.security.oauth2.provider.token.AbstractTokenGranter.grant(AbstractTokenGranter.java:67)
at org.springframework.security.oauth2.provider.CompositeTokenGranter.grant(CompositeTokenGranter.java:38)
at org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer$4.grant(AuthorizationServerEndpointsConfigurer.java:583)
at org.springframework.security.oauth2.provider.CompositeTokenGranter.grant(CompositeTokenGranter.java:38)
at org.springframework.security.oauth2.provider.endpoint.TokenEndpoint.postAccessToken(TokenEndpoint.java:132)
…
解决方案
这个是redisson的BUG,已经更新修复,升级redisson版本即可
当前最新的是3.15.5版本
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
<version>3.15.5</version>
</dependency>
解决来源,redisson 的 gitHub Issues
https://github.com/redisson/redisson/issues/2680