Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plan dies with a nullpointer exception #81

Open
userlarsb opened this issue Oct 4, 2021 · 5 comments · Fixed by joschi/kafka-gitops#50
Open

plan dies with a nullpointer exception #81

userlarsb opened this issue Oct 4, 2021 · 5 comments · Fixed by joschi/kafka-gitops#50

Comments

@userlarsb
Copy link

After setting KAFKA_SASL_JAAS_USERNAME, KAFKA_SASL_JAAS_PASSWORD and KAFKA_BOOTSTRAP_SERVERS running kafka-gitops validate as well as kafka-gitops plan results in

java.lang.NullPointerException
	at com.devshawn.kafka.gitops.config.KafkaGitopsConfigLoader.handleAuthentication(KafkaGitopsConfigLoader.java:62)
	at com.devshawn.kafka.gitops.config.KafkaGitopsConfigLoader.setConfig(KafkaGitopsConfigLoader.java:41)
	at com.devshawn.kafka.gitops.config.KafkaGitopsConfigLoader.load(KafkaGitopsConfigLoader.java:18)
	at com.devshawn.kafka.gitops.StateManager.<init>(StateManager.java:63)
	at com.devshawn.kafka.gitops.cli.PlanCommand.call(PlanCommand.java:37)
	at com.devshawn.kafka.gitops.cli.PlanCommand.call(PlanCommand.java:19)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1783)
	at picocli.CommandLine.access$900(CommandLine.java:145)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2141)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2108)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1975)
	at picocli.CommandLine.execute(CommandLine.java:1904)
	at com.devshawn.kafka.gitops.MainCommand.main(MainCommand.java:76)

I tried it with both 0.2.14 and 0.2.15.

@fireydagostino
Copy link

Looking at the error - and checking the line in the code
if (config.get(SaslConfigs.SASL_MECHANISM).equals("PLAIN")) {

You're likely missing the setting KAFKA_SASL_MECHANISM

@jaykatti
Copy link

It happened with me as well. The issue for me was - one of the config values are empty or null.

@joschi
Copy link

joschi commented Oct 19, 2022

If you're still interested, this issue should have been fixed in https://github.com/joschi/kafka-gitops/releases/tag/0.2.16.

@ubertot
Copy link

ubertot commented Oct 20, 2022

Then we can actually close the issue. Thank you so much :)

@joschi
Copy link

joschi commented Oct 20, 2022

Then we can actually close the issue. Thank you so much :)

Please note that https://github.com/joschi/kafka-gitops is an unofficial fork of this project. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants