0

I have used Redis in my project for Caching purpose, I used Spring for that set up, You can go through the below mentioned link to understand what I did in my project. http://caseyscarborough.com/blog/2014/12/18/caching-data-in-spring-using-redis/

This code was running fine in production environment (Rhel 7- EC2 instance) from last 6 to 8 months. Now suddenly it started giving "ERR operation not permitted" error


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) 

Due to this we are unable to fetch the data from Redis server. Hence our application doesn't work properly.

I did search on this issue, I have gone through the links like redis (error) ERR operation not permitted

This says to check "requirepass" in redis.conf file whether its commented or not, But when I saw redis.conf file in production environment its commented out. Even through its commented I ran below mentioned command on redis-cli "AUTH foobared" After runing the above mentioned command, It didn't work.

Note : But when we kill the running instance of Redis and Restart it, It will start working properly then it doesn't give "ERR operation not permitted" error.

After Restart of Redis the system start working properly for another one to two hours, then again same issue arises and it will again goes off after I restart the Redis server.

Note : I tried upgrading Redis server from 2.6 to 3 even though it didn't work

Ziaullhaq Savanur
  • 1,848
  • 2
  • 17
  • 20

1 Answers1

0

Is your Redis exposed to the internet? It's possibly a CONFIG SET requirepass attack.

See this SO question and @antirez comments here

Community
  • 1
  • 1
thepirat000
  • 12,362
  • 4
  • 46
  • 72