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

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

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

@shoothzj
Copy link
Member

shoothzj commented Jul 4, 2024

We has been config like that:

bash-5.0$ cat conf/bk_server.conf |grep -i listen
listeningInterface=eth0

@nodece nodece marked this pull request as draft July 4, 2024 12:14
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.

2 participants