Title: Intermittent Cloud Datastore Error: Unauthorized: 401 ... Unable to find the server at accounts.google.com · Issue #3085 · googleapis/google-cloud-python · GitHub
Open Graph Title: Intermittent Cloud Datastore Error: Unauthorized: 401 ... Unable to find the server at accounts.google.com · Issue #3085 · googleapis/google-cloud-python
X Title: Intermittent Cloud Datastore Error: Unauthorized: 401 ... Unable to find the server at accounts.google.com · Issue #3085 · googleapis/google-cloud-python
Description: I am getting regular, but intermittent errors when using GCL to read from the datastore. The stacktrace is below. I am running Python 2.7 on Ubuntu. I get this error only occasionally when I call the get_multi function. It is intermitten...
Open Graph Description: I am getting regular, but intermittent errors when using GCL to read from the datastore. The stacktrace is below. I am running Python 2.7 on Ubuntu. I get this error only occasionally when I call t...
X Description: I am getting regular, but intermittent errors when using GCL to read from the datastore. The stacktrace is below. I am running Python 2.7 on Ubuntu. I get this error only occasionally when I call t...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/3085
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Intermittent Cloud Datastore Error: Unauthorized: 401 ... Unable to find the server at accounts.google.com","articleBody":"I am getting regular, but intermittent errors when using GCL to read from the datastore. The stacktrace is below. I am running Python 2.7 on Ubuntu. \r\n\r\nI get this error only occasionally when I call the `get_multi` function. It is intermittent and looks like it could be a network error based on the very last line (`Unable to find the server at accounts.google.com.`). I am making thousands of calls to the datastore, and while this occurs only a small percent of the time, it occurs with pretty heavy regularity (about once a minute).\r\n\r\n```\r\n File \"/home/speedplane/DA/djangoappengine/db_gcl/compiler.py\", line 349, in get_matching_pk\r\n self.client.get_multi(self.included_pks, **config)\r\n File \"/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/client.py\", line 307, in get_multi\r\n transaction_id=transaction and transaction.id,\r\n File \"/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/client.py\", line 124, in _extended_lookup\r\n transaction_id=transaction_id,\r\n File \"/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/_http.py\", line 519, in lookup\r\n lookup_response = self._datastore_api.lookup(project, lookup_request)\r\n File \"/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/_http.py\", line 304, in lookup\r\n return self._stub.Lookup(request_pb)\r\n File \"/usr/lib/python2.7/contextlib.py\", line 35, in __exit__\r\n self.gen.throw(type, value, traceback)\r\n File \"/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/_http.py\", line 260, in _grpc_catch_rendezvous\r\n raise error_class(exc.details())\r\nUnauthorized: 401 Traceback (most recent call last):. File \"src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi\", line 154, in grpc._cython.cygrpc.plugin_get_metadata (src/python/grpcio/grpc/_cython/cygrpc.c:6918). File \"/usr/local/lib/python2.7/dist-packages/grpc/_plugin_wrapping.py\", line 107, in __call__. AuthMetadataPluginCallback(wrapped_cygrpc_callback)). File \"/usr/local/lib/python2.7/dist-packages/google/auth/transport/grpc.py\", line 65, in __call__. callback(self._get_authorization_headers(), None). File \"/usr/local/lib/python2.7/dist-packages/google/auth/transport/grpc.py\", line 51, in _get_authorization_headers. self._credentials.refresh(self._request). File \"/usr/local/lib/python2.7/dist-packages/google/oauth2/service_account.py\", line 313, in refresh. request, self._token_uri, assertion). File \"/usr/local/lib/python2.7/dist-packages/google/oauth2/_client.py\", line 143, in jwt_grant. response_data = _token_endpoint_request(request, token_uri, body). File \"/usr/local/lib/python2.7/dist-packages/google/oauth2/_client.py\", line 104, in _token_endpoint_request. method='POST', url=token_uri, headers=headers, body=body). File \"/usr/local/lib/python2.7/dist-packages/google_auth_httplib2.py\", line 119, in __call__. raise exceptions.TransportError(exc).TransportError: Unable to find the server at accounts.google.com.\r\n```\r\n\r\nThat last line in the stacktrace above has its own stacktrace built-in. I've expanded it below for ease of reading:\r\n\r\n```\r\nUnauthorized: 401 Traceback (most recent call last):.\r\n File \"src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi\", line 154, in grpc._cython.cygrpc.plugin_get_metadata (src/python/grpcio/grpc/_cython/cygrpc.c:6918).\r\n File \"/usr/local/lib/python2.7/dist-packages/grpc/_plugin_wrapping.py\", line 107, in __call__.\r\n AuthMetadataPluginCallback(wrapped_cygrpc_callback)).\r\n File \"/usr/local/lib/python2.7/dist-packages/google/auth/transport/grpc.py\", line 65, in __call__.\r\n callback(self._get_authorization_headers(), None).\r\n File \"/usr/local/lib/python2.7/dist-packages/google/auth/transport/grpc.py\", line 51, in _get_authorization_headers.\r\n self._credentials.refresh(self._request).\r\n File \"/usr/local/lib/python2.7/dist-packages/google/oauth2/service_account.py\", line 313, in refresh.\r\n request, self._token_uri, assertion).\r\n File \"/usr/local/lib/python2.7/dist-packages/google/oauth2/_client.py\", line 143, in jwt_grant.\r\n response_data = _token_endpoint_request(request, token_uri, body).\r\n File \"/usr/local/lib/python2.7/dist-packages/google/oauth2/_client.py\", line 104, in _token_endpoint_request.\r\n method='POST', url=token_uri, headers=headers, body=body).\r\n File \"/usr/local/lib/python2.7/dist-packages/google_auth_httplib2.py\", line 119, in __call__.\r\n raise exceptions.TransportError(exc).TransportError: Unable to find the server at accounts.google.com.\r\n```\r\n\r\nI am running this within a Docker container orchestrated by Kubernetes. My Dockerfile inherits from `ubuntu:trusty`. Below is version information:\r\n```\r\n# lsb_release\r\nLSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch\r\n# python --version\r\nPython 2.7.6\r\n```","author":{"url":"https://github.com/speedplane","@type":"Person","name":"speedplane"},"datePublished":"2017-03-01T00:54:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/3085/google-cloud-python/issues/3085"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4e465148-9a10-2524-8f6d-996706205049 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FF2:1C418C:24E74C4:351F8D0:6A4D18C5 |
| html-safe-nonce | 8916190bc07457d5c94fd999ca574bd13df4decdfcf9d4982c503570d05a0d47 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkYyOjFDNDE4QzoyNEU3NEM0OjM1MUY4RDA6NkE0RDE4QzUiLCJ2aXNpdG9yX2lkIjoiODkyNzgwMDA0Mjk1OTIxNDc4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 324ff203584f797272470f180850900eee931b1103522db695910cebbd03d9fa |
| hovercard-subject-tag | issue:210948402 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/3085/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8b2abd4bac7f8eff70e4fc9842c205c3a2bfee764276023c7d61c60620f21f24/googleapis/google-cloud-python/issues/3085 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8b2abd4bac7f8eff70e4fc9842c205c3a2bfee764276023c7d61c60620f21f24/googleapis/google-cloud-python/issues/3085 |
| og:image:alt | I am getting regular, but intermittent errors when using GCL to read from the datastore. The stacktrace is below. I am running Python 2.7 on Ubuntu. I get this error only occasionally when I call t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | speedplane |
| hostname | github.com |
| expected-hostname | github.com |
| None | bcb4661e6fb4fe8b394c51ea02ccdb2236d40dc59afc75a3bbba50bf6517134c |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fb70bd3c4b2bec429781b65419e912c66e2d5581 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width