草庐IT

redis - 无法在 Redis 集群上添加新节点

coder 2023-11-08 原文

这是一个现有的 5 节点 Redis 集群。只想添加一个新节点。一切似乎都很好,只是由于某种原因它没有被添加:

 root@tssredis07:/home/# ./redis-trib.rb  add-node 172.16.129.112:6379 172.16.128.208:6379
>>> Adding node 172.16.129.112:6379 to cluster 172.16.128.208:6379
>>> Performing Cluster Check (using node 172.16.128.208:6379)
M: 9205296c296b851a5e3f188f12820c6698cf79f4 172.16.128.208:6379
   slots:6554-9829 (3276 slots) master
   1 additional replica(s)
S: e489706f6f963401af755a8310635014793c7376 172.16.128.208:6380
   slots: (0 slots) slave
   replicates f33248f075f4369bb57477f8a0bf6d525346c2fd
S: 3ec915bb4f04cb69badcff1bbe7989ef8e2ae21a 172.16.128.209:6380
   slots: (0 slots) slave
   replicates 2bd8f9d88ffd68ddf1bffe0cd4d1f602dfcec10f
S: 63df6426dfe1a94849079eb6c79eea9b87ef5c63 172.16.128.216:6380
   slots: (0 slots) slave
   replicates 9205296c296b851a5e3f188f12820c6698cf79f4
M: c820ba6f6736a5407a65eca09de2c19e6b953df6 172.16.128.210:6380
   slots:0-3276 (3277 slots) master
   1 additional replica(s)
M: 368f4f921b925bc86c428fe42a5ff65619918aa0 172.16.128.216:6379
   slots:3277-6553 (3277 slots) master
   1 additional replica(s)
M: f33248f075f4369bb57477f8a0bf6d525346c2fd 172.16.128.209:6379
   slots:9830-13106 (3277 slots) master
   1 additional replica(s)
M: 2bd8f9d88ffd68ddf1bffe0cd4d1f602dfcec10f 172.16.128.210:6379
   slots:13107-16383 (3277 slots) master
   1 additional replica(s)
S: 49f9b6ece401cab1207237c1ea94a8e7ca839236 172.16.128.184:6380
   slots: (0 slots) slave
   replicates 368f4f921b925bc86c428fe42a5ff65619918aa0
S: 35c2d7b46a73b2ad275544caf0485d53a740685f 172.16.128.184:6379
   slots: (0 slots) slave
   replicates c820ba6f6736a5407a65eca09de2c19e6b953df6
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
>>> Send CLUSTER MEET to node 172.16.129.112:6379 to make it join the cluster.
[OK] New node added correctly.

但是当想从新节点查看集群节点时,我没有得到它们:

root@tssredis07:/home/# redis-cli
127.0.0.1:6379> cluster nodes
0e192675e1fb55cca495c9e40c43580b46d344ce :6379@16379 myself,master - 0 0 0   connected

为什么新节点集群状态是failed?

127.0.0.1:6379> cluster info
cluster_state:fail
cluster_slots_assigned:0
cluster_slots_ok:0
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:1
cluster_size:0
cluster_current_epoch:0
cluster_my_epoch:0
cluster_stats_messages_sent:0
cluster_stats_messages_received:0

节点在尝试加入现有集群之前是完美的,现在:

127.0.0.1:6379> set foo bar
(error) CLUSTERDOWN The cluster is down

新节点配置文件是另一个节点(和相同端口)conf 文件的副本。一切就绪。有什么帮助吗?

最佳答案

你应该尝试做“集群 session ”

redis-cli -h 172.16.129.112 cluster meet 172.16.128.208 6379

检查是否有错误

关于redis - 无法在 Redis 集群上添加新节点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49566602/

