[
https://issues.apache.org/jira/browse/AMBARI-18064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15434156#comment-15434156
]
Sumit Mohanty commented on AMBARI-18064:
----------------------------------------
LGTM, +1
> Decrease the number of retry count for check_ranger_login_urllib2
> -----------------------------------------------------------------
>
> Key: AMBARI-18064
> URL: https://issues.apache.org/jira/browse/AMBARI-18064
> Project: Ambari
> Issue Type: Bug
> Components: ambari-agent
> Affects Versions: trunk
> Environment: All
> Reporter: JaySenSharma
> Assignee: JaySenSharma
> Labels: patch-available
> Fix For: trunk
>
> Attachments: AMBARI-18064.patch, output-297.txt
>
>
> If the Ranger Admin is down then while starting any service from Ambari it
> keeps retrying 75 times in the interval of 8 seconds (total 600 Seconds ,
> Means 10 minutes) and then it finally starts the service like Kafka Broker
> service.
> Following kind of logging we can see in the ambari console when the Ranger
> Admin is Down and when the kafka broker start request is triggered (Attaching
> the "/var/lib/ambari-agent/data/output-297.txt" log):
> Snippet of the retry attempts:
> {code}
> 2016-08-08 13:45:27,802 - HdfsResource[None] {'security_enabled': False,
> 'hadoop_bin_dir': '/usr/hdp/current/hadoop-client/bin', 'keytab': [EMPTY],
> 'default_fs': 'hdfs://jss1.example.com:8020', 'hdfs_resource_ignore_file':
> '/var/lib/ambari-agent/data/.hdfs_resource_ignore', 'hdfs_site': ...,
> 'kinit_path_local': 'kinit', 'principal_name': [EMPTY], 'user': 'hdfs',
> 'action': ['execute'], 'hadoop_conf_dir':
> '/usr/hdp/current/hadoop-client/conf', 'immutable_paths':
> [u'/apps/hive/warehouse', u'/mr-history/done', u'/app-logs', u'/tmp']}
> 2016-08-08 13:45:27,853 - RangeradminV2: Skip ranger admin if it's down !
> 2016-08-08 13:45:27,858 - Will retry 74 time(s), caught exception: Connection
> failed to Ranger Admin. Reason - [Errno 111] Connection refused.. Sleeping
> for 8 sec(s)
> 2016-08-08 13:45:35,869 - Will retry 73 time(s), caught exception: Connection
> failed to Ranger Admin. Reason - [Errno 111] Connection refused.. Sleeping
> for 8 sec(s)
> .
> .
> .
> 2016-08-08 13:55:04,653 - Will retry 2 time(s), caught exception: Connection
> failed to Ranger Admin. Reason - [Errno 111] Connection refused.. Sleeping
> for 8 sec(s)
> 2016-08-08 13:55:12,665 - Will retry 1 time(s), caught exception: Connection
> failed to Ranger Admin. Reason - [Errno 111] Connection refused.. Sleeping
> for 8 sec(s)
> 2016-08-08 13:55:20,676 - Connection failed to Ranger Admin. Reason - [Errno
> 111] Connection refused.
> 2016-08-08 13:55:20,683 -
> File['/usr/hdp/current/kafka-broker/config/ranger-security.xml'] {'content':
> InlineTemplate(...), 'owner': 'kafka', 'group': 'hadoop', 'mode': 0644}
> {code}
> *What is Needed?*
> Here we see that it is not worth to wait for 600 Seconds (10 Minutes) to
> retry and then start the service (kafka broker Or any other component).
> Instead it can be reduced retry attempts to 15 times instead of trying 75
> times.
> *What was previous behavior?*
> Before the [AMBARI-14710|https://issues.apache.org/jira/browse/AMBARI-14710]
> the retry attempt was set to 15 times which was more accurate.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)