Support Questions
Find answers, ask questions, and share your expertise

error while adding grafana

Rising Star

hi,

i am trying to add grafana using below command

curl -u admin:admin -H "X-Requested-By:ambari" -i -X POST 

http://ambari.server:8080/api/v1/clusters/cluster.name/services/AMBARI_METRICS/components/METRICS_GRAFANA

i have added the required cluster name and ambari.server but its giving error as

HTTP/1.1 403 Forwarding Loop Detected Server: awarrenhttp/5.0.0.2.6 Content-Type: text/html Connection: close <html> <head> <title> Internal Error </title> </head> <body> <hr> <h1> ERROR </h1> <h2> Forwarding loop detected. <BR> <BR> Reason: Source and Destination are same </h2> </body> </html>

please help.

Note : i am upgrading ambari from 2.1 to 2.4 and have done necessary steps till ambari metrics from the hortonworks doc.

thanks,

RIshit Shah

5 REPLIES 5

Re: error while adding grafana

@Rishit shah

After upgrading ambari from 2.1 (which does not have grafana) to Ambari 2.4 have you performed the Post Upgrade steps.

Like upgrading the "ambari-metrics-collector", "ambari-metrics-assembly", "ambari-metrics-monitor", "ambari-metrics-hadoop-sink" separately. Also installing "ambari-metrics-grafana" packages via yum.

yum upgrade ambari-metrics-monitor ambari-metrics-hadoop-sink -y                     (All Hosts)
yum info ambari-metrics-grafana            (Only on Grafana Host)     
yum upgrade ambari-metrics-grafana -y       (Only on Grafana Host) 
yum upgrade ambari-metrics-collector  -y    (Only On Metrics Collector Host)

http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.0.0/bk_ambari-upgrade/content/upgrade_ambari_met...

- Also please validate the following command is giving the same RPM version information from all the hosts where you have agents running:

rpm -qa | grep ambari-metrics

.

Re: error while adding grafana

@Rishit shah

Additionally we see that you are getting "HTTP/1.1 403 Forwarding Loop Detected Server" response back can you please let us know the following:

1. If you are using any proxy server or Squid in front of ambari?

2. If you are running your ambari host inside some cloud environment like EC2 the you may want to lookup at the "iptables" settings as described in : http://serverfault.com/questions/506922/preventing-squid-forwarding-loop-with-iptables

<code>iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8080 -j REDIRECT --to-port 3128

Re: error while adding grafana

Rising Star

Hi @jss,

as we are adding grafana for first time, do we need to run following command

yum upgrade ambari-metrics-grafana -y ?

rest all commands are run properly.

regarding proxy server i will check but we are not using Squid for sure or EC2 as well.

thanks,

Rishit Shah

Re: error while adding grafana

Rising Star

hi @jss

we are not using any proxy.

thanks,

RIshit shah

Re: error while adding grafana

@Rishit shah

The error response (HTTP response) that you are getting is not being sent from Ambari. Ambari does not send that kind of HTTP Response.

If you want to double check if the issue is related to Grafana installation or not then you can simply run the following curl command and i guess you should be able to see the same Http response "403 Forwarding Loop Detected Server"

What output do you see for the following curl ? (with your "ambari.server" and "cluster.name"

curl -u admin:admin -H "X-Requested-By:ambari" -i -X GET http://ambari.server:8080/api/v1/clusters/cluster.name

- Also are you able to make any other POST request to your ambari ? (Not specific to grafana) or are you getting the same HTTP response?

.