解决:Redis:java.util.NoSuchElementException: Unable to validate object at

时间:2016-07-12 11:42:08   收藏:0   阅读:2262

    在Java使用Redis的过程中遇见了一个问题,

redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool at
Caused by: java.util.NoSuchElementException: Unable to validate object at

    这个问题是说拿不到Redis的链接,因为validate通不过。登录一个客户端,手动ping一下

127.0.0.1:6379> ping
(error) 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 logs for details about the error.

    貌似是RDB持久化的问题。

    解决方法,使用redis-cli修改rdb目录

CONFIG SET dir /tmp/redis_data
CONFIG SET dbfilename temp.rdb

    重启redis-server,问题解决!

    OK!

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!