HBASE-24747 Log an ERROR if HBaseSaslRpcServer initialisation fails with an uncaught exception (#2079)

Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Josh Elser <elserj@apache.org>
This commit is contained in:
Wellington Ramos Chevreuil 2020-07-17 18:50:03 +01:00 committed by GitHub
parent 1781185b7b
commit bd42c75cac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -348,8 +348,14 @@ abstract class ServerRpcConnection implements Closeable {
byte[] replyToken;
try {
if (saslServer == null) {
saslServer =
try {
saslServer =
new HBaseSaslRpcServer(provider, rpcServer.saslProps, rpcServer.secretManager);
} catch (Exception e){
RpcServer.LOG.error("Error when trying to create instance of HBaseSaslRpcServer "
+ "with sasl provider: " + provider, e);
throw e;
}
RpcServer.LOG.debug("Created SASL server with mechanism={}",
provider.getSaslAuthMethod().getAuthMethod());
}