HBASE-30101 Move login() before RpcServer construction#8122
Open
junegunn wants to merge 1 commit intoapache:masterfrom
Open
HBASE-30101 Move login() before RpcServer construction#8122junegunn wants to merge 1 commit intoapache:masterfrom
junegunn wants to merge 1 commit intoapache:masterfrom
Conversation
The RpcServer constructor calls userProvider.getCurrentUserName() (HBASE-28321) which triggers UserGroupInformation.getCurrentUser(). If the server has not logged in yet, UGI bootstraps from the ticket cache and spawns a TGT renewer for whichever principal happens to be there, regardless of the principal the server is configured to use. Resolve the hostname up front via DNS.getHostname(...) and run the ZK client and server logins before createRpcServices(), so that UGI is already bound to the keytab principal by the time the RpcServer constructor runs. HRegionServer.getUseThisHostnameInstead() previously fell back to rpcServices.getSocketAddress().getHostName() when the reverse-DNS disable flag was set; that branch now uses DNS.getHostname directly so it no longer depends on rpcServices being constructed.
Apache9
reviewed
Apr 24, 2026
Contributor
Apache9
left a comment
There was a problem hiding this comment.
I think this is the correct way to fix the problem, we should setup the resources before starting rpc server.
Member
Author
|
I agree. #8110 doesn't fix the problem on 2.6+ anyway. I still think it's the right thing to do, but once this is merged, that one becomes optional. |
Apache9
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Login before creating the RPC services to prevent a stray TGT Renewer thread in HBase 2.6+.
Description:
Related: