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>
(cherry picked from commit bd42c75cac
)
This commit is contained in:
parent
0a8a7fa2ed
commit
8c89582633
|
@ -348,8 +348,14 @@ abstract class ServerRpcConnection implements Closeable {
|
||||||
byte[] replyToken;
|
byte[] replyToken;
|
||||||
try {
|
try {
|
||||||
if (saslServer == null) {
|
if (saslServer == null) {
|
||||||
saslServer =
|
try {
|
||||||
|
saslServer =
|
||||||
new HBaseSaslRpcServer(provider, rpcServer.saslProps, rpcServer.secretManager);
|
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={}",
|
RpcServer.LOG.debug("Created SASL server with mechanism={}",
|
||||||
provider.getSaslAuthMethod().getAuthMethod());
|
provider.getSaslAuthMethod().getAuthMethod());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue