GoogleCloudPlatform / ai-on-gke

AI on GKE is a collection of examples, best-practices, and prebuilt solutions to help build, deploy, and scale AI Platforms on Google Kubernetes Engine
Apache License 2.0
183 stars 140 forks source link

oauth2/google: invalid token JSON from metadata: EOF #634

Open kzos opened 2 months ago

kzos commented 2 months ago
  1. I am getting below error , when i tried to apply terraform following readme on url

    Error: Error when reading or editing Project "reasearchdeployment": Get "https://cloudresourcemanager.googleapis.com/v1/projects/reasearchdeployment?alt=json&prettyPrint=false": oauth2/google: invalid token JSON from metadata: EOF │ │ with data.google_project.project, │ on main.tf line 27, in data "google_project" "project": │ 27: data "google_project" "project" {

  2. Below are the service list , please advise what all needs to be enabled.

    gcloud services list | grep api NAME: analyticshub.googleapis.com NAME: bigquery.googleapis.com NAME: bigqueryconnection.googleapis.com NAME: bigquerydatapolicy.googleapis.com NAME: bigquerymigration.googleapis.com NAME: bigqueryreservation.googleapis.com NAME: bigquerystorage.googleapis.com NAME: cloudapis.googleapis.com NAME: cloudtrace.googleapis.com NAME: dataform.googleapis.com NAME: dataplex.googleapis.com NAME: datastore.googleapis.com NAME: logging.googleapis.com NAME: monitoring.googleapis.com NAME: servicemanagement.googleapis.com NAME: serviceusage.googleapis.com NAME: sql-component.googleapis.com NAME: storage-api.googleapis.com NAME: storage-component.googleapis.com NAME: storage.googleapis.com

Note: I am already owner of the project and i guess I enabled oauth( but please let me know how to check this).

image

kzos commented 2 months ago

workloads_tfvars.txt fyr:-> this is the file i used.

roberthbailey commented 2 months ago

It looks like you are installing the ray application - is that correct?

Did you do step 3 in https://github.com/GoogleCloudPlatform/ai-on-gke/tree/main/applications/ray?

gcloud auth application-default login

The error you are getting looks like an authentication error.

kzos commented 2 months ago

yes , I ran that, do i need to enable any oauth API's?

roberthbailey commented 2 months ago

You should not need to enable any APIs to authenticate. If you run gcloud auth application-default print-access-token do you get a valid token as output?