Skip to content

Retry http failures in ServiceAccountCredentials.refreshAccessToken #91

@garrettjonesgoogle

Description

@garrettjonesgoogle

As reported in googleapis/google-cloud-java#1545 , users have seen failures in ServiceAccountCredentials.refreshAccessToken, which has no retries on the http call. These failures should be retried.

java.io.IOException: Error getting access token for service account:
         at com.google.auth.oauth2.ServiceAccountCredentials.refreshAccessToken(ServiceAccountCredentials.java:319)
         at com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:149)
         at com.google.auth.oauth2.OAuth2Credentials.getRequestMetadata(OAuth2Credentials.java:135)
         at com.google.auth.http.HttpCredentialsAdapter.initialize(HttpCredentialsAdapter.java:96)
         at com.google.cloud.HttpServiceOptions$1.initialize(HttpServiceOptions.java:224)
         at com.google.api.client.http.HttpRequestFactory.buildRequest(HttpRequestFactory.java:93)
         at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:423)
         at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
         at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
         at com.google.cloud.storage.spi.DefaultStorageRpc.create(DefaultStorageRpc.java:245)
         ... 10 more
 Caused by: java.net.SocketTimeoutException: connect timed out
  ...

Metadata

Metadata

Labels

🚨This issue needs some love.triage meI really want to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions