Recently I worked on an issue where the customer was trying to create a Service Bus using Python code, however the creation of Service Bus was failing with the following error.
"The server encountered an internal error. Please retry the request"
Because Python was using REST API and the communication was encrypted so my troubleshooting guideline was as simple as described below:
Get-AzurePublishSettingsFile -> Save the the PublishSettingsFile
Import-AzurePublishSettingsfile "<Filename\Path>.publishsettings"
NEW-AzureSBNameSpace testSB101
PUT https://management.core.windows.net/<SubID>/services/servicebus/namespaces/testSB101 HTTP/1.1
Content-Type: application/xml
type: entry
charset: utf-8
x-ms-version: 2012-03-01
Host: management.core.windows.net
Expect: 100-continue
Content-Length: 373
<entry xmlns="http://www.w3.org/2005/Atom">
<content type="application/xml">
<NamespaceDescription xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Region>East US</Region>
</NamespaceDescription>
</content>
</entry>
6.Once I had the proper REST API information, I decided to give a quick try with 3rd party called Burp and tried to create the Service Bus using REST API calls. This blog describes how to configure BURP connecting Windows Azure Management Portal.
The above steps verified the correct way to use REST API, the information can be used with any REST support language. You can use above steps to troubleshoot any REST Api specific issues.
Note: Thanks to Avkash Chauhan for his input on this post.