安装Cloudera管理代理时出现“No module named cmf.alternatives”错误

1 投票
1 回答
1375 浏览
提问于 2025-04-28 17:45

我第一次在安装Cloudera集群。

在集群安装页面上,显示了一些信息,比如:

Installation failed. Failed to receive heartbeat from agent.

     Ensure that the host's hostname is configured properly.

     Ensure that port 7182 is accessible on the Cloudera Manager server (check firewall rules).

     Ensure that ports 9000 and 9001 are free on the host being added.

     Check agent logs in /var/log/cloudera-scm-agent/ on the host being added (some of the logs can be found in the installation details).

然后在日志文件中,我发现:

[21/Oct/2014 05:29:54 +0000] 9155 MainThread agent ERROR Failed to connect to previous supervisor.
.....

SystemExit: 2

在/var/log/cloudera-scm-agent/cloudera-scm-agent.out文件中,我发现:

[21/Oct/2014 11:29:15 +0000] 1658 MainThread agent        INFO     Logging to /var/log/cloudera-scm-agent/cloudera-scm-agent.log
Error: could not find config file /var/run/cloudera-scm-agent/supervisor/supervisord.conf
For help, use /usr/lib64/cmf/agent/src/cmf/agent.py -h

....

Session terminated, killing shell... ...killed.

我运行了: /usr/lib64/cmf/agent/src/cmf/agent.py -h

系统告诉我:

/usr/lib64/cmf/agent/src/cmf/agent.py:24: DeprecationWarning: the sha module is deprecated; use the hashlib module instead

import sha

Traceback (most recent call last):

File "/usr/lib64/cmf/agent/src/cmf/agent.py", line 40, in <module>

    import cmf.alternatives

ImportError: No module named cmf.alternatives

我的环境是: centos 6.5,Python 2.6.6,Cloudera管理服务器是5.2

所以,我想知道需要安装哪个模块来修复这个错误。

或者我该如何配置以在安装中使用cmf模块?

还有哪里可以找到关于Cloudera的Python文档?
非常感谢。

暂无标签

1 个回答

1

你好,你可以简单地按照说明操作,把 sha 替换成 hashlib 然后再试一次。

...
# import sha
import hashlib

# and use hashlib.sha1 instead of sha.sha in the following code
hashlib.sha1(...)
...

撰写回答