-1

I published an Azure app service, using the default Flask template and then started making minor additions. The site ran well and all, but then all of a sudden, after one commit, all that's getting displayed is The page cannot be displayed because an internal server error has occurred. - how am I supposed to work with that? Where can I see an actual error log?

FYI I have reverted back to the previous, last known working version of the site (the web.config was being edited in later commits and publishes), but it doesn't work now.

How do I make Azure tell me what's wrong?

Vince Bowdren
  • 8,326
  • 3
  • 31
  • 56
Christofer Ohlsson
  • 3,097
  • 4
  • 39
  • 56
  • How did you come to the conclusion it's Azure generating the error, and not something related to configuring error output with python/Flask? – David Makogon Jan 06 '17 at 13:01
  • Azure/IIS is working as server and as I've only been making changes (which I've since reverted) to web.config - how can tihs be Flask's doing? – Christofer Ohlsson Jan 06 '17 at 13:02
  • Okay, my virtualenv on the Azure server had gotten deleted. Not sure why, I just added it to .gitignore. Oh well, the culprit is I, as always. – Christofer Ohlsson Jan 06 '17 at 14:17
  • Glad you solved it. It would be great if you could post a proper answer, so this can be closed out accordingly. – David Makogon Jan 06 '17 at 14:47

1 Answers1

2

I would recommend using the streaming logs in the Azure Portal:

enter image description here

It would give you more details on the errors and also the log outputs if your app has them.

feranto
  • 497
  • 4
  • 14
  • 1
    Thanks. The application log gives me a bunch of html that produces the familiar looking IIS 500.0 Error page. It points to Python's FastCgiModule. But doesn't seem to be able to help beyond that. – Christofer Ohlsson Jan 06 '17 at 13:51
  • 1
    In the diagnostic logs menu, you can play with all the different log possibilities, enabling and disabling some of them my reduce the unnecessary html page log, for you to focus on the real error. https://learn.microsoft.com/en-us/azure/app-service-web/media/web-sites-streaming-logs-and-console/diagnostic-logs.png – feranto Jan 06 '17 at 13:58
  • I found I had to add WSGI_LOG to the App Settings - see https://blogs.msdn.microsoft.com/azureossds/2015/07/14/troubleshoot-logging-python-application-errors-on-azure-webapi-apps/ – Colin Pickard Jul 18 '17 at 05:56