auth2 并发登录出现 nested exception is org.redisson.client.WriteRedisConnectionException

基于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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值