-
Notifications
You must be signed in to change notification settings - Fork 314
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
Intermittent RefreshError
with Internal Server Error
on metadata service
#1285
Comments
Hi @lawrenceong, We are working on adding these retries into the client layer. Once that is complete these errors will be retried automatically. Your workaround will work until then. We are not planning to add any more retries to this codebase to create a single source of retries. Thanks! |
We are using
|
I also see many google.auth.exceptions.RefreshError exceptions and 500 Internal Server Errors in the logs. Is there any solution to fix these from happening? |
Recently, we are getting intermittent
RefreshError
from python applications using google cloud services. The following is a stack trace:class:
<class 'google.auth.exceptions.RefreshError'>
message:
(\"Failed to retrieve http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/SA_NAME@PROJECT.iam.gserviceaccount.com/token?scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdevstorage.full_control%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdevstorage.read_only%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdevstorage.read_write from the Google Compute Engine metadata service. Status: 500 Response:\\nb'Internal Server Error\\\\n'\", <google.auth.transport.requests._Response object at 0x7f4b8a2320b0>)
traceback:
The Internal Server Error seems to be happening only on python based instances. To workaround these errors, a tenacity retry was added on the function. Sample retry:
We are using node to access google cloud storage as well and do not get anything similar.
Is there any reason why we would get "intermittent"
Internal Server Error
when trying to refresh a service account's token?Environment details
v1.25.7-gke.1000
- withpython:3.10-slim
image - based on debian bullseye3.10.11
23.1
google-auth
version:2.17.3
Steps to reproduce
Initialise the bucket via code and the issue will happen intermittently (around once every week). Code sample where issue is happening at startup of pod:
The text was updated successfully, but these errors were encountered: