calls to metadataConfig getAttribute can hang #4398
Labels
api: core
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
#4278 changed the hostname of the metadata service to be the FQDN. For whatever reason my companies internal dns resolvers actually return the the IP address of the metadata service.
From what I can gather the default timeout for
HttpURLConnection
[1] is forever which would explain why my service fails to startup when running locally.This happens to me when running the latest google-cloud-core which is 1.6.0.
It seems like it would be a sane thing to add a timeout to the HTTP request. I can submit a PR to do this if others agree.
[1] https://github.com/googleapis/google-cloud-java/blob/master/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/MetadataConfig.java#L73
The text was updated successfully, but these errors were encountered: