安装CDH时因目录权限不足造成cloudera-scm-agent启动失败

输出错误信息如下:

查看日志就会发现:

ERROR    Error getting directory attributes for /opt/cloudera/parcels

说明是目录获取不到或者权限不正确,通过ls -la查看发现/opt/cloudera/parcels路径确实不是当前用户的权限。删除/opt/cloudera/parcels目录即可。但需要注意的是,/opt/cloudera/parcel-repo/需要备份,等agent重启之后需要继续拷贝到该目录。

启动之后,发现了下面的问题,/opt/cm-5.14.3/log/cloudera-scm-agent目录权限应该是不正确:

[26/Apr/2020 13:02:40 +0000] 18065 MainThread agent        INFO     Setting default socket timeout to 45
[26/Apr/2020 13:02:40 +0000] 18065 Monitor-HostMonitor network_interfaces INFO     NIC iface eth0 doesn't support ETHTOOL (95)
[26/Apr/2020 13:02:40 +0000] 18065 Monitor-HostMonitor throttling_logger ERROR    Error getting directory attributes for /opt/cm-5.14.3/log/cloudera-scm-agent
Traceback (most recent call last):
  File "/opt/cm-5.14.3/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.14.3-py2.7.egg/cmf/monitor/dir_monitor.py", line 90, in _get_directory_attributes
    name = pwd.getpwuid(uid)[0]
KeyError: 'getpwuid(): uid not found: 1106'

同样的操作,因为当前是root用户,直接授权给root即可:

sudo chmod -R root:root /opt/cm-5.14.3

点击数:95

发表评论