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 10, 2021
1 parent 2b6a91a commit 245c7bb
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,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 245c7bb

Please sign in to comment.