Profile picture of Liam Moat

Liam Moat

Principal Engineer at Microsoft

Azure App Services - Ping with Kudu

By Liam Moat. . 2 minutes read.

Working with Azure App Services often involves an element of networking. A straight forward example could include making a request to an internet routable web service. You might be using a Hybrid Connection to access an on-premise resource. A more complex scenario could involve a Virtual Network and Azure’s ExpressRoute. If any of these sound familiar, you will probably have wanted to try and ping your target endpoint.

If you were running on a virtual machine, that would be easy. Remote desktop to the machine, open up CMD and start “pinging”. But, what about App Services?

In App Services, we turn to Kudu and the built in Debug Console. You can access the embedded Console directly in the App Service blade. Or, you can access it from your site’s Kudu services - go to https://[siteName] and select Debug Console from the navigation page.

Figure 1: Console

Tip: To get a full list of commands available just type help and hit enter.


App Service instances block ICMP (Internet Control Message Protocol), so you can’t use the traditional ping command.

Unable to contact IP driver. General failure. 

Fortunately, Azure provides an alternative - tcpping. This opens a TCP socket to a target, using the hostname and port, and returns whether the initial handshake was successful and a connection was established.

Connected to, time taken: 115ms
Connected to, time taken: <1ms
Connected to, time taken: 1ms
Connected to, time taken: <1ms
Complete: 4/4 successful attempts (100%). Average success time: 29ms

Other Commands

In addition to tcpping there are two additional commands that you should find useful when troubleshooting network issues with App Services.


Attempt to resolve any given hostname and see what DNS information is available to the App Service instance.


Non-authoritative answer:


It is great to see curl is available in the Debug Console on App Services. Amongst its many purposes and use cases, the most common is likely to be troubleshooting that HTTP endpoints not only resolve, but return a valid response - in a timely manner.


I hope you find these three commands as useful as I do on a daily basis. Take a look at the Kudu wiki to discover some more really useful features you need when managing App Services.