Ambari部署时问题之Ambari Metrics无法启动

简介:

  首先,我的问题是如下:

 

 

复制代码
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py", line 165, in <module>
    AMSServiceCheck().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
    method(env)
  File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk
    return fn(*args, **kwargs)
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py", line 160, in service_check
    raise Fail("Values %s and %s were not found in the response." % (random_value1, current_time))
resource_management.core.exceptions.Fail: Values 0.32072445008 and 1490951249000 were not found in the response.
复制代码

 

 

 

 

 

 

 

 

   我这里采取的是先删除,再添加服务的方式。

Ambari里如何删除某指定的服务(图文详解)

 

 

 

 

解决办法

https://community.hortonworks.com/questions/15818/ambari-metrics-collector-now-starting.html

I could finally solve it by combining some of the steps mentioned above.

I first checked what is the value of `zookeeper.znode.parent` in HBase. I tried setting that same value in Ambari, but that did not work because some of the metrics processes were already running on that machine. So, i had to `ps -ef | grep metrics` and kill all of them as they were caching the `/hbase` value.

Watch the ambari metrics collector logs ( /var/log/ambari-metrics-collector/ambari-metrics-collector.log) while you do the below steps

 

 

 

其实,说白了,以下就是如何删除Ambari中已有的服务!

 

 

 

步骤

  Steps:0.

           tail -f /var/log/ambari-metrics-collector/ambari-metrics-collector.log  (这一也可以跳过,说白了就是查看对应的ambari-metrics-collector的日志而已)

       tail -f /var/log/ambari-metrics-collector/ambari-metrics-monitor.log  (这一也可以跳过,说白了就是查看对应的ambari-metrics-monitor的日志而已)

 

 

   Steps:1. Stop Ambari Metrics

   注意: 若是这步,关不掉Ambari  Metrics没事,去步骤三吧!

 

 

  Steps 2:. Kill all the metrics processes

 

ambari-metrics-monitor status
ambari-metrics-collector status

 

 

ambari-metrics-monitor stop
ambari-metrics-collector stop
kill -9 26554 
kill -9 46277

 

 

 

 

 

Steps:3 停止服务

 

curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo": {"context":"Stop Service"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' http://192.168.80.144:8080/api/v1/clusters/hdpCluster/services/AMBARI_METRICS

 

注意:

192.168.80.144是我这台机器ambari01(即搭建了ambari)的ip,你注意改为你自己的!

hdpCluster是我集群的名字,你注意改为你自己的!

AMBARI_METRICS这里是停止该服务并要从ambari里删除它。

 

 

 

Steps:4 删除服务(快速立即执行)

curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://192.168.80.144:8080/api/v1/clusters/hdpCluster/services/AMBARI_METRICS

 

注意:

192.168.80.144是我这台机器ambari01(即搭建了ambari)的ip,你注意改为你自己的!

hdpCluster是我集群的名字,你注意改为你自己的!

AMBARI_METRICS这里是停止该服务并要从ambari里删除它。

 

 

Steps:4   Refresh Ambari UI

 

 

 

 

Steps:5  Add Service

 

 

 

 

Steps:6 . Select Ambari Metrics

 

 

 

 

 

 

 

 

 

7. In the configuration screen, make sure to set the value of `zookeeper.znode.parent` to what is configured in the HBase service. By default in Ambari Metrics it is set to empty value.

 

 

 

 

8. Deploy

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 



本文转自大数据躺过的坑博客园博客,原文链接:http://www.cnblogs.com/zlslch/p/6653379.html,如需转载请自行联系原作者

相关文章
|
Hadoop
使用ambari快速部署Hadoop集群
Ambari 自身也是一个分布式架构的软件,主要由两部分组成:Ambari Server 和 Ambari Agent。我们可以通过 Ambari Server 通知 Ambari Agent 安装对应的软件;甚至连Ambari Agent我们都可以在Web界面上来进行安装和部署。
3340 0
使用ambari快速部署Hadoop集群
|
6月前
|
存储 运维 Kubernetes
kubesphere安装部署附带Metrics server的安装
kubesphere安装部署附带Metrics server的安装
62 0
|
关系型数据库 MySQL Java
安装Ambari和HDP
安装Ambari和HDP
277 1
|
存储 运维 Kubernetes
kubesphere安装部署附带Metrics server的安装(一)
kubesphere安装部署附带Metrics server的安装
582 0
|
存储 Prometheus Kubernetes
kubesphere安装部署附带Metrics server的安装(二)
kubesphere安装部署附带Metrics server的安装
409 0
|
流计算
Ambari部署Storm
Ambari部署Storm
126 0
Ambari部署Storm
Ambari部署Solr
Ambari部署Solr
131 0
Ambari部署Solr
|
SQL 分布式计算 安全
Ambari和ClouderaManager对比
  好程序员大数据培训分享之Ambari和ClouderaManager对比,1 、什么是CDH,Ambari?   Apache Ambari是一种基于Web的工具,支持Apache Hadoop集群的供应、管理和监控。
3620 0
Ambari和ClouderaManager对比
|
分布式计算 关系型数据库 Java
Ambari搭建
Ambari搭建和使用
2182 0