Created 10-11-2017 07:18 AM
Hello,
I am using Ambari version 2.2.2.0 and HDP-2.4.0.0-169. To install grafana in existing Ambari version, I have followed below link and it has installed properly as given in this link but grafana is not starting.
https://markobigdata.com/2016/06/17/ambari-upgrade-2-upgrade-ambari-metrics-install-grafana/
stderr: /var/lib/ambari-agent/data/errors-7571.txtTraceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py", line 64, in <module> AmsGrafana().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute method(env) File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py", line 46, in start create_ams_datasource() File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py", line 174, in create_ams_datasource response = perform_grafana_get_call(GRAFANA_DATASOURCE_URL, server) File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py", line 67, in perform_grafana_get_call raise Fail("Ambari Metrics Grafana update failed due to: %s" % str(ex))
resource_management.core.exceptions.Fail: Ambari Metrics Grafana update failed due to: [Errno 111] Connection refused
stdout: /var/lib/ambari-agent/data/output-7571.txt2017-10-11 05:20:11,193 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf 2017-10-11 05:20:11,354 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf 2017-10-11 05:20:11,355 - Group['spark'] {} 2017-10-11 05:20:11,357 - Group['hadoop'] {} 2017-10-11 05:20:11,357 - Group['users'] {} 2017-10-11 05:20:11,357 - Group['knox'] {} 2017-10-11 05:20:11,358 - User['storm'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2017-10-11 05:20:11,358 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2017-10-11 05:20:11,359 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2017-10-11 05:20:11,359 - User['tez'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'users']} 2017-10-11 05:20:11,360 - User['spark'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2017-10-11 05:20:11,361 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'users']} 2017-10-11 05:20:11,361 - User['flume'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2017-10-11 05:20:11,362 - User['kafka'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2017-10-11 05:20:11,362 - User['hdfs'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2017-10-11 05:20:11,363 - User['sqoop'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2017-10-11 05:20:11,363 - User['yarn'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2017-10-11 05:20:11,364 - User['mapred'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2017-10-11 05:20:11,365 - User['hbase'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2017-10-11 05:20:11,365 - User['knox'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2017-10-11 05:20:11,366 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555} 2017-10-11 05:20:11,368 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'} 2017-10-11 05:20:11,375 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] due to not_if 2017-10-11 05:20:11,376 - Directory['/tmp/hbase-hbase'] {'owner': 'hbase', 'recursive': True, 'mode': 0775, 'cd_access': 'a'} 2017-10-11 05:20:11,377 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555} 2017-10-11 05:20:11,378 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase'] {'not_if': '(test $(id -u hbase) -gt 1000) || (false)'} 2017-10-11 05:20:11,385 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase'] due to not_if 2017-10-11 05:20:11,385 - Group['hdfs'] {} 2017-10-11 05:20:11,386 - Group['hbase'] {} 2017-10-11 05:20:11,386 - User['hdfs'] {'fetch_nonlocal_groups': True, 'groups': [u'hadoop', u'hdfs', u'hbase']} 2017-10-11 05:20:11,387 - FS Type: 2017-10-11 05:20:11,387 - Directory['/etc/hadoop'] {'mode': 0755} 2017-10-11 05:20:11,405 - File['/usr/hdp/current/hadoop-client/conf/hadoop-env.sh'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop'} 2017-10-11 05:20:11,406 - Directory['/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir'] {'owner': 'hdfs', 'group': 'hadoop', 'mode': 0777} 2017-10-11 05:20:11,418 - Execute[('setenforce', '0')] {'not_if': '(! which getenforce ) || (which getenforce && getenforce | grep -q Disabled)', 'sudo': True, 'only_if': 'test -f /selinux/enforce'} 2017-10-11 05:20:11,425 - Skipping Execute[('setenforce', '0')] due to not_if 2017-10-11 05:20:11,426 - Directory['/var/log/hadoop'] {'owner': 'root', 'mode': 0775, 'group': 'hadoop', 'recursive': True, 'cd_access': 'a'} 2017-10-11 05:20:11,431 - Directory['/var/run/hadoop'] {'owner': 'root', 'group': 'root', 'recursive': True, 'cd_access': 'a'} 2017-10-11 05:20:11,431 - Directory['/tmp/hadoop-hdfs'] {'owner': 'hdfs', 'recursive': True, 'cd_access': 'a'} 2017-10-11 05:20:11,437 - File['/usr/hdp/current/hadoop-client/conf/commons-logging.properties'] {'content': Template('commons-logging.properties.j2'), 'owner': 'hdfs'} 2017-10-11 05:20:11,439 - File['/usr/hdp/current/hadoop-client/conf/health_check'] {'content': Template('health_check.j2'), 'owner': 'hdfs'} 2017-10-11 05:20:11,440 - File['/usr/hdp/current/hadoop-client/conf/log4j.properties'] {'content': ..., 'owner': 'hdfs', 'group': 'hadoop', 'mode': 0644} 2017-10-11 05:20:11,454 - File['/usr/hdp/current/hadoop-client/conf/hadoop-metrics2.properties'] {'content': Template('hadoop-metrics2.properties.j2'), 'owner': 'hdfs', 'group': 'hadoop'} 2017-10-11 05:20:11,455 - File['/usr/hdp/current/hadoop-client/conf/task-log4j.properties'] {'content': StaticFile('task-log4j.properties'), 'mode': 0755} 2017-10-11 05:20:11,460 - File['/etc/hadoop/conf/topology_mappings.data'] {'owner': 'hdfs', 'content': Template('topology_mappings.data.j2'), 'only_if': 'test -d /etc/hadoop/conf', 'group': 'hadoop'} 2017-10-11 05:20:11,465 - File['/etc/hadoop/conf/topology_script.py'] {'content': StaticFile('topology_script.py'), 'only_if': 'test -d /etc/hadoop/conf', 'mode': 0755} 2017-10-11 05:20:11,671 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf 2017-10-11 05:20:11,686 - Directory['/etc/ambari-metrics-grafana/conf'] {'owner': 'ams', 'group': 'hadoop', 'recursive': True, 'mode': 0755} 2017-10-11 05:20:11,725 - Directory['/var/log/ambari-metrics-grafana'] {'owner': 'ams', 'group': 'hadoop', 'recursive': True, 'mode': 0755} 2017-10-11 05:20:11,739 - Directory['/var/lib/ambari-metrics-grafana'] {'owner': 'ams', 'group': 'hadoop', 'recursive': True, 'mode': 0755} 2017-10-11 05:20:11,786 - Directory['/var/run/ambari-metrics-grafana'] {'owner': 'ams', 'group': 'hadoop', 'recursive': True, 'mode': 0755} 2017-10-11 05:20:11,805 - File['/etc/ambari-metrics-grafana/conf/ams-grafana-env.sh'] {'content': InlineTemplate(...), 'owner': 'ams', 'group': 'hadoop'} 2017-10-11 05:20:11,816 - File['/etc/ambari-metrics-grafana/conf/ams-grafana.ini'] {'content': InlineTemplate(...), 'owner': 'ams', 'group': 'hadoop', 'mode': 0600} 2017-10-11 05:20:11,818 - Execute[('chown', '-R', u'ams', '/etc/ambari-metrics-grafana/conf')] {'sudo': True} 2017-10-11 05:20:11,829 - Execute[('chown', '-R', u'ams', u'/var/log/ambari-metrics-grafana')] {'sudo': True} 2017-10-11 05:20:11,839 - Execute[('chown', '-R', u'ams', u'/var/lib/ambari-metrics-grafana')] {'sudo': True} 2017-10-11 05:20:11,849 - Execute[('chown', '-R', u'ams', u'/var/run/ambari-metrics-grafana')] {'sudo': True} 2017-10-11 05:20:11,858 - Execute['/usr/sbin/ambari-metrics-grafana start'] {'user': 'ams'} 2017-10-11 05:20:12,039 - Checking if AMS Grafana datasource already exists 2017-10-11 05:20:12,040 - Connecting (GET) to ambarihdp.mstorm.com:3000/api/datasources 2017-10-11 05:20:22,087 - Connection to Grafana failed. Next retry in 10 seconds. 2017-10-11 05:20:22,087 - Connecting (GET) to ambarihdp.mstorm.com:3000/api/datasources 2017-10-11 05:20:32,100 - Connection to Grafana failed. Next retry in 10 seconds. 2017-10-11 05:20:32,100 - Connecting (GET) to ambarihdp.mstorm.com:3000/api/datasources 2017-10-11 05:20:42,104 - Connection to Grafana failed. Next retry in 10 seconds. 2017-10-11 05:20:42,104 - Connecting (GET) to ambarihdp.mstorm.com:3000/api/datasources 2017-10-11 05:20:52,108 - Connection to Grafana failed. Next retry in 10 seconds.
2017-10-11 05:20:52,108 - Connecting (GET) to ambarihdp.mstorm.com:3000/api/datasources
I have also checked port, no other services are using it.
#netstat -tulpn | grep 3000
Also checked permissions for below files and directories that is also correct(ams:hadoop)
/etc/ambari-metrics-grafana/conf
/var/log/ambari-metrics-grafana
/var/lib/ambari-metrics-grafana
/var/run/ambari-metrics-grafana
Also checked /var/log/ambari-metrics-grafana directory, no logs are present.
Can you specify, if anything missing from my side and thios issue has occured?
Created 10-14-2017 04:08 AM
Could reinstall it and give it a try?
https://community.hortonworks.com/content/supportkb/49509/how-to-re-install-grafana.html
Do not stop the Ambari Metrics service when you are doing these.