Description

Redis version : 4.0.14 create cluster user command redis-trib.rb create --replicas 1 ips create cluster three node (three master ,three slave).

redis-cli -a mypassword -c
set a 1
set b 1

Cluster works well

ERROR

redis.conf

appendonly yes
aof-use-rdb-preamble no

Run script on all master node. then, run script on all slave node.

    #!/bin/bash
    echo "restarting redis server..."
      redis-cli  -p "{{ redisServerPort }}" -a "{{ password }}" {{rename-command flushall}}
      sleep 0
      redis-server  /data/redis.conf

happen error in redis.log : Unknown command 'SELECT' reading the append only file

delete .aof file and run redis-server /data/redis.conf , process can be started

Comment From: laixintao

Can you attach your .aof?

Comment From: wangzhaoning

Can you attach your .aof?

@laixintao Thanks for your reply, I think I've found the answer. This article inspired me
https://redis.io/commands/select

The reason is that I rename-command 'SELECT'