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

NPE at DNS.reverse #1287

Closed
sijie opened this issue Mar 23, 2018 · 0 comments
Closed

NPE at DNS.reverse #1287

sijie opened this issue Mar 23, 2018 · 0 comments

Comments

@sijie
Copy link
Member

sijie commented Mar 23, 2018

BUG REPORT

  1. Please describe the issue you observed:
  • What did you do?

run the test

  • What did you expect to see?

tests should pass

  • What did you see instead?

It fails at starting the bookie as NPE is thrown at DNS.reverseDns.

java.lang.NullPointerException
	at org.apache.bookkeeper.net.DNS.reverseDns(DNS.java:90)
	at org.apache.bookkeeper.net.DNS.getHosts(DNS.java:225)
	at org.apache.bookkeeper.net.DNS.getDefaultHost(DNS.java:324)
	at org.apache.bookkeeper.net.DNS.getDefaultHost(DNS.java:340)
	at org.apache.bookkeeper.bookie.Bookie.getBookieAddress(Bookie.java:539)
	at org.apache.bookkeeper.bookie.ScanAndCompareGarbageCollector.<init>(ScanAndCompareGarbageCollector.java:96)
	at org.apache.bookkeeper.bookie.GarbageCollectorThread.<init>(GarbageCollectorThread.java:192)
	at org.apache.bookkeeper.bookie.InterleavedLedgerStorage.initialize(InterleavedLedgerStorage.java:107)
	at org.apache.bookkeeper.bookie.SortedLedgerStorage.initialize(SortedLedgerStorage.java:66)
	at org.apache.bookkeeper.bookie.Bookie.<init>(Bookie.java:721)
	at org.apache.bookkeeper.proto.BookieServer.newBookie(BookieServer.java:115)
	at org.apache.bookkeeper.proto.BookieServer.<init>(BookieServer.java:96)
	at org.apache.bookkeeper.test.BookKeeperClusterTestCase.startBookie(BookKeeperClusterTestCase.java:612)
	at org.apache.bookkeeper.test.BookKeeperClusterTestCase.startNewBookieAndReturnAddress(BookKeeperClusterTestCase.java:595)
	at org.apache.bookkeeper.test.BookKeeperClusterTestCase.startNewBookie(BookKeeperClusterTestCase.java:587)
	at org.apache.bookkeeper.test.BookKeeperClusterTestCase.startBKCluster(BookKeeperClusterTestCase.java:219)
	at org.apache.bookkeeper.test.BookKeeperClusterTestCase.setUp(BookKeeperClusterTestCase.java:134)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.lang.Thread.run(Thread.java:748)
sijie added a commit to sijie/bookkeeper that referenced this issue Mar 27, 2018
*Problem*

Null value can be returned on retrieving attributes.

*Solution*

If null value is returned, throw NamingException so cached localhost name is used.
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