【问题标题】:Redis troughs (ERR operation not permitted) error even after properly running for 1 to 2 hrsRedis troughs (ERR operation not allowed) 正常运行 1 到 2 小时后仍报错
【发布时间】:2016-03-16 00:27:50
【问题描述】:

我在我的项目中使用 Redis 进行缓存,我使用 Spring 进行设置,您可以通过下面提到的链接了解我在项目中做了什么。 http://caseyscarborough.com/blog/2014/12/18/caching-data-in-spring-using-redis/

过去 6 到 8 个月,此代码在生产环境(Rhel 7-EC2 实例)中运行良好。现在它突然开始给出“不允许ERR操作”错误


org.springframework.dao.InvalidDataAccessApiUsageException: ERR operation not permitted; nested exception is redis.clients.jedis.exceptions.JedisDataException: ERR operation not permitted
    at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:44) 

因此,我们无法从 Redis 服务器获取数据。因此我们的应用程序无法正常工作。

我确实搜索过这个问题,我浏览了类似的链接 redis (error) ERR operation not permitted

这表示要检查 redis.conf 文件中的“requirepass”是否被注释,但是当我在生产环境中看到 redis.conf 文件时,它被注释掉了。 即使通过它的评论,我在 redis-cli 上运行了下面提到的命令 “AUTH foobared” 运行上述命令后,它没有工作。

注意:但是当我们杀死正在运行的 Redis 实例并重新启动它时,它会开始正常工作,然后不会出现“ERR operation not allowed”错误。

Redis 重启后,系统开始正常工作一到两个小时,然后再次出现同样的问题,并且在我重启 Redis 服务器后它又会消失。

注意:我尝试将 Redis 服务器从 2.6 升级到 3,即使它不起作用

【问题讨论】:

    标签: spring redis redis-cache


    【解决方案1】:

    您的 Redis 是否暴露在互联网上? 这可能是CONFIG SET requirepass 攻击。

    this SO question 和@antirez cmets here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-23
      • 1970-01-01
      • 1970-01-01
      • 2018-05-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多