Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the queue domain on my azure storage account missing?

I have successfully create a storage account on Azure with the following settings:

  • Deployment: Resource manager
  • Type: General Purpose (Standard)
  • Replication: ZRS

On the Azure portal I can see a "Blobs" service and if I click on it, I can create blob containers under the blob domain: https://[account_name].blob.core.windows.net/

So far so good.

When I try to create a queue using the Azure SDK in a C# app I get the error that it can't find the domain for [account_name].queue.core.windows.net .

I've been following the Microsoft tutorials for creating a storage account and getting a simple queue working and I can't see any other steps the create this "queue" domain. On the Azure portal itself, I can't find any other options to create a Queue or Queue service.

The code I'm using for reference:

var storageAccount = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings["AzureWebJobsStorage"].ToString());

var blobClient = storageAccount.CreateCloudBlobClient();
var blobContainer = blobClient.GetContainerReference("export");
blobContainer.CreateIfNotExists();

var queueClient = storageAccount.CreateCloudQueueClient();
var exportQueue = queueClient.GetQueueReference("export-requests");
exportQueue.CreateIfNotExists();

The call to create the blob container succeeds and I can see the new container in the Azure Portal. The call to create the queue fails with the following exception:

An exception of type 'Microsoft.WindowsAzure.Storage.StorageException' occurred in Microsoft.WindowsAzure.Storage.dll but was not handled in user code

Additional information: The remote name could not be resolved: '[account_name].queue.core.windows.net'
like image 477
Paulo Pinto Avatar asked Jun 02 '16 17:06

Paulo Pinto


People also ask

How do I find my Azure queue?

Sign in to the Azure portal. Navigate to your storage account. In the Monitoring section, click Diagnostic settings. Choose queue as the type of storage that you want to enable logs for.

How do I connect to Azure storage queue?

Navigate to the Azure portal. Locate your storage account. In the Settings section of the storage account overview, select Access keys. Your account access keys appear, as well as the complete connection string for each key.

Where is my storage account connection string?

You can find your storage account's connection strings in the Azure portal. Navigate to SETTINGS > Access keys in your storage account's menu blade to see connection strings for both primary and secondary access keys.


1 Answers

The reason you're getting this error is because ZRS storage accounts only support Blob Storage (and that too Block Blobs only). From this blog post: https://blogs.msdn.microsoft.com/windowsazurestorage/2014/08/01/introducing-zone-redundant-storage/ (see section Using a ZRS account)

Since ZRS accounts do not support page blob, file, table or queue, any attempt to create or manipulate those objects on a ZRS storage account will fail.

If you want to use queues, you need to choose another redundancy level. At this time following types of storage account redundancy levels support queues - LRS, GRS, and RAGRS. Currently it is not possible to change a ZRS account into LRS/GRS/RAGRS account. Thus you would need to create a new storage account.

like image 138
Gaurav Mantri Avatar answered Nov 14 '22 23:11

Gaurav Mantri