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

ElassticSearchCluster NullPointerException when there's no ES clusters available. #45

Open
ghuang0570 opened this issue May 20, 2020 · 0 comments

Comments

@ghuang0570
Copy link

ghuang0570 commented May 20, 2020

Version: 2.20

Pretty sure this bug is caused by not null checking this line: https://github.com/airbnb/billow/blob/master/src/main/java/com/airbnb/billow/ElasticsearchCluster.java#L49

getDedicatedMasterCount() returns Integer object and could be null, so we need to do a null check before assigning to int, otherwise you will see this:

05:37:39.425 [main] ERROR com.airbnb.billow.Main - Failure in main thread, getting out!
java.lang.NullPointerException: null
	at com.airbnb.billow.ElasticsearchCluster.<init>(ElasticsearchCluster.java:49) ~[billow-2.20.jar:na]
	at com.airbnb.billow.AWSDatabase.<init>(AWSDatabase.java:221) ~[billow-2.20.jar:na]
	at com.airbnb.billow.AWSDatabaseHolder.rebuild(AWSDatabaseHolder.java:128) ~[billow-2.20.jar:na]
	at com.airbnb.billow.AWSDatabaseHolder.<init>(AWSDatabaseHolder.java:124) ~[billow-2.20.jar:na]
	at com.airbnb.billow.Main.<init>(Main.java:53) ~[billow-2.20.jar:na]
	at com.airbnb.billow.Main.main(Main.java:130) ~[billow-2.20.jar:na]

Also please audit other similar handling as billow is pretty brittle when some assumptions are not met, eg, there needs to be a user IAM role in an account, there needs to be a RDS/Aurora cluster in the account.

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

No branches or pull requests

1 participant