when i click on grafana UI then it will take me to the a different page and there its giving
<hostname> sent an invalid response.
Can you please try the following to see if it fixes your issue?
1. Edit /etc/ambari-server/conf/ambari.properties to set the empty values:
2. Restart ambari server
3. Clear the browsers cache (or for testing open the browser in "Incognito mode") then access the grafana UI. Please have a look at the HSTS setting of browsers : http://classically.me/blogs/how-clear-hsts-settings-major-browsers
# Protocol (http or https)
;protocol = http
protocol = http
# The ip address to bind to, empty will bind to all interfaces
# The http port to use
;http_port = 3000 http_port = 3000
# The public facing domain name used to access grafana from a browser
;domain = localhost
Are you facing this issue with some specific browser like "Google Chrome" ? Or have you tried with other browsers as well? Sometimes this kind of issue might happen due to browser setting as well like:
I will check why is it happening .. at my lab with similar setup.
In the mean time as a quick workaround you might want to setup HTTPs for Grafana which is quite easy.