redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'PSETEX'

在spring中 针对 RedisTemplate类:

  private RedisTemplate<String, String> template;

当调用下面方法

  template.opsForValue().set(key, value,times, timeUnit);

 当指定timeUnit为TimeUnit.MILLISECONDS 将抛出下面异常

redis.clients.jedis.exceptions.JedisDataException: ERR unknown command ‘PSETEX‘

原因:

  因为redis版本过低  我的redis版本为2点几的,不支持毫秒级别及以下的 过期时间类型

将redis版本升级到3 就没事了

redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'PSETEX'

时间: 2024-10-05 12:25:40

redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'PSETEX'的相关文章

redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set

1.项目启动报错: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool redis.clients.util.Pool.getResource(Pool.java:50) redis.clients.jedis.JedisPool.getResource(JedisPool.java:88) com.radiadesign.catalina.session.

redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots

最近在学习Redis ,在写test测试的时候碰到这个报错: redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis

redis.clients.jedis.exceptions.JedisDataException :READONLY You can&#39;t write

分布式直连同步调用测试时出现的错误:主从复制架构下,默认Slave是只读的,如果写入则会报错: redis.clients.jedis.exceptions.JedisDataException: READONLY You can't write 解决方案: 主redis修改redis.windows.conf文件中的    appendonly no redis.clients.jedis.exceptions.JedisDataException :READONLY You can't wr

Redis错误:jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set

原文链接:http://blog.csdn.net/rchm8519/article/details/48347797 redis.clients.util.Pool.getResource(Pool.Java:50)redis.clients.jedis.JedisPool.getResource(JedisPool.java:88)com.radiadesign.catalina.session.RedisSessionManager.acquireConnection(RedisSessi

redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

今天在链接redis时,遇到问题: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool Could not get a resource from the pool. redis的配置是: <bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig&qu

redis使用问题一:Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisException: Could not get a resource from the pool] with root cause

首先说下redis最简单得使用,出去配置. 需要在你要使用得缓存得地方,例如mybatis在mapper.xml中加入: <cache eviction="LRU" type="cn.jbit.cache.RedisCache"/> 由于是第一次使用redis,再调试代码得时候报错:Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisEx

redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect time out

redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed outat redis.clients.jedis.Connection.connect(Connection.java:154)at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:83)at redis.clients

LogStash启动报错:&lt;Redis::CommandError: ERR unknown command &#39;script&#39;&gt;与batch_count 的 配置

环境条件: 系统版本:centos 6.8 logstash版本:6.3.2 redis版本:2.4 logstash  input配置: input { redis { host => "172.16.73.33" #redis ip port => "52611" #redis 端口 password =>"123456" #redis 密码 db => 9 # 指定redis 库编号 data_type =>

redis.clients.jedis.exception.JedisConnectionException:Could not get a resource from the pool

启动项目报该异常.原因是因为该项目是需要启动redis的,报错原因是因为没有安装redis或者没有手动启动redis,把redis设置成自启动就行了 一.下载windows版本的Redis 官网下载地址:http://redis.io/download github下载地址:https://github.com/MSOpenTech/redis/tags 二.安装Redis 1.这里下载的是Redis-x64-3.2.100版本,我的电脑是win7 64位,所以下载64位版本的,在运行中输入cm