解决了

手动修改CVM IP后Zookeeper故障

  • 2016年3月15日
  • 4回复
  • 4193的浏览量

徽章 +6
你好,

最近我按照文档4.6中的手动方法修改了我的CVM IP地址,修改后我可以启动集群,但zookeeper似乎不稳定。

Prism在数据恢复状态仪表板上显示错误“理想的Zookeeper容错为1,但我们只能容忍0个节点故障”。

no . 4.6, esxi 6.0

当我grep zookeeper的pid时,它只显示5个pid,而不是6个,有时会更改为4个。

命令:

nutanix@NTNX-14SM15430005-C-CVM:10.20.20.118:~$ allssh genesis status | grep zookeeper zookeeper: [10354, 10367, 12412, 12438, 12439] zookeeper: [12250, 12263, 15454, 15506, 15507] zookeeper: [19055, 19069, 21163, 21189, 21190]

nutanix@NTNX-14SM15430005-C-CVM:10.20.20.118:~$ allssh genesis status | grep zookeeper zookeeper: [12412, 12438, 12439, 26481, 26494] zookeeper: [15454, 15506, 15507, 27119] zookeeper: [21163, 21189, 21190, 32528, 32542]

有人有什么想法吗?

谢谢。
图标

最佳答案mgauch2016年3月15日,13:51

\n
\n==================================
\nOpen the zookeeper configuration file.nutanix@cvm$ vi \/home\/nutanix\/data\/zookeeper_monitor\/zk_server_config_filePress A to edit values in the file.Update the fields in the file.Change # LAST MODIFIER: field_entry to # LAST MODIFIER: GENESIS<\/b>Increment the existing number by one in the # ZOOKEEPER CONFIG VERSION field. For example, you would change # ZOOKEEPER CONFIG VERSION 3 to # ZOOKEEPER CONFIG VERSION 4Update the entries for each Controller VM (zk1, zk2, zk3, and so on) to match the IP addresses (ip_address) of the Controller VMs.# LAST MODIFIER: GENESIS<\/b># ZOOKEEPER CONFIG VERSION existing_number+1<\/b>ip_address zk2 # DON'T TOUCH THIS LINEip_address zk1 # DON'T TOUCH THIS LINEip_address zk3 # DON'T TOUCH THIS LINEip_address zkN # DON'T TOUCH THIS LINE
\n==================================
\n
\nLink: <\/b>https:\/\/portal.nutanix.com\/#\/page\/docs\/details?targetId=Advanced_Admin-Acr_v4_6:ip__cvm_ip_addr_change_t.html<\/a>","className":"post__content__best_answer"}">
查看原始

4回复

Userlevel 4
徽章 + 18
请检查并确保所有CVM已经更新了/etc/hosts文件中的zookeeper条目。

np
徽章 +6
嗨,唐尼,

我已经按照正确的方式改变CVM的IP手动,并确保我的两个文件是同步的。

其次,我有停止zookooper和重启创世纪如下的KB nutanix之一,但仍然看起来一样。

结果如下:

nutanix@NTNX-14SM15430005-D-CVM:10.20.20.119:~$ allssh cat /home/nutanix/data/zookeeper_monitor/ zk_server_config_fileexecute cat /home/nutanix/data/zookeeper_monitor/zk_server_config_file on cluster================== 10.20.20.118 =================# LAST MODIFIER:zk3 # DON'T TOUCH THIS LINE10.20.20.119 zk2 # DON'T TOUCH THIS LINE10.20.20.120 zk1 # DON'T TOUCH THIS LINE================== 10.20.20.119 =================# LAST MODIFIER:zk3 # DON'T TOUCH THIS LINE10.20.20.119 zk2 # DON'T TOUCH THIS LINE10.20.20.120 zk1 # DON'T TOUCH THIS LINE================== 10.20.20.120 =================# LAST MODIFIER:ZOOKEEPER_MONITOR #动物园管理员配置版本110.20.20.118 zk3 #不要碰这LINE10.20.20.119 zk2 #不要碰这LINE10.20.20.120 zk1 #不要碰这LINEnutanix@NTNX-14SM15430005-D-CVM: 10.20.20.119: ~ $ allssh猫/etc/hostsExecuting猫集群上的/ etc / hosts ================== 10.20.20.118 ================= 127.0.0.1 localhost本地主机。localdomain localhost4 localhost4。localdomain4:: 1 localhost localhost。localdomain localhost6 localhost6.localdomain6127.0.1.1 Nutanix-Controller-VM127.0.0.1 NTNX-14SM15430005-C-CVM10.20.20.118 zk3 #不要碰这LINE10.20.20.119 zk2 #不要碰这LINE10.20.20.120 zk1 #不要碰这条线 ================== 10.20.20.119 ================= 127.0.0.1 localhost localhost。localdomain localhost4 localhost4。localdomain4:: 1 localhost localhost。localdomain localhost6 localhost6.localdomain6127.0.1.1 Nutanix-Controller-VM127.0.0.1 NTNX-14SM15430005-D-CVM10.20.20.118 zk3 #不要碰这LINE10.20.20.119 zk2 #不要碰这LINE10.20.20.120 zk1 #不要碰这条线 ================== 10.20.20.120 ================= 127.0.0.1 localhost localhost。localdomain localhost4 localhost4。localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6127.0.1.1 Nutanix-Controller-VM127.0.0.1 NTNX-14SM36060045-B-CVM10.20.20.118 zk3 # DON'T TOUCH THIS LINE10.20.20.119 zk2 # DON'T TOUCH THIS LINE10.20.20.120 zk1 # DON'T TOUCH THIS LINE
徽章 + 4
看起来你好像漏掉了说明书中的一个步骤。请再次检查你的zk_server_config_file(我没有看到创世纪在那里,它仍然显示zookeeper监控):

==================================
1 .打开zookeeper配置文件。nutanix@cvm$ vi /home/nutanix/data/zookeeper_monitor/ zk_server_config_file按A编辑。更新文件中的字段。修改# LAST MODIFIER: field_entry为# LAST MODIFIER: GENESIS在# ZOOKEEPER CONFIG VERSION字段中,将现有的数字增加1。例如,你可以将# ZOOKEEPER CONFIG VERSION 3改为# ZOOKEEPER CONFIG VERSION 4。更新每个Controller VM (zk1, zk2, zk3,等等)的条目,以匹配Controller VM的IP地址(ip_address)。#最后修改:创世纪 # ZOOKEEPER配置existing_number+1ip_address zk2 # DON'T TOUCH THIS LINEip_address zk1 # DON'T TOUCH THIS LINEip_address zk3 # DON'T TOUCH THIS LINEip_address zkN # DON'T TOUCH THIS LINE
==================================

链接: https://portal.nutanix.com/#/page/docs/details?targetId=Advanced_Admin-Acr_v4_6:ip__cvm_ip_addr_change_t.html
徽章 +6
感谢mgauch,我已经改变了它,它现在工作得很好。

回复


Baidu