From bd42c75cac47123368b031a0645a557106be8018 Mon Sep 17 00:00:00 2001 From: Wellington Ramos Chevreuil Date: Fri, 17 Jul 2020 18:50:03 +0100 Subject: [PATCH] HBASE-24747 Log an ERROR if HBaseSaslRpcServer initialisation fails with an uncaught exception (#2079) Signed-off-by: Viraj Jasani Signed-off-by: Josh Elser --- .../org/apache/hadoop/hbase/ipc/ServerRpcConnection.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ServerRpcConnection.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ServerRpcConnection.java index e55254ebac5..0226de4792c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ServerRpcConnection.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ServerRpcConnection.java @@ -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()); }