You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by av...@apache.org on 2016/04/04 18:56:13 UTC
ambari git commit: AMBARI-15680 : METRICS_GRAFANA START failed with
401 Unauthorized Error (avijayan)
Repository: ambari
Updated Branches:
refs/heads/branch-2.2 cb67ce6ed -> 9a9cab5fb
AMBARI-15680 : METRICS_GRAFANA START failed with 401 Unauthorized Error (avijayan)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9a9cab5f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9a9cab5f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9a9cab5f
Branch: refs/heads/branch-2.2
Commit: 9a9cab5fb08c4af3969ff09a6d8e79644c54bfa8
Parents: cb67ce6
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Mon Apr 4 09:55:47 2016 -0700
Committer: Aravindan Vijayan <av...@hortonworks.com>
Committed: Mon Apr 4 09:55:47 2016 -0700
----------------------------------------------------------------------
.../0.1.0/package/scripts/metrics_grafana_util.py | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/9a9cab5f/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py
index 012bdcb..15c96dd 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py
@@ -118,6 +118,12 @@ def perform_grafana_post_call(url, payload, server):
response = conn.getresponse()
Logger.info("Http response: %s %s" % (response.status, response.reason))
+ if response.status == 401: #Intermittent error thrown from Grafana
+ if i < GRAFANA_CONNECT_TRIES - 1:
+ time.sleep(GRAFANA_CONNECT_TIMEOUT)
+ Logger.info("Connection to Grafana failed. Next retry in %s seconds."
+ % (GRAFANA_CONNECT_TIMEOUT))
+ continue
data = response.read()
Logger.info("Http data: %s" % data)
conn.close()