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,如需转载请自行联系原作者

相关文章
|
3月前
|
分布式计算 Java Linux
centos7通过Ambari2.74部署Hadoop
centos7通过Ambari2.74部署Hadoop
|
6月前
|
SQL 分布式计算 Hadoop
Hadoop学习笔记(HDP)-Part.08 部署Ambari集群
01 关于HDP 02 核心组件原理 03 资源规划 04 基础环境配置 05 Yum源配置 06 安装OracleJDK 07 安装MySQL 08 部署Ambari集群 09 安装OpenLDAP 10 创建集群 11 安装Kerberos 12 安装HDFS 13 安装Ranger 14 安装YARN+MR 15 安装HIVE 16 安装HBase 17 安装Spark2 18 安装Flink 19 安装Kafka 20 安装Flume
232 0
Hadoop学习笔记(HDP)-Part.08 部署Ambari集群
|
6月前
|
分布式计算 Java 网络安全
Ambari【部署 01】最新版本ambari-2.7.7下载编译打包安装使用(踩坑实录)
Ambari【部署 01】最新版本ambari-2.7.7下载编译打包安装使用(踩坑实录)
696 0
|
Java 关系型数据库 MySQL
suse部署ambari
ambari
188 0
|
SQL 分布式计算 Ubuntu
ambari部署apache_hadoop
ambari部署apache_hadoop
788 0
|
流计算
Ambari部署Flink
Ambari部署Flink
1157 0
Ambari部署Flink
|
分布式数据库 Hbase
Ambari部署HBase
Ambari部署HBase
157 0
Ambari部署HBase
|
SQL 关系型数据库 MySQL
Ambari部署Hive
Ambari部署Hive
169 0
Ambari部署Hive
|
消息中间件 Kafka
Ambari部署Kafka
Ambari部署Kafka
205 0
Ambari部署Kafka
Ambari部署Solr
Ambari部署Solr
131 0
Ambari部署Solr
下一篇
无影云桌面