ccy
ccy

Reputation: 1863

Download logs from Google App Engine with server errors

I try to download the logs from my Google App Engines with the command:

appcfg.py request_logs [directory]  mylogs.txt

However, I encountered the server error as below:

C:\Program Files (x86)\Google\google_appengine>appcfg.py request_logs E:\PhD\cod
e\python\webDevelop\similarAPI\similarAPI/  mylogs.txt
05:22 PM Application: similarapi
05:22 PM Host: appengine.google.com
05:22 PM Downloading request logs for app similarapi version 1.
Error 500: --- begin server output ---


Server Error (500)

A server error has occurred.
--- end server output ---

I have looked at the official document and related Stack Overflow questions, but no clues are found. Actually I can get the logs in Dec, 2016 but not now. And I tried it for one week without the success, so it should not be the error of Google's infrastructure.

Does anyone know how to solve that problem? Thanks in advance.

Upvotes: 3

Views: 551

Answers (2)

ccy
ccy

Reputation: 1863

Finally, it has be proved that it is a bug of Google's infrastructure from 22 Mar to 10 Apr, 2017. Three related bug reports can be seen in the Google Issue Tracker 36637246, 37192011, 36969442.

Now the command appcfg.py request_logs [directory] mylogs.txt works well.

Upvotes: 0

Dan Cornilescu
Dan Cornilescu

Reputation: 39814

Just a workaround, not a direct answer.

The GAE SDK might be getting a bit less attention compared to the cloud SDK (which is the recommended one lately). I, for one, can't even get as far as you got since appcfg.py request_logs can't properly detect my multi-service app from its directory and was not happy with any syntax attempt I made to specify it via args.

But I have the cloud SDK installed as well and I was able to get the logs for my app using gcloud app logs read (after setting up the gcloud context for my app)

FWIW, this isn't yet enough to make me switch, I'm still primarily a GAE SDK user. YMMV.

Upvotes: 1

Related Questions