问题
I have setup Ambari-2.7.5 with below services:
- HDFS
- YARN
- MAPREDUCE2
- HBASE
- ZOOKEEPER
- INFRA SOLR
- AMBARI METRICS
- ATLAS
- KAFKA
- KNOX
- LOGSEARCH
All the services are in green state except Ambari Metrics. I have build ambari-metrics-collector rpm using github.com/apache/ambari-metrics. while starting ambari-metrics the process get stuck giving below error
Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/AMBARI_METRICS/package/scripts/metrics_collector.py", line 90, in <module>
AmsCollector().execute()
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 355, in execute
self.execute_prefix_function(self.command_name, 'post', env)
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 386, in execute_prefix_function
method(env)
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 428, in post_start
raise Fail("Pid file {0} doesn't exist after starting of the component.".format(pid_file))
resource_management.core.exceptions.Fail: Pid file /var/run/ambari-metrics-collector//hbase-ams-master.pid doesn't exist after starting of the component.
回答1:
@RohitSharma You should be able to build the correct Ambari Metric RPMS during your ambari 2.7.5 build.
On the Install Guide for Ambari 2.7.5 are these steps:
pushd ambari-metrics
mvn versions:set -DnewVersion=2.7.5.0.0
popd
Next on the Ambari Development page, you should find the following details:
The rpms you need are:
ambari-metrics-2.7.5.0-0.noarch.rpm
ambari-metrics-collector-2.7.5.0-0.x86_64.rpm
ambari-metrics-grafana-2.7.5.0-0.x86_64.rpm
ambari-metrics-hadoop-sink-2.7.5.0-0.x86_64.rpm
ambari-metrics-monitor-2.7.5.0-0.x86_64.rpm
来源:https://stackoverflow.com/questions/62265082/ambari-metrics-collector-service-not-starting