Skip to content

Local Cocoon servers fail with "Failed host lookup: 'metadata.google.internal'" #129651

Closed
flutter/cocoon
#3364

Description

@CaseyHillers

The flutter-dashboard project is locked down, and seems to be missing read access to the flutter team. These ACLs are needed for developers to run the servers locally.

Local verification

cd cocoon/auto_submit
export GOOGLE_CLOUD_PROJECT=flutter-dashboard
dart bin/server.dart # Fails

Current failure

$ dart bin/server.dart 
Unhandled exception:
Failed host lookup: 'metadata.google.internal'
#0      IOClient.send (package:http/src/io_client.dart:94:7)
<asynchronous suspension>
#1      BaseClient._sendUnstreamed (package:http/src/base_client.dart:93:32)
<asynchronous suspension>
#2      MetadataServerAuthorizationFlow._getScopes (package:googleapis_auth/src/oauth2_flows/metadata_server.dart:89:22)
<asynchronous suspension>
#3      Future.wait.<anonymous closure> (dart:async/future.dart:525:21)
<asynchronous suspension>
#4      MetadataServerAuthorizationFlow.run (package:googleapis_auth/src/oauth2_flows/metadata_server.dart:63:21)
<asynchronous suspension>
#5      clientFromFlow (package:googleapis_auth/src/oauth2_flows/base_flow.dart:27:25)
<asynchronous suspension>
#6      clientViaMetadataServer (package:googleapis_auth/src/metadata_server_client.dart:43:5)
<asynchronous suspension>
#7      clientViaApplicationDefaultCredentials (package:googleapis_auth/auth_io.dart:95:10)
<asynchronous suspension>
#8      _obtainStorageService (package:appengine/src/appengine_internal.dart:237:22)
<asynchronous suspension>
#9      _initializeAppEngine (package:appengine/src/appengine_internal.dart:175:26)
<asynchronous suspension>
#10     _withAppEngineServicesInternal.<anonymous closure> (package:appengine/src/appengine_internal.dart:102:45)
<asynchronous suspension>
#11     main (file:///Users/chillers/cocoon/auto_submit/bin/server.dart:22:3)
<asynchronous suspension>

Activity

  1. CaseyHillers commented on Jun 27, 2023

    @CaseyHillers
    ContributorAuthor

    @drewroengoogle do you know how I can map metadata.google.internal to an existing ACL? I haven't ran Cocoon servers locally since ~January 2022, which seems to align with the GCP ACL changes.

    \cc @Hixie for developing the triage bot

  2. drewroengoogle commented on Jun 27, 2023

    @drewroengoogle
    Contributor

    @drewroengoogle do you know how I can map metadata.google.internal to an existing ACL?

    Off the top of my head, I'm not sure. I will take a look either this afternoon or tomorrow and see if I can find the permissions that are needed to get this working!

  3. drewroengoogle commented on Jun 28, 2023

    @drewroengoogle
    Contributor

    @CaseyHillers Did you run into this while you were already logged in via gcloud auth login? I can reproduce this, but only if I don't have .config/gcloud/application_default_credentials.json set. Otherwise, the client is created via my credentials as shown here.

  4. CaseyHillers commented on Jul 5, 2023

    @CaseyHillers
    ContributorAuthor

    Thanks! That worked for me.

    It would help to have package:gcloud check for authentication, then throw a more help exception.

    I'm running into other issues where most of https://cloud.google.com/appengine/docs/standard/nodejs/runtime#environment_variables needs to be defined before I can run a local instance.

  5. drewroengoogle commented on Jul 18, 2023

    @drewroengoogle
    Contributor

    Thanks! That worked for me.

    It would help to have package:gcloud check for authentication, then throw a more help exception.

    I'm running into other issues where most of https://cloud.google.com/appengine/docs/standard/nodejs/runtime#environment_variables needs to be defined before I can run a local instance.

    Sorry, I meant to follow up on this earlier. I know we have an internal link (go/flutter-cocoon-internal) that specifies some of the variables that need to be set. Are there additional ones beyond what is documented there that are being required?

  6. CaseyHillers commented on Aug 15, 2023

    @CaseyHillers
    ContributorAuthor

    I'm seeing this in a brand new service. As my work around, I've created bin/local_server.dart which skips the AppEngine zone

  7. yusuf-goog commented on Sep 7, 2023

    @yusuf-goog
    Contributor

    Anything still needs to be done here?

  8. CaseyHillers commented on Sep 7, 2023

    @CaseyHillers
    ContributorAuthor

    Splitting bin/server.dart into a smaller script, bin/local_server.dart that skips the appengine zone will fix this.

  9. flutter-triage-bot commented on Sep 20, 2023

    @flutter-triage-bot

    This issue is missing a priority label. Please set a priority label when adding the triaged-infra label.

  10. flutter-triage-bot commented on Sep 22, 2023

    @flutter-triage-bot

    This issue is missing a priority label. Please set a priority label when adding the triaged-infra label.

  11. github-actions commented on Jan 17, 2024

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

team-infraOwned by Infrastructure team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions