We have a process that uses the request_logs feature to download logs from our GAE app for archival. This has stopped working unexpectedly in the last couple of days, apparently due to an oauth2 authentication issue. I'm not sure if this is a problem at our end, or on the GAE side, and I'm struggling to debug it.
My understanding is that when the oauth2 token has expired, it is refreshed automatically, but that process appears to fail. Here is what the logs downloader process log shows: python2.7 request_logs.py 2017-03-24 08:55:05,739 INFO root : Recovered sentinel with timestamp: 2017-03-22 09:39:59-07:00 08:55 AM Host: appengine.google.com 08:55 AM Downloading request logs for app my-gae-service version 4. 2017-03-24 08:55:05,757 INFO root : Request with offset None. 2017-03-24 08:55:05,757 INFO oauth2client.client: access_token is expired. Now: 2017-03-24 15:55:05.757671, token_expiry: 2017-03-23 23:54:13 2017-03-24 08:55:05,757 DEBUG google.appengine.tools.appengine_rpc: _Authenticate skipped auth; needs_auth=False 2017-03-24 08:55:05,757 DEBUG google.appengine.tools.appengine_rpc: Sending request to https://appengine.google.com/api/request_logs?app_id=my-gae-service&include_all=True&include_vhost=False&limit=1000&no_header=1&severity=1&version=4 headers={'X-appcfg-api-version': '1'} body= 2017-03-24 08:55:05,890 DEBUG google.appengine.tools.appengine_rpc: Got http error 401. 2017-03-24 08:55:05,890 DEBUG google.appengine.tools.appengine_rpc: Attempting to auth. This is try 1 of 3. 2017-03-24 08:55:05,890 INFO oauth2client.client: access_token is expired. Now: 2017-03-24 15:55:05.890322, token_expiry: 2017-03-23 23:54:13 2017-03-24 08:55:05,890 DEBUG google.appengine.tools.appengine_rpc: _Authenticate configuring auth; needs_auth=True 2017-03-24 08:55:05,890 DEBUG google.appengine.tools.appengine_rpc: Sending request to https://appengine.google.com/api/request_logs?app_id=my-gae-service&include_all=True&include_vhost=False&limit=1000&no_header=1&severity=1&version=4 headers={'X-appcfg-api-version': '1'} body= 2017-03-24 08:55:05,974 INFO oauth2client.client: Refreshing due to a 401 (attempt 1/2) 2017-03-24 08:55:05,975 INFO oauth2client.client: Refreshing access_token 2017-03-24 08:55:08,761 DEBUG google.appengine.tools.appengine_rpc: Got http error 500. 2017-03-24 08:55:08,761 DEBUG google.appengine.tools.appengine_rpc: Retrying. This is attempt 1 of 3. 2017-03-24 08:55:08,761 DEBUG google.appengine.tools.appengine_rpc: _Authenticate configuring auth; needs_auth=True 2017-03-24 08:55:08,761 DEBUG google.appengine.tools.appengine_rpc: Sending request to https://appengine.google.com/api/request_logs?app_id=my-gae-service&include_all=True&include_vhost=False&limit=1000&no_header=1&severity=1&version=4 headers={'X-appcfg-api-version': '1'} body= 2017-03-24 08:55:09,644 DEBUG google.appengine.tools.appengine_rpc: Got http error 500. 2017-03-24 08:55:09,644 DEBUG google.appengine.tools.appengine_rpc: Retrying. This is attempt 2 of 3. 2017-03-24 08:55:09,644 DEBUG google.appengine.tools.appengine_rpc: _Authenticate configuring auth; needs_auth=True 2017-03-24 08:55:09,644 DEBUG google.appengine.tools.appengine_rpc: Sending request to https://appengine.google.com/api/request_logs?app_id=my-gae-service&include_all=True&include_vhost=False&limit=1000&no_header=1&severity=1&version=4 headers={'X-appcfg-api-version': '1'} body= 2017-03-24 08:55:10,598 DEBUG google.appengine.tools.appengine_rpc: Got http error 500. 2017-03-24 08:55:10,598 DEBUG google.appengine.tools.appengine_rpc: Retrying. This is attempt 3 of 3. 2017-03-24 08:55:10,598 INFO root : Too many retries for url https://appengine.google.com/api/request_logs?app_id=my-gae-service&include_all=True&include_vhost=False&limit=1000&no_header=1&severity=1&version=4 Error 500: --- begin server output --- Server Error (500) A server error has occurred. --- end server output --- 2017-03-24 08:55:10,599 INFO root : Downloaded 0 logs Does anyone have any idea what may be wrong here? Thanks! -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/162b53b1-0949-4b9c-8076-2aa982129894%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.