You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.rocketmq.broker.BrokerController.initialRequestPipeline(BrokerController.java:1064)
at org.apache.rocketmq.broker.BrokerController.recoverAndInitService(BrokerController.java:882)
at org.apache.rocketmq.broker.BrokerController.initialize(BrokerController.java:834)
at org.apache.rocketmq.broker.BrokerStartup.createBrokerController(BrokerStartup.java:248)
at org.apache.rocketmq.proxy.ProxyStartup.createBrokerController(ProxyStartup.java:230)
at org.apache.rocketmq.proxy.ProxyStartup.createMessagingProcessor(ProxyStartup.java:188)
at org.apache.rocketmq.proxy.ProxyStartup.main(ProxyStartup.java:79)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.rocketmq.auth.authorization.factory.AuthorizationFactory.getStrategy(AuthorizationFactory.java:113)
at org.apache.rocketmq.auth.authorization.AuthorizationEvaluator.(AuthorizationEvaluator.java:36)
at org.apache.rocketmq.auth.authorization.AuthorizationEvaluator.(AuthorizationEvaluator.java:32)
at org.apache.rocketmq.auth.authorization.factory.AuthorizationFactory.lambda$getEvaluator$2(AuthorizationFactory.java:97)
at org.apache.rocketmq.auth.authorization.factory.AuthorizationFactory.computeIfAbsent(AuthorizationFactory.java:147)
at org.apache.rocketmq.auth.authorization.factory.AuthorizationFactory.getEvaluator(AuthorizationFactory.java:97)
at org.apache.rocketmq.broker.auth.pipeline.AuthorizationPipeline.(AuthorizationPipeline.java:43)
at org.apache.rocketmq.broker.BrokerController.initialRequestPipeline(BrokerController.java:1060)
... 6 more
Caused by: java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.rocketmq.auth.authorization.factory.AuthorizationFactory.getStrategy(AuthorizationFactory.java:109)
... 13 more
Additional Context
No response
The text was updated successfully, but these errors were encountered:
kingkh1995
added a commit
to kingkh1995/rocketmq
that referenced
this issue
Aug 30, 2024
Before Creating the Bug Report
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
windows11
RocketMQ version
develop
JDK Version
jdk8
Describe the Bug
AuthorizationFactory
public static AuthorizationStrategy getStrategy(AuthConfig config, Supplier<?> metadataService) {
try {
Class<? extends AuthorizationStrategy> clazz = StatelessAuthorizationStrategy.class;
if (StringUtils.isNotBlank(config.getAuthenticationStrategy())) { // wrong
clazz = (Class<? extends AuthorizationStrategy>) Class.forName(config.getAuthorizationStrategy());
}
return clazz.getDeclaredConstructor(AuthConfig.class, Supplier.class).newInstance(config, metadataService);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Steps to Reproduce
broker.conf
brokerClusterName = DefaultCluster
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
authenticationEnabled = true
authenticationProvider = org.apache.rocketmq.auth.authentication.provider.DefaultAuthenticationProvider
initAuthenticationUser = {"username":"rocketmq","password":"12345678"}
innerClientAuthenticationCredentials = {"accessKey":"rocketmq","secretKey":"12345678"}
authenticationMetadataProvider = org.apache.rocketmq.auth.authentication.provider.LocalAuthenticationMetadataProvider
authenticationStrategy = org.apache.rocketmq.auth.authentication.strategy.StatefulAuthenticationStrategy
What Did You Expect to See?
start success
What Did You See Instead?
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.rocketmq.broker.BrokerController.initialRequestPipeline(BrokerController.java:1064)
at org.apache.rocketmq.broker.BrokerController.recoverAndInitService(BrokerController.java:882)
at org.apache.rocketmq.broker.BrokerController.initialize(BrokerController.java:834)
at org.apache.rocketmq.broker.BrokerStartup.createBrokerController(BrokerStartup.java:248)
at org.apache.rocketmq.proxy.ProxyStartup.createBrokerController(ProxyStartup.java:230)
at org.apache.rocketmq.proxy.ProxyStartup.createMessagingProcessor(ProxyStartup.java:188)
at org.apache.rocketmq.proxy.ProxyStartup.main(ProxyStartup.java:79)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.rocketmq.auth.authorization.factory.AuthorizationFactory.getStrategy(AuthorizationFactory.java:113)
at org.apache.rocketmq.auth.authorization.AuthorizationEvaluator.(AuthorizationEvaluator.java:36)
at org.apache.rocketmq.auth.authorization.AuthorizationEvaluator.(AuthorizationEvaluator.java:32)
at org.apache.rocketmq.auth.authorization.factory.AuthorizationFactory.lambda$getEvaluator$2(AuthorizationFactory.java:97)
at org.apache.rocketmq.auth.authorization.factory.AuthorizationFactory.computeIfAbsent(AuthorizationFactory.java:147)
at org.apache.rocketmq.auth.authorization.factory.AuthorizationFactory.getEvaluator(AuthorizationFactory.java:97)
at org.apache.rocketmq.broker.auth.pipeline.AuthorizationPipeline.(AuthorizationPipeline.java:43)
at org.apache.rocketmq.broker.BrokerController.initialRequestPipeline(BrokerController.java:1060)
... 6 more
Caused by: java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.rocketmq.auth.authorization.factory.AuthorizationFactory.getStrategy(AuthorizationFactory.java:109)
... 13 more
Additional Context
No response
The text was updated successfully, but these errors were encountered: