From a8b2debf7902035356ef528b809a92ae85702b89 Mon Sep 17 00:00:00 2001 From: Wellington Chevreuil Date: Fri, 17 Jul 2020 18:15:47 +0100 Subject: [PATCH] HBASE-24747 Log an ERROR if HBaseSaslRpcServer initialisation fails with an uncaught exception --- .../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 e55254ebac55..0226de4792c9 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 @@ public void saslReadAndProcess(ByteBuff saslToken) throws IOException, 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()); }