dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

Master-slave relationship cannot be established normally

Open boomballa opened this issue 1 year ago • 3 comments

I started two instances of dragonfly on the same machine, and the two instances cannot create a master-slave relationship normally.

The startup commands for the two instances are: nohup dragonfly --requirepass=pwd4dba --bind 10.196.3.191 --port 16667 --dir /home/dba/redis/drogonfly16667/ --maxmemory=16gb --keys_output_limit=12288 --dbfilename dragon.rdb & nohup dragonfly --requirepass=pwd4dba --bind 10.196.3.191 --port 16668 --dir /home/dba/redis/drogonfly16668/ --maxmemory=16gb --keys_output_limit=12288 --dbfilename dragon.rdb &

Confirm that the instance status is normal: image

I used the 4.0.11 and 6.0.14 versions of the redis-cli client to try to establish a master-slave relationship with command REPLICAOF and SLAVEOF.will throw an error: (error) ERR could not greet master Bad message

image

Environment (please complete the following information):

  • OS: [Debian GNU/Linux 11]
  • Kernel: Linux 5.10.0-18-amd64 SMP Debian 5.10.140-1 (2022-09-02) x86_64 GNU/Linux
  • Containerized?: [Bare Metal, Docker, Docker Compose, Docker Swarm, Kubernetes, Other]
  • Dragonfly Version: [v1.0.0]

boomballa avatar Mar 23 '23 13:03 boomballa

@adiholden we forgot to support authenticated master 🤦🤦🤦

romange avatar Mar 23 '23 15:03 romange

@boomballa meanwhile try without a requirepass flag. We will fix it soon :)

romange avatar Mar 23 '23 16:03 romange

@boomballa meanwhile try without a requirepass flag. We will fix it soon :) @romange Ok, I will try the no-password mode first, and the online environment must still require password authentication 😄

boomballa avatar Mar 24 '23 03:03 boomballa

@adiholden First of all thanks for your hard work on the fix. Just now I tried to use the new version to verify the instance with requirepass to try to establish a master-slave relationship, but an error is still reported (error) ERR could not greet master Bad message,Please guide me on this, is there a problem with my usage method or the bug has not been completely fixed. image

boomballa avatar Apr 03 '23 09:04 boomballa

Hi @boomballa please path the flag --masterauth=<master_pass> to the replica, this way the replica will know how to auth with master

We will add this to our documentation. Sorry for not writing this before in the issue.

adiholden avatar Apr 03 '23 12:04 adiholden

Hi @boomballa please path the flag --masterauth=<master_pass> to the replica, this way the replica will know how to auth with master

We will add this to our documentation. Sorry for not writing this before in the issue.

@adiholden OK, I'll try it out.

boomballa avatar Apr 04 '23 02:04 boomballa

@adiholden It has been verified that after configuring --masterauth, the master-slave can be established normally, thanks.

boomballa avatar Apr 04 '23 13:04 boomballa