Bryan Beaudreault created HBASE-28088:
-----------------------------------------

             Summary: NullPointerException authorizing connection on 
regionserver startup
                 Key: HBASE-28088
                 URL: https://issues.apache.org/jira/browse/HBASE-28088
             Project: HBase
          Issue Type: Bug
            Reporter: Bryan Beaudreault


When a RegionServer starts up, the HRegionServer constructor calls 
createRpcServices() which creates RSRpcServices, which uses RpcServerFactory to 
create a NettyRpcServer. The NettyRpcServer constructor binds the process to 
the given regionserver port. At this point it is able to accept requests.

Later in the HRegionServer constructor, it calls rpcServices.start(zooKeeper). 
This calls NettyRpcServer.start(), which initializes the AuthManager.

Since there is a period of time where the server can accept requests but 
AuthManager is not initialized, if you have authentication enabled you will 
receive NullPointerExceptions (see below). These will clear up once the server 
starts.

We should fix the flow here to avoid these errors.
{code:java}
2023-09-15T20:47:35,300 [RS-EventLoopGroup-1-3] WARN 
org.apache.hadoop.hbase.ipc.NettyRpcServer: Connection xxx.xxx.xxx.xxx:49402; 
caught unexpected downstream exception.
java.lang.NullPointerException: Cannot invoke 
"org.apache.hadoop.security.authorize.ServiceAuthorizationManager.authorize(org.apache.hadoop.security.UserGroupInformation,
 java.lang.Class, org.apache.hadoop.conf.Configuration, java.net.InetAddress)" 
because "this.authManager" is null
        at org.apache.hadoop.hbase.ipc.RpcServer.authorize(RpcServer.java:654) 
~[hbase-server-2.5-hubspot-20230913.131903-57.jar:2.5-hubspot-SNAPSHOT]
        at 
org.apache.hadoop.hbase.ipc.ServerRpcConnection.authorizeConnection(ServerRpcConnection.java:381)
 ~[hbase-server-2.5-hubspot-20230913.131903-57.jar:2.5-hubspot-SNAPSHOT]
        at 
org.apache.hadoop.hbase.ipc.ServerRpcConnection.processOneRpc(ServerRpcConnection.java:362)
 ~[hbase-server-2.5-hubspot-20230913.131903-57.jar:2.5-hubspot-SNAPSHOT]
        at 
org.apache.hadoop.hbase.ipc.NettyServerRpcConnection.process(NettyServerRpcConnection.java:89)
 ~[hbase-server-2.5-hubspot-20230913.131903-57.jar:2.5-hubspot-SNAPSHOT] {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to