0565-6.1.0-NFS异常导致Host Monitor及Agent服务错误

1 文档编写目的

如果CDH集群中的节点上有挂载NFS到某个目录,当NFS服务异常导致该目录不可用时,Cloudera Management Service的Host Monitor服务可能会抛出以下错误:

Monitor-HostMonitor throttling_logger ERROR Timed out waiting for worker process collecting filesystem usage to complete.

同时出现问题的节点的Agent服务的log中也会出现如下异常:

[10/Mar/2019 03:34:00 +0000] 12014 MainThread throttling_logger ERROR    Child collection process still around. Skipping new collection. All nodev filesystems will have unknown usage until collection resumes. Current nodev filesystems: /dev/shm,/run,/sys/fs/cgroup,/run/user/0,/run/user/997,/run/cloudera-scm-agent/process,/nfs_test

Agent服务异常很可能会导致该节点上的Hadoop相关服务都异常,本文Fayson会模拟该情况,然后具体演示如何解决该问题。

  • 测试环境

1.CDH6.1

2.Redhat7.4

3.集群已启用Kerberos

4.集群已启用HDFS HA

2 问题重现

1.在重现问题前,Fayson首先介绍一下测试环境的情况,Fayson在其中一个DataNode,IP为172.31.11.232上安装了NFS服务,并且创建了一个目录,并挂载到CM节点172.31.13.38,该过程省略。

节点IP节点角色说明
172.31.11.232DataNodeNFS Server
172.31.13.38ClouderaManagerNFS Client
[root@ip-172-31-13-38 cloudera-scm-agent]# showmount -e ip-172-31-11-232 
Export list for ip-172-31-11-232:
/nfs_test 172.31.13.38
[root@ip-172-31-13-38 cloudera-scm-agent]# mount | grep nfs
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
172.31.11.232:/nfs_test on /nfs_test type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=172.31.13.38,local_lock=none,addr=172.31.11.232)

2.通过CM进入172.31.13.38的主机管理页面也能看到该挂载的nfs目录已经被CM监控到。

3.到172.31.11.232节点上停止NFS服务,模拟故障。同时为了快速的看到效果,直接重启172.31.13.38节点上的Agent服务。

[root@ip-172-31-11-232 ~]# systemctl stop nfs
[root@ip-172-31-13-38 ~]# systemctl restart cloudera-scm-agent

4.再次通过CM进入172.31.13.38的主机管理页面,发现已经看不到挂载的NFS目录。同时在运行状况测试栏也能发现一些未知状况。

5.查看172.31.13.38节点上的log,可以看到以下错误信息。

[10/Mar/2019 05:59:25 +0000] 4826 Monitor-HostMonitor throttling_logger ERROR    Child collection process still around. Skipping new collection. All nodev filesystems will have unknown usage until collection resumes. Current nodev filesystems: /dev/shm,/run,/sys/fs/cgroup,/run/user/0,/run/user/997,/run/cloudera-scm-agent/process,/nfs_test

3 问题解决

1.进入172.31.13.38节点的Agent配置文件目录,找到config.ini文件

[root@ip-172-31-13-38 ~]# cd /etc/cloudera-scm-agent

2.编辑config.ini文件,找到以下内容。

# The list of non-device (nodev) filesystem types which will be monitored.
monitored_nodev_filesystem_types=nfs,nfs4,tmpfs

3.编辑config.ini文件,将以上内容修改为如下,并保存退出。

# The list of non-device (nodev) filesystem types which will be monitored.
#monitored_nodev_filesystem_types=nfs,nfs4,tmpfs
monitored_nodev_filesystem_types=tmpfs

4.重启172.31.13.38节点上的Agent服务

[root@ip-172-31-13-38 ~]# systemctl restart cloudera-scm-agent

5.通过CM进入172.31.13.38的主机管理页面,发现已经没有未知的运行状况,同时文件系统也已经正常显示除nfs以外的其他目录。

异常恢复。本文因为只是简单模拟一下,并未在Host Monitor中发现相关异常,实际生产过程中,有可能是所有节点都挂载了NFS,然后NFS Server故障后,导致整个集群都不可用,可以参考本文的解决方法。记得需要修改所有节点的Agent相关配置,然后重启所有Agent服务。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值