stderr: Traceback (most recent call last): File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 995, in restart self.status(env) File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/AMBARI_METRICS/package/scripts/metrics_monitor.py", line 57, in status check_service_status(env, name='monitor') File "/usr/lib/ambari-agent/lib/ambari_commons/os_family_impl.py", line 89, in thunk return fn(*args, **kwargs) File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/AMBARI_METRICS/package/scripts/status.py", line 43, in check_service_status check_process_status(status_params.monitor_pid_file) File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/check_process_status.py", line 43, in check_process_status raise ComponentIsNotRunning() ComponentIsNotRunning The above exception was the cause of the following exception: Traceback (most recent call last): File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/AMBARI_METRICS/package/scripts/metrics_monitor.py", line 78, in AmsMonitor().execute() File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 352, in execute method(env) File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 1006, in restart self.start(env, upgrade_type=upgrade_type) File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/AMBARI_METRICS/package/scripts/metrics_monitor.py", line 43, in start action = 'start' File "/usr/lib/ambari-agent/lib/ambari_commons/os_family_impl.py", line 89, in thunk return fn(*args, **kwargs) File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/AMBARI_METRICS/package/scripts/ams_service.py", line 109, in ams_service user=params.ams_user File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__ self.env.run() File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run self.run_action(resource, action) File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action provider_action() File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 263, in action_run returns=self.resource.returns) File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner result = function(command, **kwargs) File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns) File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper result = _call(command, **kwargs_copy) File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 314, in _call raise ExecutionFailed(err_msg, code, out, err) resource_management.core.exceptions.ExecutionFailed: Execution of '/usr/sbin/ambari-metrics-monitor --config /etc/ambari-metrics-monitor/conf start' returned 255. psutil build directory is not empty, continuing... 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 with PID : 20225 Output of PID check : ERROR: ambari-metrics-monitor start failed. For more details, see /dtf/components/run/ambari-metrics-collector/ambari-metrics-monitor.out: ==================== from metric_collector import MetricsCollector File "/usr/lib/python2.6/site-packages/resource_monitoring/core/metric_collector.py", line 23, in from host_info import HostInfo File "/usr/lib/python2.6/site-packages/resource_monitoring/core/host_info.py", line 25, in import psutil File "/usr/lib/python2.6/site-packages/resource_monitoring/psutil/build/lib.linux-x86_64-2.7/psutil/__init__.py", line 89, in import psutil._pslinux as _psplatform File "/usr/lib/python2.6/site-packages/resource_monitoring/psutil/build/lib.linux-x86_64-2.7/psutil/_pslinux.py", line 20, in from psutil import _common ImportError: cannot import name _common ==================== Monitor out at: /dtf/components/run/ambari-metrics-collector/ambari-metrics-monitor.out stdout: 2019-07-01 16:29:57,833 - Stack Feature Version Info: Cluster Stack=3.1, Command Stack=None, Command Version=3.1.0.0-78 -> 3.1.0.0-78 2019-07-01 16:29:57,853 - Using hadoop conf dir: /usr/hdp/3.1.0.0-78/hadoop/conf 2019-07-01 16:29:57,992 - Stack Feature Version Info: Cluster Stack=3.1, Command Stack=None, Command Version=3.1.0.0-78 -> 3.1.0.0-78 2019-07-01 16:29:57,998 - Using hadoop conf dir: /usr/hdp/3.1.0.0-78/hadoop/conf 2019-07-01 16:29:57,999 - Group['hdfs'] {} 2019-07-01 16:29:58,001 - Group['hadoop'] {} 2019-07-01 16:29:58,001 - Group['nifi'] {} 2019-07-01 16:29:58,001 - Group['users'] {} 2019-07-01 16:29:58,002 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None} 2019-07-01 16:29:58,003 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None} 2019-07-01 16:29:58,004 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop', 'users'], 'uid': None} 2019-07-01 16:29:58,005 - User['hdfs'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hdfs', 'hadoop'], 'uid': None} 2019-07-01 16:29:58,006 - User['nifi'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['nifi'], 'uid': None} 2019-07-01 16:29:58,006 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555} 2019-07-01 16:29:58,008 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa 0'] {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'} 2019-07-01 16:29:58,015 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa 0'] due to not_if 2019-07-01 16:29:58,016 - Group['hdfs'] {} 2019-07-01 16:29:58,016 - User['hdfs'] {'fetch_nonlocal_groups': True, 'groups': ['hdfs', 'hadoop', u'hdfs']} 2019-07-01 16:29:58,017 - FS Type: HDFS 2019-07-01 16:29:58,017 - Directory['/etc/hadoop'] {'mode': 0755} 2019-07-01 16:29:58,032 - File['/usr/hdp/3.1.0.0-78/hadoop/conf/hadoop-env.sh'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop'} 2019-07-01 16:29:58,033 - Directory['/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir'] {'owner': 'hdfs', 'group': 'hadoop', 'mode': 01777} 2019-07-01 16:29:58,052 - Execute[('setenforce', '0')] {'not_if': '(! which getenforce ) || (which getenforce && getenforce | grep -q Disabled)', 'sudo': True, 'only_if': 'test -f /selinux/enforce'} 2019-07-01 16:29:58,065 - Skipping Execute[('setenforce', '0')] due to only_if 2019-07-01 16:29:58,065 - Directory['/var/log/hadoop'] {'owner': 'root', 'create_parents': True, 'group': 'hadoop', 'mode': 0775, 'cd_access': 'a'} 2019-07-01 16:29:58,067 - Directory['/var/run/hadoop'] {'owner': 'root', 'create_parents': True, 'group': 'root', 'cd_access': 'a'} 2019-07-01 16:29:58,068 - Directory['/var/run/hadoop/hdfs'] {'owner': 'hdfs', 'cd_access': 'a'} 2019-07-01 16:29:58,068 - Directory['/tmp/hadoop-hdfs'] {'owner': 'hdfs', 'create_parents': True, 'cd_access': 'a'} 2019-07-01 16:29:58,072 - File['/usr/hdp/3.1.0.0-78/hadoop/conf/commons-logging.properties'] {'content': Template('commons-logging.properties.j2'), 'owner': 'hdfs'} 2019-07-01 16:29:58,074 - File['/usr/hdp/3.1.0.0-78/hadoop/conf/health_check'] {'content': Template('health_check.j2'), 'owner': 'hdfs'} 2019-07-01 16:29:58,078 - File['/usr/hdp/3.1.0.0-78/hadoop/conf/log4j.properties'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop', 'mode': 0644} 2019-07-01 16:29:58,089 - File['/usr/hdp/3.1.0.0-78/hadoop/conf/hadoop-metrics2.properties'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop'} 2019-07-01 16:29:58,090 - File['/usr/hdp/3.1.0.0-78/hadoop/conf/task-log4j.properties'] {'content': StaticFile('task-log4j.properties'), 'mode': 0755} 2019-07-01 16:29:58,091 - File['/usr/hdp/3.1.0.0-78/hadoop/conf/configuration.xsl'] {'owner': 'hdfs', 'group': 'hadoop'} 2019-07-01 16:29:58,095 - File['/etc/hadoop/conf/topology_mappings.data'] {'owner': 'hdfs', 'content': Template('topology_mappings.data.j2'), 'only_if': 'test -d /etc/hadoop/conf', 'group': 'hadoop', 'mode': 0644} 2019-07-01 16:29:58,100 - File['/etc/hadoop/conf/topology_script.py'] {'content': StaticFile('topology_script.py'), 'only_if': 'test -d /etc/hadoop/conf', 'mode': 0755} 2019-07-01 16:29:58,104 - Skipping unlimited key JCE policy check and setup since the Java VM is not managed by Ambari 2019-07-01 16:29:58,112 - Skipping stack-select on AMBARI_METRICS because it does not exist in the stack-select package structure. 2019-07-01 16:29:58,137 - Skipping stack-select on AMBARI_METRICS because it does not exist in the stack-select package structure. 2019-07-01 16:29:58,306 - Using hadoop conf dir: /usr/hdp/3.1.0.0-78/hadoop/conf 2019-07-01 16:29:58,308 - checked_call['hostid'] {} 2019-07-01 16:29:58,312 - checked_call returned (0, 'f40a3408') 2019-07-01 16:29:58,314 - Execute['/usr/sbin/ambari-metrics-monitor --config /etc/ambari-metrics-monitor/conf stop'] {'user': 'ams'} 2019-07-01 16:30:08,465 - Pid file /dtf/components/run/ambari-metrics-monitor/ambari-metrics-monitor.pid is empty or does not exist 2019-07-01 16:30:08,467 - Directory['/etc/ambari-metrics-monitor/conf'] {'owner': 'ams', 'group': 'hadoop', 'create_parents': True} 2019-07-01 16:30:08,468 - Directory['/dtf/components/run/ambari-metrics-collector'] {'owner': 'ams', 'group': 'hadoop', 'create_parents': True, 'mode': 0755} 2019-07-01 16:30:08,469 - Execute['ambari-sudo.sh chown -R ams:hadoop /dtf/components/run/ambari-metrics-collector'] {} 2019-07-01 16:30:08,474 - Directory['/dtf/components/run/ambari-metrics-monitor'] {'owner': 'ams', 'group': 'hadoop', 'create_parents': True, 'mode': 0755, 'cd_access': 'a'} 2019-07-01 16:30:08,475 - Directory['/usr/lib/python2.6/site-packages/resource_monitoring/psutil/build'] {'owner': 'ams', 'group': 'hadoop', 'create_parents': True, 'cd_access': 'a'} 2019-07-01 16:30:08,475 - Execute['ambari-sudo.sh chown -R ams:hadoop /usr/lib/python2.6/site-packages/resource_monitoring'] {} 2019-07-01 16:30:08,481 - TemplateConfig['/etc/ambari-metrics-monitor/conf/metric_monitor.ini'] {'owner': 'ams', 'template_tag': None, 'group': 'hadoop'} 2019-07-01 16:30:08,488 - File['/etc/ambari-metrics-monitor/conf/metric_monitor.ini'] {'content': Template('metric_monitor.ini.j2'), 'owner': 'ams', 'group': 'hadoop', 'mode': None} 2019-07-01 16:30:08,489 - TemplateConfig['/etc/ambari-metrics-monitor/conf/metric_groups.conf'] {'owner': 'ams', 'template_tag': None, 'group': 'hadoop'} 2019-07-01 16:30:08,490 - File['/etc/ambari-metrics-monitor/conf/metric_groups.conf'] {'content': Template('metric_groups.conf.j2'), 'owner': 'ams', 'group': 'hadoop', 'mode': None} 2019-07-01 16:30:08,496 - File['/etc/ambari-metrics-monitor/conf/ams-env.sh'] {'content': InlineTemplate(...), 'owner': 'ams'} 2019-07-01 16:30:08,501 - Directory['/usr/lib/ambari-logsearch-logfeeder/conf'] {'create_parents': True, 'mode': 0755, 'cd_access': 'a'} 2019-07-01 16:30:08,502 - Generate Log Feeder config file: /usr/lib/ambari-logsearch-logfeeder/conf/input.config-ambari-metrics.json 2019-07-01 16:30:08,502 - File['/usr/lib/ambari-logsearch-logfeeder/conf/input.config-ambari-metrics.json'] {'content': Template('input.config-ambari-metrics.json.j2'), 'mode': 0644} 2019-07-01 16:30:08,503 - Execute['/usr/sbin/ambari-metrics-monitor --config /etc/ambari-metrics-monitor/conf start'] {'user': 'ams'} 2019-07-01 16:30:10,636 - Execute['find /dtf/components/run/ambari-metrics-collector -maxdepth 1 -type f -name '*' -exec echo '==> {} <==' \; -exec tail -n 40 {} \;'] {'logoutput': True, 'ignore_failures': True, 'user': 'ams'} ==> /dtf/components/run/ambari-metrics-collector/ambari-metrics-monitor.out <== from metric_collector import MetricsCollector File "/usr/lib/python2.6/site-packages/resource_monitoring/core/metric_collector.py", line 23, in from host_info import HostInfo File "/usr/lib/python2.6/site-packages/resource_monitoring/core/host_info.py", line 25, in import psutil File "/usr/lib/python2.6/site-packages/resource_monitoring/psutil/build/lib.linux-x86_64-2.7/psutil/__init__.py", line 89, in import psutil._pslinux as _psplatform File "/usr/lib/python2.6/site-packages/resource_monitoring/psutil/build/lib.linux-x86_64-2.7/psutil/_pslinux.py", line 20, in from psutil import _common ImportError: cannot import name _common 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 28, in from core.controller import Controller File "/usr/lib/python2.6/site-packages/resource_monitoring/core/controller.py", line 27, in from metric_collector import MetricsCollector File "/usr/lib/python2.6/site-packages/resource_monitoring/core/metric_collector.py", line 23, in from host_info import HostInfo File "/usr/lib/python2.6/site-packages/resource_monitoring/core/host_info.py", line 25, in import psutil File "/usr/lib/python2.6/site-packages/resource_monitoring/psutil/build/lib.linux-x86_64-2.7/psutil/__init__.py", line 89, in import psutil._pslinux as _psplatform File "/usr/lib/python2.6/site-packages/resource_monitoring/psutil/build/lib.linux-x86_64-2.7/psutil/_pslinux.py", line 20, in from psutil import _common ImportError: cannot import name _common 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 28, in from core.controller import Controller File "/usr/lib/python2.6/site-packages/resource_monitoring/core/controller.py", line 27, in from metric_collector import MetricsCollector File "/usr/lib/python2.6/site-packages/resource_monitoring/core/metric_collector.py", line 23, in from host_info import HostInfo File "/usr/lib/python2.6/site-packages/resource_monitoring/core/host_info.py", line 25, in import psutil File "/usr/lib/python2.6/site-packages/resource_monitoring/psutil/build/lib.linux-x86_64-2.7/psutil/__init__.py", line 89, in import psutil._pslinux as _psplatform File "/usr/lib/python2.6/site-packages/resource_monitoring/psutil/build/lib.linux-x86_64-2.7/psutil/_pslinux.py", line 20, in from psutil import _common ImportError: cannot import name _common ==> /dtf/components/run/ambari-metrics-collector/ambari-metrics-collector.pid <== 19185 2019-07-01 16:30:10,696 - Skipping stack-select on AMBARI_METRICS because it does not exist in the stack-select package structure. Command failed after 1 tries