Thanks to visit codestin.com
Credit goes to github.com

Skip to content

calls to metadataConfig getAttribute can hang #4398

@dmichel1

Description

@dmichel1

#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

Metadata

Metadata

Assignees

Labels

api: coretype: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions