4

I am getting ERROR: "(error) ERR unknown command 'XTRIM'" while running on redis-cli.

127.0.0.1:6379> info
# Server
redis_version:3.2.12
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:7897e7d0e13773f
redis_mode:standalone
os:Linux 3.10.0-957.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.8.5
process_id:36305
run_id:5759acadb741325a8022dad3c136dd9cc26d66d8
tcp_port:6379
uptime_in_seconds:2062
uptime_in_days:0
hz:10
lru_clock:9078505
executable:/usr/bin/redis-server
config_file:/etc/redis.conf

Above is the info of the redis server.

No Command starting "X" 'XTRIM','XADD','XGROUP' is not working.

[root@localhost lib]# redis-cli
127.0.0.1:6379> XTRIM TXNLOG MAXLEN 0
(error) ERR unknown command 'XTRIM'
127.0.0.1:6379> XGROUP CREATE TXNLOG test 0 MKSTREAM
(error) ERR unknown command 'XGROUP'
sam
  • 81
  • 1
  • 7

1 Answers1

4

You should upgrade to redis 5.x

To do this first go to /tmp directory:

$ cd /tmp

Then download and make redis by source:

$ wget http://download.redis.io/releases/redis-5.0.5.tar.gz
$ tar xzf redis-5.0.5.tar.gz
$ cd redis-5.0.5
$ make

And then run redis-server:

$ src/redis-server
Yahya
  • 706
  • 8
  • 23