cd-h报错:此角色的主机的运行状况为不良

CDH集群第三个DataNode节点故障,显示此角色的主机的运行状态为不良。图标上有小叹号。

发现节点3的ntpd已经失效。

1. 查看ntp服务命令:

[root@node1 ~]# systemctl status ntpd

* ntpd.service - Network Time Service  Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)  Active: inactive (dead)

可以看到状态为:inactive,也就是没有启动ntp服务

2. 启动ntp服务命令:

[root@node1 ~]# systemctl start ntpd

确认是否启动:

[root@node1 ~]# systemctl status ntpd

● ntpd.service - Network Time Service

  Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)

  Active: active (running) since Mon 2019-08-05 18:36:36 CST; 1 day 14h ago

  Process: 179737 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)

Main PID: 179739 (ntpd)

  CGroup: /system.slice/ntpd.service

          └─179739 /usr/sbin/ntpd -u ntp:ntp -g

Aug 05 18:36:36 uf30-1 ntpd[179739]: Listen normally on 2 lo 127.0.0.1 UDP 123

Aug 05 18:36:36 uf30-1 ntpd[179739]: Listen normally on 3 eno4 xxx.xxx.xxx.xxx UDP 123

Aug 05 18:36:36 uf30-1 ntpd[179739]: Listen normally on 4 virbr0 xxx.xxx.xxx.xxx UDP 123

Aug 05 18:36:36 uf30-1 ntpd[179739]: Listen normally on 5 lo ::1 UDP 123

Aug 05 18:36:36 uf30-1 ntpd[179739]: Listen normally on 6 eno4 fe80::6e92:bfff:fec9:51ed UDP 123

Aug 05 18:36:36 uf30-1 ntpd[179739]: Listen normally on 7 eno4 fca1:571:0:71:6e92:bfff:fec9:51ed UDP 123

Aug 05 18:36:36 uf30-1 ntpd[179739]: Listening on routing socket on fd #24 for interface updates

Aug 05 18:36:36 uf30-1 ntpd[179739]: 0.0.0.0 c016 06 restart

Aug 05 18:36:36 uf30-1 ntpd[179739]: 0.0.0.0 c012 02 freq_set kernel -1.475 PPM

Aug 05 18:36:37 uf30-1 ntpd[179739]: 0.0.0.0 c515 05 clock_sync

可以看到此时ntp状态为active,也就是成功启动了ntp服务

3. 设置开启自启动ntp服务:

[root@node1 ~]# systemctl enable ntpd

4、手工同步节点1和节点3的时钟。

ntpdate -u xxx.xxx.xxx.xxx

xxx.xxx.xxx.xxx为节点1的ip。

然后重启Cloudera Management Service。

这时Cloudera Manage节点上主机3显示正常,但是过了一会同样的错误又发生。

这时检查 /etc/hosts;发现/etc/hosts的每个节点后面又加上了别的别名,果断改回来,重启Cloudera Management Service。

然后Cloudera Manage节点上主机3显示正常,但是过了一会同样的错误又发生。

很郁闷。最后网上查到一篇文章说重启hive后就好了。然后试着重启了下hive,竟然真的好了。。。。。。

总结:为什么重启hive就好了,不太清楚。但是问题的根本原因还是节点之间心跳连接失败。因为新增的hosts的别名不识别。

查看日志 cat /var/log/cloudera-scm-server/cloudera-scm-server.log

 

 

原文链接:https://www.jianshu.com/p/a016d9061fb8

posted @ 2022-08-08 09:39  所向披靡zz  阅读(616)  评论(0编辑  收藏  举报