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

jetcache(RedisLettuceCache) GET error #888

Closed
Skqing opened this issue May 21, 2024 · 3 comments
Closed

jetcache(RedisLettuceCache) GET error #888

Skqing opened this issue May 21, 2024 · 3 comments

Comments

@Skqing
Copy link

Skqing commented May 21, 2024

版本
image

jetcache:
  statIntervalMinutes: 30
  areaInCacheName: false
  local:
    default:
      type: linkedhashmap
      keyConvertor: fastjson2
      limit: 500
  remote:
    default:
      type: redis.lettuce
      keyConvertor: fastjson2
      valueEncoder: java
      valueDecoder: java
      mode: cluster
      uri:
       - redis://172.18.0.80:6379
       - redis://172.18.0.81:6380
       - redis://172.18.0.82:6381

异常信息

2024-05-21 15:27:49.571 [lettuce-epollEventLoop-4-2] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[328924] 
2024-05-21 15:27:50.449 [lettuce-epollEventLoop-4-2] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[389557] 
2024-05-21 15:27:50.451 [lettuce-epollEventLoop-4-1] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[389557] 
2024-05-21 15:27:50.456 [lettuce-epollEventLoop-4-1] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[389557] 
2024-05-21 15:27:51.893 [lettuce-epollEventLoop-4-1] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[443898] 
2024-05-21 15:27:52.788 [lettuce-epollEventLoop-4-1] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[389557] 
2024-05-21 15:27:53.107 [lettuce-epollEventLoop-4-1] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[443898] 
2024-05-21 15:27:53.116 [lettuce-epollEventLoop-4-1] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[443898] 
2024-05-21 15:27:53.838 [lettuce-epollEventLoop-4-1] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[389557] 
2024-05-21 15:27:53.845 [lettuce-epollEventLoop-4-1] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[389557] 
2024-05-21 15:27:53.847 [lettuce-epollEventLoop-4-1] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[389557] 
2024-05-21 15:27:54.098 [lettuce-epollEventLoop-4-1] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[747572] 
2024-05-21 15:27:54.711 [lettuce-epollEventLoop-4-2] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[97791069] 
2024-05-21 15:27:54.713 [lettuce-epollEventLoop-4-1] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 71] - jetcache(RedisLettuceCache) GET error. key=[97791069] 
2024-05-21 15:27:56.564 [lettuce-epollEventLoop-4-2] ERROR [com.alicp.jetcache.support.SquashedLogger.error: 54] - jetcache(RedisLettuceCache) GET error. key=[373673]

根据配置,使用的序列化方式是Java,为什么还报GET错误呢?
并且最近一直使用的是这个版本,没有升级,已经不知道什么原因突然就发现报这样的异常了(多服务环境,一个缓存会被多个服务实例化)

参考:
#690
#886

@areyouok
Copy link
Collaborator

每10秒应该会输出一次异常栈信息,如果你找不到,那就只能用这个commit看看了,先自己打snapshot包。

java原生序列化也不是万能的,一个很常见的错误就是某个要序列化的类没有加serialVersionUID,然后又增删了字段,反序列化的时候就会报错。

@Skqing
Copy link
Author

Skqing commented May 21, 2024

有些是集合框架,或者封装类型也会报错,比较纳闷

private Cache<String, Map<Integer, Set<Integer>>> shopRelationshipCache;
private Cache<String, String>
private Cache<Integer, Integer>

看来还是按照您说的打snapshot包,把完整日志打印出来才行

@Skqing Skqing closed this as completed May 21, 2024
@L-Y-CHENG
Copy link

有些是集合框架,或者封装类型也会报错,比较纳闷

private Cache<String, Map<Integer, Set<Integer>>> shopRelationshipCache;
private Cache<String, String>
private Cache<Integer, Integer>

看来还是按照您说的打snapshot包,把完整日志打印出来才行

请问你的问题通过查看日志解决了嘛? 我这里也是遇到这个问题,
我也是多个服务使用这个缓存框架, 一直好好的突然有个服务获取不到缓存了. 其他服务节点请求没有任何问题
我用的也是 redis.lettuce, 序列化是配置的Java序列化. 找不出原因. 想请教下你解决了嘛

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

No branches or pull requests

3 participants