René's URL Explorer Experiment


Title: DNS lookups fail in Kubernetes cluster · Issue #118 · dnsjava/dnsjava · GitHub

Open Graph Title: DNS lookups fail in Kubernetes cluster · Issue #118 · dnsjava/dnsjava

X Title: DNS lookups fail in Kubernetes cluster · Issue #118 · dnsjava/dnsjava

Description: After upgrading dnsjava from 2.1.9 to 3.2.2, as the summary says, DNS lookups started failing in Kubernetes cluster. IIUC, it's because we don't lookup using the root (Name.root) after this for loop. dnsjava/src/main/java/org/xbill/DNS/L...

Open Graph Description: After upgrading dnsjava from 2.1.9 to 3.2.2, as the summary says, DNS lookups started failing in Kubernetes cluster. IIUC, it's because we don't lookup using the root (Name.root) after this for loo...

X Description: After upgrading dnsjava from 2.1.9 to 3.2.2, as the summary says, DNS lookups started failing in Kubernetes cluster. IIUC, it's because we don't lookup using the root (Name.root) after this...

Opengraph URL: https://github.com/dnsjava/dnsjava/issues/118

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"DNS lookups fail in Kubernetes cluster","articleBody":"After upgrading dnsjava from `2.1.9` to `3.2.2`, as the summary says, DNS lookups started failing in Kubernetes cluster. IIUC, it's because we don't lookup using the root (`Name.root`) after this for loop.\r\n\r\nhttps://github.com/dnsjava/dnsjava/blob/6f379668871fe788c8dfe991aa16a8c54b6857e3/src/main/java/org/xbill/DNS/Lookup.java#L574-L582\r\n\r\nIn other words, I was expecting something like this after that for loop:\r\n```java\r\nif (!done) {\r\n  resolve(name, Name.root);\r\n}\r\n```\r\n\r\nBut I am not 100% sure. 🤔  My tests to reproduce the issue in the cluster:\r\n\r\n`/etc/resolv.conf` file:\r\n```\r\nnameserver 172.20.0.10\r\nsearch default.svc.cluster.local svc.cluster.local cluster.local eu-west-1.compute.internal\r\noptions ndots:5\r\n```\r\n\r\n```bash\r\njshell> import org.xbill.DNS.*\r\njshell> ResolverConfig.getCurrentConfig().searchPath()\r\n$2 ==> [default.svc.cluster.local., svc.cluster.local., cluster.local., eu-west-1.compute.internal.]\r\njshell> ResolverConfig.getCurrentConfig().ndots()\r\n$3 ==> 5\r\njshell> new Lookup(\"gmail.com\", Type.MX, DClass.IN)\r\n$4 ==> org.xbill.DNS.Lookup@5e955596\r\njshell> $4.run()\r\n$5 ==> null\r\njshell> $4.getResult()\r\n$6 ==> 3\r\njshell> Lookup.HOST_NOT_FOUND\r\n$7 ==> 3\r\n```\r\n\r\nIf I use FQDN, it can resolve the record so it's not that we cannot resolve it within the cluster. It uses only the search paths while performing the lookup.\r\n\r\n```bash\r\njshell> new Lookup(\"gmail.com.\", Type.MX, DClass.IN)\r\n$8 ==> org.xbill.DNS.Lookup@3ec300f1\r\n\r\njshell> $8.run()\r\n$9 ==> Record[5] { gmail.com.\t\t30\tIN\tMX\t10 alt1.gmail-smtp-in.l.google.com., gmail.com.\t\t30\tIN\tMX\t20 alt2.gmail-smtp-in.l.google.com., gmail.com.\t\t30\tIN\tMX\t30 alt3.gmail-smtp-in.l.google.com., gmail.com.\t\t30\tIN\tMX\t40 alt4.gmail-smtp-in.l.google.com., gmail.com.\t\t30\tIN\tMX\t5 gmail-smtp-in.l.google.com. }\r\njshell> $8.getResult()\r\n$10 ==> 0\r\n```\r\n\r\nThis \"works\" in dnsjava 2.1.9 because, for some reason (maybe a bug?), `ndots` (`ResolverConfig.getCurrentConfig().ndots()`) is set to 1 with the same configuration. So we use the following code path:\r\nhttps://github.com/dnsjava/dnsjava/blob/6f379668871fe788c8dfe991aa16a8c54b6857e3/src/main/java/org/xbill/DNS/Lookup.java#L567-L569","author":{"url":"https://github.com/hisener","@type":"Person","name":"hisener"},"datePublished":"2020-08-20T09:34:54Z","url":"https://github.com/dnsjava/dnsjava/issues/118"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ff7171fa-a4f4-afa3-1f6c-5cb014246fe6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9850:3AC956:120D7CC:17F72B9:6B06587C
html-safe-nonceb0d16af69a964dacad0305bfaf594e81f7b7199d70880e99d099cd007cd8ad45
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODUwOjNBQzk1NjoxMjBEN0NDOjE3RjcyQjk6NkIwNjU4N0MiLCJ2aXNpdG9yX2lkIjoiNzI3MTU0MjQ5OTA4MzQ0MjMwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac05d0ab460d92564ac87912cb8bf5f45a739a9ffd4ab105be679d611af9e68321
hovercard-subject-tagissue:682568890
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/dnsjava/dnsjava/118/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d66ddb5ad97a8ef27df4d3402454ac53789442a13b9ac386376e828fb620d74e/dnsjava/dnsjava/issues/118
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d66ddb5ad97a8ef27df4d3402454ac53789442a13b9ac386376e828fb620d74e/dnsjava/dnsjava/issues/118
og:image:altAfter upgrading dnsjava from 2.1.9 to 3.2.2, as the summary says, DNS lookups started failing in Kubernetes cluster. IIUC, it's because we don't lookup using the root (Name.root) after this for loo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehisener
hostnamegithub.com
expected-hostnamegithub.com
None6324e6ac990fb6befbec840cc0e102a1071c339bfe8f9826bb12de2e3ba1d297
turbo-cache-controlno-preview
go-importgithub.com/dnsjava/dnsjava git https://github.com/dnsjava/dnsjava.git
octolytics-dimension-user_id6755615
octolytics-dimension-user_logindnsjava
octolytics-dimension-repository_id17084567
octolytics-dimension-repository_nwodnsjava/dnsjava
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id17084567
octolytics-dimension-repository_network_root_nwodnsjava/dnsjava
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7f0aa75f4141d440c6110dc31af7ea7797abb6c4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/dnsjava/dnsjava/issues/118#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdnsjava%2Fdnsjava%2Fissues%2F118
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdnsjava%2Fdnsjava%2Fissues%2F118
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=dnsjava%2Fdnsjava
Reloadhttps://github.com/dnsjava/dnsjava/issues/118
Reloadhttps://github.com/dnsjava/dnsjava/issues/118
Reloadhttps://github.com/dnsjava/dnsjava/issues/118
dnsjavahttps://github.com/dnsjava
dnsjavahttps://github.com/dnsjava/dnsjava
Codehttps://github.com/dnsjava/dnsjava
Issues16 (16)https://github.com/dnsjava/dnsjava/issues
Pull requests3 (3)https://github.com/dnsjava/dnsjava/pulls
Actionshttps://github.com/dnsjava/dnsjava/actions
Security and quality8 (8)https://github.com/dnsjava/dnsjava/security
Insightshttps://github.com/dnsjava/dnsjava/insights
https://github.com/dnsjava/dnsjava
New issuehttps://github.com/login?return_to=https://github.com/dnsjava/dnsjava/issues/118
New issuehttps://github.com/login?return_to=https://github.com/dnsjava/dnsjava/issues/118
DNS lookups fail in Kubernetes clusterhttps://github.com/dnsjava/dnsjava/issues/118#top
v3.3https://github.com/dnsjava/dnsjava/milestone/7
https://github.com/hisener
hisenerhttps://github.com/hisener
on Aug 20, 2020https://github.com/dnsjava/dnsjava/issues/118#issue-682568890
dnsjava/src/main/java/org/xbill/DNS/Lookup.javahttps://github.com/dnsjava/dnsjava/blob/6f379668871fe788c8dfe991aa16a8c54b6857e3/src/main/java/org/xbill/DNS/Lookup.java#L574-L582
6f37966https://github.com/dnsjava/dnsjava/commit/6f379668871fe788c8dfe991aa16a8c54b6857e3
dnsjava/src/main/java/org/xbill/DNS/Lookup.javahttps://github.com/dnsjava/dnsjava/blob/6f379668871fe788c8dfe991aa16a8c54b6857e3/src/main/java/org/xbill/DNS/Lookup.java#L567-L569
6f37966https://github.com/dnsjava/dnsjava/commit/6f379668871fe788c8dfe991aa16a8c54b6857e3
https://github.com/omrico
omricohttps://github.com/omrico
on Aug 22, 2020https://github.com/dnsjava/dnsjava/issues/118#issuecomment-678577947
ibauersachshttps://github.com/ibauersachs
on Aug 22, 2020https://github.com/dnsjava/dnsjava/issues/118#event-3681960888
Lookup a name as absolute after all search path are exhaustedhttps://github.com/dnsjava/dnsjava/commit/ad953c4b4eacab806be3c64fa8a42f35d7058228
https://docs.github.com/articles/closing-issues-via-commit-messages
ad953c4https://github.com/dnsjava/dnsjava/commit/ad953c4b4eacab806be3c64fa8a42f35d7058228
ibauersachshttps://github.com/ibauersachs
completedhttps://github.com/dnsjava/dnsjava/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
ad953c4https://github.com/dnsjava/dnsjava/commit/ad953c4b4eacab806be3c64fa8a42f35d7058228
on Aug 22, 2020https://github.com/dnsjava/dnsjava/issues/118#event-3681960929
https://github.com/ibauersachs
ibauersachshttps://github.com/ibauersachs
on Aug 22, 2020https://github.com/dnsjava/dnsjava/issues/118#issuecomment-678633504
configure ndots to 1 in your podhttps://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config
https://github.com/hisener
hisenerhttps://github.com/hisener
on Aug 24, 2020https://github.com/dnsjava/dnsjava/issues/118#issuecomment-678986250
ibauersachshttps://github.com/ibauersachs
v3.3https://github.com/dnsjava/dnsjava/milestone/7
on Aug 24, 2020https://github.com/dnsjava/dnsjava/issues/118#event-3684393209
Sign up for freehttps://github.com/signup?return_to=https://github.com/dnsjava/dnsjava/issues/118
Sign in to commenthttps://github.com/login?return_to=https://github.com/dnsjava/dnsjava/issues/118
v3.3https://github.com/dnsjava/dnsjava/milestone/7
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.