[ 
https://issues.apache.org/jira/browse/AMBARI-18113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15496361#comment-15496361
 ] 

Masahiro Tanaka commented on AMBARI-18113:
------------------------------------------

[~avijayan] I forgot to change the status of this JIRA, I couldn't reproduce 
this error, maybe I missed some configuration.
Thanks for reminding me!

> Installing ambari-metrics-grafana fails due to lack of conf directory
> ---------------------------------------------------------------------
>
>                 Key: AMBARI-18113
>                 URL: https://issues.apache.org/jira/browse/AMBARI-18113
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-metrics
>    Affects Versions: trunk
>         Environment: Ambari trunk, Centos 6.7
>            Reporter: Masahiro Tanaka
>            Assignee: Masahiro Tanaka
>             Fix For: 2.5.0
>
>         Attachments: AMBARI-18113.1.patch, AMBARI-18113.patch
>
>
> When installing Ambari Metrics, I got an error:
> Stderr
> {code}
> Traceback (most recent call last):
>   File 
> "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py",
>  line 67, in <module>
>     AmsGrafana().execute()
>   File 
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
>  line 280, in execute
>     method(env)
>   File 
> "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py",
>  line 32, in install
>     self.configure(env) # for security
>   File 
> "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py",
>  line 37, in configure
>     ams(name='grafana', action=action)
>   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/ams.py",
>  line 413, in ams
>     recursive_ownership = True
>   File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", 
> line 155, in __init__
>     self.env.run()
>   File 
> "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", 
> line 160, in run
>     self.run_action(resource, action)
>   File 
> "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", 
> line 124, in run_action
>     provider_action()
>   File 
> "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py",
>  line 189, in action_create
>     raise Fail("Applying %s failed, parent directory %s doesn't exist" % 
> (self.resource, dirname))
> resource_management.core.exceptions.Fail: Applying 
> Directory['/etc/ambari-metrics-grafana/conf'] failed, parent directory 
> /etc/ambari-metrics-grafana doesn't exist
> {code}
> Stdout
> {code}
> 2016-08-11 13:38:44,481 - Group['hadoop'] {}
> 2016-08-11 13:38:44,483 - Adding group Group['hadoop']
> 2016-08-11 13:38:44,499 - User['zookeeper'] {'gid': 'hadoop', 
> 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
> 2016-08-11 13:38:44,499 - Adding user User['zookeeper']
> 2016-08-11 13:38:44,555 - User['ams'] {'gid': 'hadoop', 
> 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
> 2016-08-11 13:38:44,556 - Adding user User['ams']
> 2016-08-11 13:38:44,582 - User['ambari-qa'] {'gid': 'hadoop', 
> 'fetch_nonlocal_groups': True, 'groups': ['users']}
> 2016-08-11 13:38:44,582 - Adding user User['ambari-qa']
> 2016-08-11 13:38:44,616 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] 
> {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
> 2016-08-11 13:38:44,622 - Writing 
> File['/var/lib/ambari-agent/tmp/changeUid.sh'] because it doesn't exist
> 2016-08-11 13:38:44,622 - Changing permission for 
> /var/lib/ambari-agent/tmp/changeUid.sh from 644 to 555
> 2016-08-11 13:38:44,622 - 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)'}
> 2016-08-11 13:38:44,666 - Initializing 2 repositories
> 2016-08-11 13:38:44,666 - Repository['HDP-2.5'] {'base_url': 
> 'http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-1181',
>  'action': ['create'], 'components': ['HDP', 'main'], 'repo_template': 
> '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list 
> %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif 
> %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP', 'mirror_list': 
> None}
> 2016-08-11 13:38:44,684 - File['/etc/yum.repos.d/HDP.repo'] {'content': 
> InlineTemplate(...)}
> 2016-08-11 13:38:44,685 - Writing File['/etc/yum.repos.d/HDP.repo'] because 
> it doesn't exist
> 2016-08-11 13:38:44,686 - Repository['HDP-UTILS-1.1.0.21'] {'base_url': 
> 'http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6',
>  'action': ['create'], 'components': ['HDP-UTILS', 'main'], 'repo_template': 
> '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list 
> %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif 
> %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP-UTILS', 
> 'mirror_list': None}
> 2016-08-11 13:38:44,692 - File['/etc/yum.repos.d/HDP-UTILS.repo'] {'content': 
> InlineTemplate(...)}
> 2016-08-11 13:38:44,693 - Writing File['/etc/yum.repos.d/HDP-UTILS.repo'] 
> because it doesn't exist
> 2016-08-11 13:38:44,694 - Package['unzip'] {'retry_on_repo_unavailability': 
> False, 'retry_count': 5}
> 2016-08-11 13:38:44,851 - Skipping installation of existing package unzip
> 2016-08-11 13:38:44,851 - Package['curl'] {'retry_on_repo_unavailability': 
> False, 'retry_count': 5}
> 2016-08-11 13:38:44,866 - Skipping installation of existing package curl
> 2016-08-11 13:38:44,869 - Package['hdp-select'] 
> {'retry_on_repo_unavailability': False, 'retry_count': 5}
> 2016-08-11 13:38:44,890 - Installing package hdp-select ('/usr/bin/yum -d 0 
> -e 0 -y install hdp-select')
> 2016-08-11 13:38:48,812 - Using hadoop conf dir: 
> /usr/hdp/current/hadoop-client/conf
> 2016-08-11 13:38:48,815 - checked_call['hostid'] {}
> 2016-08-11 13:38:48,823 - checked_call returned (0, 'a8c06543')
> 2016-08-11 13:38:48,827 - Package['ambari-metrics-monitor'] 
> {'retry_on_repo_unavailability': False, 'retry_count': 5}
> 2016-08-11 13:38:48,897 - Installing package ambari-metrics-monitor 
> ('/usr/bin/yum -d 0 -e 0 -y install ambari-metrics-monitor')
> 2016-08-11 13:38:52,965 - Package['ambari-metrics-hadoop-sink'] 
> {'retry_on_repo_unavailability': False, 'retry_count': 5}
> 2016-08-11 13:38:52,997 - Installing package ambari-metrics-hadoop-sink 
> ('/usr/bin/yum -d 0 -e 0 -y install ambari-metrics-hadoop-sink')
> 2016-08-11 13:39:08,891 - Package['ambari-metrics-grafana'] 
> {'retry_on_repo_unavailability': False, 'retry_count': 5}
> 2016-08-11 13:39:08,925 - Installing package ambari-metrics-grafana 
> ('/usr/bin/yum -d 0 -e 0 -y install ambari-metrics-grafana')
> 2016-08-11 13:39:10,801 - Package['gcc'] {'retry_on_repo_unavailability': 
> False, 'retry_count': 5}
> 2016-08-11 13:39:10,814 - Skipping installation of existing package gcc
> 2016-08-11 13:39:10,817 - Directory['/etc/ambari-metrics-grafana/conf'] 
> {'owner': 'ams', 'group': 'hadoop', 'recursive_ownership': True, 'mode': 0755}
> 2016-08-11 13:39:10,819 - Creating directory 
> Directory['/etc/ambari-metrics-grafana/conf'] since it doesn't exist.
> Command failed after 1 tries
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to