Skip to content

Commit

Permalink
HBASE-25875 RegionServer failed to start due to IllegalThreadStateExc…
Browse files Browse the repository at this point in the history
…eption in AuthenticationTokenSecretManager.start
  • Loading branch information
pankaj72981 committed May 11, 2021
1 parent b8fc854 commit 9f1bc69
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,12 @@ public synchronized void start() {
}
authTokenSecretMgr = createSecretManager();
if (authTokenSecretMgr != null) {
setSecretManager(authTokenSecretMgr);
authTokenSecretMgr.start();
// Start AuthenticationTokenSecretManager in synchronized way to avoid race conditions in
// LeaderElector start. See HBASE-25875
synchronized (authTokenSecretMgr) {
setSecretManager(authTokenSecretMgr);
authTokenSecretMgr.start();
}
}
this.authManager = new ServiceAuthorizationManager();
HBasePolicyProvider.init(conf, authManager);
Expand Down

0 comments on commit 9f1bc69

Please sign in to comment.