I installed HDP 2.6 power linux edition. All components are working well except ambari-metrics-monitor.
It seems can not build python psutil package. Error is;
"ImportError: No module named psutil 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 27, 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"
I tried to remove /usr/lib/python2.6/site-packages/resource_monitoring/psutil and rebuild psutil, but it fails due to "
ImportError: cannot import name archive_util" error.
mv psutil psutil_old
yum reinstall ambari-metrics-monitor
python setup.py build
Traceback (most recent call last):
File "setup.py", line 17, in <module>
from distutils.core import setup, Extension
File "/usr/lib64/python2.7/distutils/core.py", line 21, in <module>
from distutils.cmd import Command
File "/usr/lib64/python2.7/distutils/cmd.py", line 11, in <module>
from distutils import util, dir_util, file_util, archive_util, dep_util
ImportError: cannot import name archive_util
make: *** [build] Error 1
@Mustafa Kemal MAYUK I found a workaround to this issue. Turns out archive_util.py file was missing so I downloaded the python package from https://www.python.org/downloads/release/python-2712/ and copied the
sudo make install
Do this on all nodes
Finally restart ambari-metrics-monitor