Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calls to metadataConfig getAttribute can hang #4398

Closed
dmichel1 opened this issue Jan 23, 2019 · 1 comment
Closed

calls to metadataConfig getAttribute can hang #4398

dmichel1 opened this issue Jan 23, 2019 · 1 comment
Assignees
Labels
api: core type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@dmichel1
Copy link

#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

@ajaaym
Copy link
Contributor

ajaaym commented Jan 23, 2019

@dmichel1 makes sense. PR would be good too.

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jan 23, 2019
@JesseLovelace JesseLovelace added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: core and removed triage me I really want to be triaged. labels Jan 24, 2019
dmichel1 added a commit to dmichel1/google-cloud-java that referenced this issue Jan 26, 2019
Otherwise callers of these methods can be waiting indefinitely.

googleapis#4398
dmichel1 added a commit to dmichel1/google-cloud-java that referenced this issue Feb 8, 2019
Otherwise callers of these methods can be waiting indefinitely.

googleapis#4398
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: core type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants