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

Robert Levas commented on AMBARI-24961:
---------------------------------------

[~akhilsnaik]...  In order for {{{{hostname}}}} to resolve to something a 
variable needs to be defined in the context named {{hostname}}. This is 
typically done in the params.py or params_linux.py file. See 
[https://github.com/hortonworks/hdp_ambari_definitions/blob/AMBARI-2.7-maint/src/main/resources/stacks/HDP/3.0/services/HBASE/package/scripts/params_linux.py#L254].
{code:java}
hostname = config['agentLevelParams']['hostname']
{code}
My guess is that there is no {{hostname}} property defined in the relevant 
context.  However, I do see it in 
[https://github.com/hortonworks/hdp_ambari_definitions/blob/AMBARI-2.7-maint/src/main/resources/stacks/HDP/3.0/services/HDFS/package/scripts/params_linux.py#L187.]
  So I am not quite sure what is going on. 

Maybe this wacky substitution does not work in the alerts mechanism or maybe 
params_linux.py is not being executed.

 

> Ambari is unable to parse {{hostname}} in {hdfs-site/dfs.datanode.address} 
> and is triggering alert for datanode process
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-24961
>                 URL: https://issues.apache.org/jira/browse/AMBARI-24961
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-agent
>    Affects Versions: trunk, 2.6.2, 2.7.0
>         Environment: ambari-2.6.2
> ambari-2.7.0
> trunk
>            Reporter: Akhil S Naik
>            Assignee: Akhil S Naik
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Ambari is unable to parse \\{\{hostname\}\} in 
> {hdfs-site/dfs.datanode.address} and is triggering alert for datanode process
> I changed the value of dfs.datanode.address in  Advanced hdfs configuration 
> using ambari 
> i set value to   \\{\{hostname\}\}:50010 ( default value is 0.0.0.0:50010 ) 
> Now after restart datanode is working fine and but ambari is triggering alert 
> on datanode process with error : 
> "Connection failed: [Errno -2] Name or service not known to  
> \\{\{hostname\}\}:50010" 
> expected result : Ambari shouldnt trigger the alert and it should pass 
> \\{\{hostname\}\} correctly to localhost



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to