Support Questions
Find answers, ask questions, and share your expertise

ambari metrics monitor not starting on HDP 2.6 power environment

Rising Star

Hello,

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.

cd /usr/lib/python2.6/site-packages/resource_monitoring

mv psutil psutil_old

yum reinstall ambari-metrics-monitor

cd psutil

make install

....

...

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

1 REPLY 1

Re: ambari metrics monitor not starting on HDP 2.6 power environment

New Contributor

@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

Python-2.7.12/Lib/distutils/archive_util.pyfile to

/usr/lib/python2.7/distutils/

And then

cd /usr/lib/python2.6/site-packages/resource_monitoring/psutil

sudo make install

Do this on all nodes

Finally restart ambari-metrics-monitor