[
https://issues.apache.org/jira/browse/ZOOKEEPER-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15367042#comment-15367042
]
Sergey Shelukhin commented on ZOOKEEPER-2469:
---------------------------------------------
FWIW, {noformat} LOG.warn("Not attempting to re-login since the last
re-login was " +
"attempted less than " + (MIN_TIME_BEFORE_RELOGIN/1000) + "
seconds"+
" before.");{noformat}
seems to sabotage this retry anyway.
> infinite loop in ZK re-login
> ----------------------------
>
> Key: ZOOKEEPER-2469
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2469
> Project: ZooKeeper
> Issue Type: Bug
> Reporter: Sergey Shelukhin
>
> {noformat}
> int retry = 1;
> while (retry >= 0) {
> try {
> reLogin();
> break;
> } catch (LoginException le) {
> if (retry > 0) {
> --retry;
> // sleep for 10 seconds.
> try {
> Thread.sleep(10 * 1000);
> } catch (InterruptedException e) {
> LOG.error("Interrupted during login
> retry after LoginException:", le);
> throw le;
> }
> } else {
> LOG.error("Could not refresh TGT for
> principal: " + principal + ".", le);
> }
> }
> }
> {noformat}
> will retry forever. Should return like the one above
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)