You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by wc...@apache.org on 2020/07/20 09:34:51 UTC

[hbase] branch branch-2 updated: HBASE-24747 Log an ERROR if HBaseSaslRpcServer initialisation fails with an uncaught exception (#2079)

This is an automated email from the ASF dual-hosted git repository.

wchevreuil pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 8c89582  HBASE-24747 Log an ERROR if HBaseSaslRpcServer initialisation fails with an uncaught exception (#2079)
8c89582 is described below

commit 8c895826332f3d190e96bc6f25f3e7331fd84ac3
Author: Wellington Ramos Chevreuil <wc...@apache.org>
AuthorDate: Fri Jul 17 18:50:03 2020 +0100

    HBASE-24747 Log an ERROR if HBaseSaslRpcServer initialisation fails with an uncaught exception (#2079)
    
    Signed-off-by: Viraj Jasani <vj...@apache.org>
    Signed-off-by: Josh Elser <el...@apache.org>
    (cherry picked from commit bd42c75cac47123368b031a0645a557106be8018)
---
 .../java/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 d49a904..475dcc3 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());
         }