DNS resolution errors if DNS changes after daemon has started
- Dominant language
- Java
- Stars
- 3.5k
- Forks
- 250
- Avg merge
- 16h 22m
- Merged PRs (30d)
- 36
Description
I am using a corporate private Maven repository whose domain can only be resolved once connected via VPN. When I use `mvnd` before I am connected to the VPN it obviously fails. But if I afterwards connect to the VPN, the DNS lookup does still not work and I get the message
`[ERROR] Failed to execute goal on project org.apache.sling.feature.cpconverter: Could not resolve dependencies for project org.apache.sling:org.apache.sling.feature.cpconverter:jar:1.1.1-SNAPSHOT: Failed to collect dependencies at org.apache.sling:org.apache.sling.jcr.contentloader:jar:2.4.3-SNAPSHOT: Failed to read artifact descriptor for org.apache.sling:org.apache.sling.jcr.contentloader:jar:2.4.3-SNAPSHOT: Could not transfer artifact org.apache.sling:org.apache.sling.jcr.contentloader:pom:2.4.3-SNAPSHOT from/to nexus (https://repo.int.netcentric.biz/nexus/content/groups/public/): Transfer failed for https://repo.int.netcentric.biz/nexus/content/groups/public/org/apache/sling/org.apache.sling.jcr.contentloader/2.4.3-SNAPSHOT/org.apache.sling.jcr.contentloader-2.4.3-SNAPSHOT.pom: Unknown host repo.int.netcentric.biz -> [Help 1]`
If I execute the same Maven command via regular `mvn` it starts working immediately once I am connected to the VPN.
Seems that either the Java process or some Maven internals still use the old DNS or cache resolutions aggressively.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with mvnd before connecting to the VPN, then retry after the VPN is active and compare the result with the regular mvn command. Trace how the daemon or Maven handles the failed DNS lookup; done means the previously failing repository becomes resolvable after the network changes without restarting mvnd.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100