Ambari HDP 2.4添加主机指标监视器无法安装

时间:2017-03-01 08:14:13

标签: hadoop hortonworks-data-platform ambari

我试图在我的Ambari群集中添加更多主机,运行HDP 2.4并且Metrics Monitor似乎没有正确安装,所有其他服务都正常运行。

以下是我尝试在其中一个新主机上启动Metrics Monitor时获得的输出。

255. Building psutil...
Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    from setuptools import setup, Extension
  File "/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 12, in <module>
    import setuptools.version
  File "/usr/lib/python2.7/site-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/usr/lib/python2.7/site-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)
Verifying Python version compatibility...
Using python  /usr/bin/python2.7
Checking for previously running Metric Monitor...
Starting ambari-metrics-monitor
Verifying ambari-metrics-monitor process status...
ERROR: ambari-metrics-monitor start failed. For more details, see /var/log/ambari-metrics-monitor/ambari-metrics-monitor.out:
====================
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/resource_monitoring/main.py", line 27, in <module>
    from core.controller import Controller
  File "/usr/lib/python2.6/site-packages/resource_monitoring/core/controller.py", line 28, in <module>
    from metric_collector import MetricsCollector
  File "/usr/lib/python2.6/site-packages/resource_monitoring/core/metric_collector.py", line 23, in <module>
    from host_info import HostInfo
  File "/usr/lib/python2.6/site-packages/resource_monitoring/core/host_info.py", line 22, in <module>
    import psutil
ImportError: No module named psutil
====================
Monitor out at: /var/log/ambari-metrics-monitor/ambari-metrics-monitor.out

这是/var/log/ambari-metrics-monitor/ambari-metrics-monitor.out

的输出
psutil binaries need to be built by running, psutil/build.py manually or by running a, mvn clean package, command.
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/resource_monitoring/main.py", line 27, in <module>
    from core.controller import Controller
  File "/usr/lib/python2.6/site-packages/resource_monitoring/core/controller.py", line 28, in <module>
    from metric_collector import MetricsCollector
  File "/usr/lib/python2.6/site-packages/resource_monitoring/core/metric_collector.py", line 23, in <module>
    from host_info import HostInfo
  File "/usr/lib/python2.6/site-packages/resource_monitoring/core/host_info.py", line 22, in <module>
    import psutil
ImportError: No module named psutil

我尝试进入该目录并运行sudo python psutil/build.py,并运行sudo make。两者都不起作用。

任何想法都会很棒!

1 个答案:

答案 0 :(得分:0)

这是你的python环境的问题,它以某种方式被破坏(最有可能使用sudo pip install <package>,使用sudo和pip一起有时会导致这个问题)。有关如何在此SO question上解决此问题的详细信息。修复python问题后,您应该可以通过Ambari重试主机添加。