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

Fix getHosts by ip #4217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix getHosts by ip #4217

wants to merge 1 commit into from

Conversation

nodece
Copy link
Member

@nodece nodece commented Feb 21, 2024

Motivation

java.lang.RuntimeException: java.net.UnknownHostException: Unable to resolve default hostname: 1.0.0.127.in-addr.arpa. for interface: lo0

 at org.apache.bookkeeper.proto.SimpleBookieServiceInfoProvider.<init>(SimpleBookieServiceInfoProvider.java:41)
 at org.apache.bookkeeper.bookie.TestBookieImpl.<init>(TestBookieImpl.java:71)
 at org.apache.bookkeeper.bookie.TestBookieImpl.<init>(TestBookieImpl.java:46)
 at org.apache.bookkeeper.bookie.BookieWriteToJournalTest.testForceLedger(BookieWriteToJournalTest.java:167)

Changes

  • Trim the PTR result.
  • Skip PTR parsing of loopback address by DNS.

Copy link
Member

@shoothzj shoothzj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's a given that the result will end with a dot, could the if check be potentially redundant?
Additionally, I wonder if the getDefaultHost code has been consistently encountering resolution errors, might it indicate that this block of code has not been effectively utilized? Perhaps we can remove this method?
cc @eolivelli @merlimat

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 this pull request may close these issues.

None yet

2 participants