Redis 报错: WRONGTYPE Operation against a key holding the wrong kind of value
我原来的接口存储查看刚开始测试都没有问题,过了一段时间之后,再调接口就开始报这个错
错误解析 :针对持有错误类型值的键的错误类型操作
原因:是set类型存储和查询
redisTemplate.opsForSet().isMember()
后来要获取数据量换成了用的Zset类型存储,查询没有修改
然后就开始报【错误类型】的错,当时找的问题之后也是修改了存储类型 Zset改为set ,发现还是报错
经过仔细查找后,发现是查询redis的键之前已经存在了是【zset】类型的
然后把原来已经存在的键删掉,就可以了。[
redisTemplate.delete()
]
Redis 报错: WRONGTYPE Operation against a key holding the wrong kind of value相关推荐
- redis报错WRONGTYPE Operation against a key holding the wrong kind of value
具体错误: WRONGTYPE Operation against a key holding the wrong kind of value; nested exception is redis.c ...
- RedisTemplate报错WRONGTYPE Operation against a key holding the wrong kind of value
场景 今天写业务代码,先从redis中读取值,不存在的话加redis锁,锁定之后再次尝试读取一次redis,没有值的话去db中读取并写redis缓存. 非常简单的代码,确报错WRONGTYPE Ope ...
- redis操作报错——WRONGTYPE Operation against a key holding the wrong kind of value
背景介绍 今天在操作redis的时候,突然遇到遇到以下错误 原因分析 尝试一:刚看到这个错误的时候,我第一意识是redis中没有key或者值,于是查了一下redis,发现是有这组值的. 果断查了资料发 ...
- redis.exceptions.ResponseError: WRONGTYPE Operation against a key holding the wrong kind of value
完整报错如下: (Python3.6) appleyuchi@ubuntu19:有序集合$ python example_of_range.py Traceback (most recent cal ...
- c# 连接Redis报错:WRONGTYPE Operation against a key holding the wrong kind of value:类型搞混弄出的错误...
今天用C# 连接Redis做性能测试,用的接口是StackExchange.Redis,按照正常的思路获取数据库连接,代码如下: 1 string conn = "我的ip:6379,pas ...
- Redis报错:WRONGTYPE Operation against a key holding the wrong kind of value 解决处理
首先应该明白报这个错误说明了你用的jedis方法与redis服务器中存储数据的类型存在冲突. 例如:数据库中有一个key的数据存储的是Hash类型的,但是你使用jedis执行数据操作的时候却使用了非H ...
- Redis报错:WRONGTYPE Operation against a key holding the wrong kind of value;解决办法
异常收集 原因1: 原因2: 总结:仰天大笑出门去,我辈岂是蓬蒿人 往redis存入Map时出错提示:WRONGTYPE Operation against a key holding the wro ...
- redis: WRONGTYPE Operation against a key holding the wrong kind of value
redis: WRONGTYPE Operation against a key holding the wrong kind of value 原因:因为redis中已经存在了相同的key 解决办法 ...
- redis redisson 分布式锁 WRONGTYPE Operation against a key holding the wrong kind of value
在使用redisson加锁的时候报错如下 trylock WRONGTYPE Operation against a key holding the wrong kind of value 错误场景: ...
- Redis 之 WRONGTYPE Operation against a key holding the wrong kind of value【bug解决】
问题描述: 生产环境redis 查询出错,排查原因才发现,在做login记录缓存到redis,发现有两处地方,set key 时同名了,导致在get key 获取 导致出错! 如下,你在" ...
最新文章
- AI领域五年引用量最高的10大论文:Adam登顶,AlphaGo、Transfromer上榜
- 新的起点,新的生活!加油!
- 【运筹学】表上作业法 ( 找初始基可行解 | 计算检验数 | 调整运量 )
- 【caffe解读】 caffe从数学公式到代码实现5-caffe中的卷积
- Go之十大经典排序算法
- SpringMVC-学习笔记04【SpringMVC返回值类型及响应数据类型】
- php excl图片上传,php 使用PHPExcel 拓展上传文件
- python locust api_干货 | 基于Locust的接口压测
- Python天天美味(4) - isinstance判断对象类型
- 完美的xslt数值函数与字符串函数
- 3. 密切与企业的合作,构建“产学合作”教育模式
- 离心泵CAE_2_ICEM剖分网格_2_叶轮流道
- 计算机用户导入导出,使用csvde批量添加,导入,导出用户
- 四种隔离级别及应用场景
- 大内密探HMM(转)
- mysql 表名 下划线_我们可以在MySQL表名中加下划线吗?
- linux的veth导致网络不通,使用veth-pair和bridge搭建的本地网络环境网络不通
- Spring 教程(一)
- 如何在Python中定义变量
- Android之WiFi连接检测