[ https://issues.apache.org/jira/browse/AMBARI-20754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15996743#comment-15996743 ]
Yuanbo Liu commented on AMBARI-20754: ------------------------------------- [~dili] Can we backport this JIRA into 2.5. We have a such kind of defect to fix in next version. > get_value_from_jmx constantly prints exception message in retry mechanism, > which brings bad user experience > ----------------------------------------------------------------------------------------------------------- > > Key: AMBARI-20754 > URL: https://issues.apache.org/jira/browse/AMBARI-20754 > Project: Ambari > Issue Type: Bug > Reporter: Yuanbo Liu > Assignee: Yuanbo Liu > Fix For: trunk > > Attachments: AMBARI-20754.001.patch > > > {{get_value_from_jmx}} of {{jmx.py}} is used in getting NameNode HA state. As > we know, if the cluster is large, it takes a long time for Namenode to leave > safe mode when restarting Namenode, thus we use retry mechanism to invoke > {{get_value_from_jmx}} in case of getting wrong state. The problem is that, > {{get_value_from_jmx}} will print several exception message into std_error > during retrying, it confuses users because there're error messages in > std_error, while all the services restart successfully. Here are the error > messages: > {quote} > 2017-04-12 15:12:56,633 - Getting jmx metrics from NN failed. URL: > http://xxxx:50070/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem > Traceback (most recent call last): > File > "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/jmx.py", > line 38, in get_value_from_jmx > _, data, _ = get_user_call_output(cmd, user=run_user, quiet=False) > File > "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/get_user_call_output.py", > line 61, in get_user_call_output > raise ExecutionFailed(err_msg, code, files_output[0], files_output[1]) > ExecutionFailed: Execution of 'curl --negotiate -u : -s > 'http://xxxx:50070/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem' > 1>/tmp/tmpWp05DF 2>/tmp/tmphm2dny' returned 7. > 2017-04-12 15:12:58,562 - Getting jmx metrics from NN failed. URL: > http://xxxx:50070/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem > Traceback (most recent call last): > File > "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/jmx.py", > line 42, in get_value_from_jmx > return data_dict["beans"][0][property] > IndexError: list index out of range > {quote} > We should improve it. -- This message was sent by Atlassian JIRA (v6.3.15#6346)