Details
Description
FastSaslClientFactory is instantiated in both SaslRpcClient and SaslParticipant as new FastSaslClientFactory(null)
In its constructor FastSaslClientFactory loads all the SaslFactories using Sasl.getSaslClientFactories();
Then it iterates through all the loaded factories and calls getMechanismNames method.
The null argument sent in the constructor is sent to the getMechanismNames call.
In some-cases, a loaded factory might not handle this null argument and might throw a NPE.
This can cause the entire FastSaslClientFactory to not instantiate leading to failure while instantiation of SaslRpcClient.
Stack Trace -
Cause3: java.lang.ExceptionInInitializerError: Exception java.lang.NullPointerException [in thread "ServiceScheduler:GridforceSfdcLogUploaderProcess"] Cause3-StackTrace: at org.apache.qpid.client.security.amqplain.AmqPlainSaslClientFactory.getMechanismNames(AmqPlainSaslClientFactory.java:50) at org.apache.hadoop.security.FastSaslClientFactory.<init>(FastSaslClientFactory.java:47) at org.apache.hadoop.security.SaslRpcClient.<clinit>(SaslRpcClient.java:106) at org.apache.hadoop.ipc.Client$Connection.setupSaslConnection(Client.java:559) at org.apache.hadoop.ipc.Client$Connection.access$2100(Client.java:347) at org.apache.hadoop.ipc.Client$Connection$2.run(Client.java:783) at org.apache.hadoop.ipc.Client$Connection$2.run(Client.java:779) at java.base/java.security.AccessController.doPrivileged(AccessController.java:712) at java.base/javax.security.auth.Subject.doAs(Subject.java:439) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1899) at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:779) at org.apache.hadoop.ipc.Client$Connection.access$3800(Client.java:347) at org.apache.hadoop.ipc.Client.getConnection(Client.java:1632) at org.apache.hadoop.ipc.Client.call(Client.java:1457) at org.apache.hadoop.ipc.Client.call(Client.java:1410) at org.apache.hadoop.ipc.ProtobufRpcEngine2$Invoker.invoke(ProtobufRpcEngine2.java:258) at org.apache.hadoop.ipc.ProtobufRpcEngine2$Invoker.invoke(ProtobufRpcEngine2.java:139) at jdk.proxy2/jdk.proxy2.$Proxy1500.getFileInfo(Unknown Source) at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.lambda$getFileInfo$41(ClientNamenodeProtocolTranslatorPB.java:811) at org.apache.hadoop.ipc.internal.ShadedProtobufHelper.ipc(ShadedProtobufHelper.java:160) at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:811) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ... 23 shared with parent`
Attachments
Attachments
Issue Links
- links to