(error) READONLY You can‘t write against a read only replica.

If the above error occurs, it means that the current redis service is read-only and has no write permission. It is estimated that the service is used as a slave database.

solution:

  • Open the configuration file corresponding to the redis service and change the value of the attribute slave-read-only to no, so that it can be written.
  • Or a faster method is to redis-cliopen the client mode through a command and enter a slaveof no onecommand to stop the current redis service from receiving synchronization from other redis services and upgrade itself to the main database at the same time.

Guess you like

Origin blog.csdn.net/weixin_38106322/article/details/108525318