Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if redis-cli connects to redis Cluster Times wrong?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

An error was reported when using redis-cli to connect to the redis cluster for data operation.

. / redis-cli-h 192.24.54.1-p 6379-a '123456192.24.54.1 MOVED 6379 > get name (error) MOVED 5798 192.24.54.2

Solution:

This is generally due to the fact that the cluster mode is not set when redis-cli is started.

Use the-c parameter to start cluster mode at startup, with the following command:

. / redis-cli-h 192.24.54.1-p 6379-a '123456'-c192.24.54.1 yayun > get name- > Redirected to slot [5798] located at 192.24.54.2

For more information:

Using redis-cli to build redis5.x Cluster

The client connects to the redis cluster using redis-cli

The above is the solution to the error report of connecting to the redis cluster, please pay attention to other related articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report