有关redis - 无法在 Redis 集群上添加新节点的更多相关文章

  1. ruby - 我需要将 Bundler 本身添加到 Gemfile 中吗? - 2

    当我使用Bundler时,是否需要在我的Gemfile中将其列为依赖项?毕竟,我的代码中有些地方需要它。例如,当我进行Bundler设置时:require"bundler/setup" 最佳答案 没有。您可以尝试,但首先您必须用鞋带将自己抬离地面。 关于ruby-我需要将Bundler本身添加到Gemfile中吗?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/4758609/

  2. ruby-on-rails - 由于 "wkhtmltopdf",PDFKIT 显然无法正常工作 - 2

    我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-

  3. ruby-on-rails - 无法使用 Rails 3.2 创建插件? - 2

    我对最新版本的Rails有疑问。我创建了一个新应用程序(railsnewMyProject),但我没有脚本/生成,只有脚本/rails,当我输入ruby./script/railsgeneratepluginmy_plugin"Couldnotfindgeneratorplugin.".你知道如何生成插件模板吗?没有这个命令可以创建插件吗?PS:我正在使用Rails3.2.1和ruby​​1.8.7[universal-darwin11.0] 最佳答案 随着Rails3.2.0的发布,插件生成器已经被移除。查看变更日志here.现在

  4. ruby - 将 Bootstrap Less 添加到 Sinatra - 2

    我有一个ModularSinatra应用程序,我正在尝试将Bootstrap添加到应用程序中。get'/bootstrap/application.css'doless:"bootstrap/bootstrap"end我在views/bootstrap中有所有less文件,包括bootstrap.less。我收到这个错误:Less::ParseErrorat/bootstrap/application.css'reset.less'wasn'tfound.Bootstrap.less的第一行是://CSSReset@import"reset.less";我尝试了所有不同的路径格式,但它

  5. ruby - 无法运行 Rails 2.x 应用程序 - 2

    我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby​​:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r

  6. ruby-on-rails - 无法在centos上安装therubyracer(V8和GCC出错) - 2

    我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e

  7. ruby - 续集在添加关联时访问many_to_many连接表 - 2

    我正在使用Sequel构建一个愿望list系统。我有一个wishlists和itemstable和一个items_wishlists连接表(该名称是续集选择的名称)。items_wishlists表还有一个用于facebookid的额外列(因此我可以存储opengraph操作),这是一个NOTNULL列。我还有Wishlist和Item具有续集many_to_many关联的模型已建立。Wishlist类也有:selectmany_to_many关联的选项设置为select:[:items.*,:items_wishlists__facebook_action_id].有没有一种方法可以

  8. ruby - 无法让 RSpec 工作—— 'require' : cannot load such file - 2

    我花了三天的时间用头撞墙,试图弄清楚为什么简单的“rake”不能通过我的规范文件。如果您遇到这种情况:任何文件夹路径中都不要有空格!。严重地。事实上,从现在开始,您命名的任何内容都没有空格。这是我的控制台输出:(在/Users/*****/Desktop/LearningRuby/learn_ruby)$rake/Users/*******/Desktop/LearningRuby/learn_ruby/00_hello/hello_spec.rb:116:in`require':cannotloadsuchfile--hello(LoadError) 最佳

  9. ruby - 无法覆盖 irb 中的 to_s - 2

    我在pry中定义了一个函数:to_s,但我无法调用它。这个方法去哪里了,怎么调用?pry(main)>defto_spry(main)*'hello'pry(main)*endpry(main)>to_s=>"main"我的ruby版本是2.1.2看了一些答案和搜索后,我认为我得到了正确的答案:这个方法用在什么地方?在irb或pry中定义方法时,会转到Object.instance_methods[1]pry(main)>defto_s[1]pry(main)*'hello'[1]pry(main)*end=>:to_s[2]pry(main)>defhello[2]pry(main)

  10. ruby - 无法在 60 秒内获得稳定的 Firefox 连接 (127.0.0.1 :7055) - 2

    我使用的是Firefox版本36.0.1和Selenium-Webdrivergem版本2.45.0。我能够创建Firefox实例,但无法使用脚本继续进行进一步的操作无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055)错误。有人能帮帮我吗? 最佳答案 我遇到了同样的问题。降级到firefoxv33后一切正常。您可以找到旧版本here 关于ruby-无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055),我们在StackOverflow上找到一个类

随机推荐