You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "marcuslinke (via GitHub)" <gi...@apache.org> on 2026/04/29 16:59:47 UTC
[I] Build metadata host lookup can block for ~30s on machines with unreachable DNS/mDNS [maven-build-cache-extension]
marcuslinke opened a new issue, #480:
URL: https://github.com/apache/maven-build-cache-extension/issues/480
### Affected version
1.2.2
### Bug description
While using the Maven Build Cache Extension locally (without remote caching configured), builds are delayed by multiples of ~30 seconds in environments where host name resolution is not available/reliable (e.g. corporate laptop without reachable DNS server, no mDNS response).
The delay appears to come from host name resolution in:
https://github.com/apache/maven-build-cache-extension/blob/master/src/main/java/org/apache/maven/buildcache/xml/Build.java#L64
`org.apache.maven.buildcache.xml.Build`
`InetAddress.getLocalHost().getHostName()` (around line 64)
This call is synchronous and can block until resolver timeout.
## Reproduction
Environment:
- macOS (corporate-managed laptop)
- no sudo/admin rights (cannot edit `/etc/hosts` or resolver settings)
- Maven build cache extension enabled
Observed resolver behavior:
- `time nslookup $(hostname)` -> timeout (~18s)
- `time dns-sd -G v4 $(hostname).local` -> hangs / does not return
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Build metadata host lookup can block for ~30s on machines with unreachable DNS/mDNS [maven-build-cache-extension]
Posted by "marcuslinke (via GitHub)" <gi...@apache.org>.
marcuslinke commented on issue #480:
URL: https://github.com/apache/maven-build-cache-extension/issues/480#issuecomment-4350369362
@olamy As the timeout occurs effectively only once at the first call to resolve() I think it might be okay to have it hardcoded. WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Build metadata host lookup can block for ~30s on machines with unreachable DNS/mDNS [maven-build-cache-extension]
Posted by "olamy (via GitHub)" <gi...@apache.org>.
olamy commented on issue #480:
URL: https://github.com/apache/maven-build-cache-extension/issues/480#issuecomment-4348001942
Good catch.
This definitely looks like a good solution. Maybe the timeout could be user configurable (to make it even shorter so in your case, you will not even waste this 1s, which can be long on large projects with a lot of modules)
Feel free to create a PR and I will look at it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Build metadata host lookup can block for ~30s on machines with unreachable DNS/mDNS [maven-build-cache-extension]
Posted by "olamy (via GitHub)" <gi...@apache.org>.
olamy commented on issue #480:
URL: https://github.com/apache/maven-build-cache-extension/issues/480#issuecomment-4350612597
> [@olamy](https://github.com/olamy) As the timeout occurs effectively only once at the first call to resolve() I think it might be okay to have it hardcoded. WDYT?
yeah that;s fine
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Build metadata host lookup can block for ~30s on machines with unreachable DNS/mDNS [maven-build-cache-extension]
Posted by "olamy (via GitHub)" <gi...@apache.org>.
olamy closed issue #480: Build metadata host lookup can block for ~30s on machines with unreachable DNS/mDNS
URL: https://github.com/apache/maven-build-cache-extension/issues/480
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org