How to debug issues with Azure Web Apps Part 1 – using Kudu

At work we have 2 Azure WebApp’s in 2 different regions in the world, we deployed the same code using a CI/CD pipeline and in one region the website returns a 404 error message.

So the following is some information and things I started looking into in order to try to diagnose the problem.

 

The website uses Azure Traffic Manager so that users in one part of the world get directed to lets say webapp1 and the others go to webapp2 (the one which isn’t working), we also have a custom domain name for our site and I mention this so that I can use something called Kudu.

Kudu what is that you ask? – well you can learn about Kudu here: – Kudu

Ok back to the problem at hand.

So to use kudu you add .scm. before the azure web app name like so https://<your web app name goes here>.scm.azurewebsites.net/ into a browser

This in our case looks like so: –

 

So what can I get out of using Kudu, it turns out you can find out quite a fair bit of information around your running webapp.

Here is a quick list of what you can find out using just the environments tab within kudu

  • System info
  • AppSettings
  • Connection Strings
  • Environment variables
  • Path
  • HTTP Headers
  • Server Variables

Debug Console
Allows you to choose CMD (a command window) or PowerShell window where you can actually see the list of files on the server where the webapp is running and do loads more.

 

Or if you prefer PowerShell instead.

 

This is very cool as you can see the list of files you have deployed, check version numbers and do all manner of things including the following:-

  • View the System Files
  • Add folders and files
  • Delete / Edit / Download individual files

So who says you don’t get access to the files on your Azure WebApp deployment 🙂

Process Explorer

  • View the running processes on the server
  • Get a memory dump of processes

Tools

    • Diagnostic Dump
    • WebJobs Dashboard
    • WebHooks
    • Zip Push Deploy
    • Download Deployment Script
    • Support

Site Extensions
View a list of extensions you’ve added to your Azure WebApp

I am off to go poke around and use these tools to see what I can find.

In the next post I will show you how to setup and use diagnostic logs to look more into the actual issue I am facing, but for now enjoy Kudu.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s