Search code examples
rubydebuggingredisredis-cli

(error) ERR unknown command 'debug'


Redis version: redis_version:2.8.19

I'm trying to launch this tool: https://github.com/snmaynard/redis-audit But it fails with the following error:

/var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis/pipeline.rb:129:in `value': ERR unknown command 'debug' (Redis::CommandError)
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis/pipeline.rb:121:in `_set'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis/pipeline.rb:67:in `block in finish'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis/pipeline.rb:66:in `each'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis/pipeline.rb:66:in `each_with_index'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis/pipeline.rb:66:in `each'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis/pipeline.rb:66:in `map'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis/pipeline.rb:66:in `finish'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis/client.rb:157:in `block in call_pipeline'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis/client.rb:293:in `with_reconnect'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis/client.rb:155:in `call_pipeline'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis.rb:2258:in `block in pipelined'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis.rb:58:in `block in synchronize'
    from /usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis.rb:58:in `synchronize'
    from /var/lib/gems/2.1.0/gems/redis-3.3.2/lib/redis.rb:2254:in `pipelined'
    from ./redis-audit.rb:120:in `audit_key'
    from ./redis-audit.rb:99:in `block in audit_keys'
    from ./redis-audit.rb:97:in `times'
    from ./redis-audit.rb:97:in `audit_keys'
    from ./redis-audit.rb:356:in `<main>'

When I execute debug object command from redis-cli I get the same error:

(error) ERR unknown command 'debug'

Can anybody please give me an advice how to fix it?


Solution

  • Redis is running as an Amazon ElastiCache node, thus debug command is restricted due to http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/ClientConfig.RestrictedCommands.html