question

alessandro-vincenzi avatar image
2 Votes"
alessandro-vincenzi asked ·

Failing to deploy CosmosDB in MS Learn Sandbox

Hello
following the learning path on server less applications, there is a section where you have to deploy an Azure App service to run functions and then a CosmosDB for further binding.

After activating the sandbox, the deployment of the CosmosDB fails with the following message:

 {
 "code":"DeploymentFailed",
 "message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
 "details":[{"code":"BadRequest","message":"{\r\n \"code\": \"BadRequest\",\r\n \"message\": \"Free tier has already been applied to another Azure Cosmos DB account in this subscription. To apply free tier to this account, you can select another subscription for this account or delete the existing free tier account. You can have up to one free tier account per subscription.\\r\\nActivityId: dc28344f-d509-488e-95f9-a9d89a8155ac, Microsoft.Azure.Documents.Common/2.10.0\"\r\n}"}]
 }

The deployment fails with the error:

  • Free tier has already been applied to another Azure Cosmos DB account in this subscription.

  • To apply free tier to this account, you can select another subscription for this account or delete the existing free tier account.

  • You can have up to one free tier account per subscription.

The sandbox is brand new and there is nothing in the resource group except for the storage for the console provisioned by default.

Is there any workaround to get it deployed?

Sorry for the wrong tab. There is no way to use a new one. Only those predefined are usable.

not-supported-azure
· 3
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Try selecting Apply Free Tier Discount to Do Not Apply. After changing this option in my sandbox account, the deployment error was gone for me

2 Votes 2 ·

Using the "Do Not Apply" option for Free Tier worked for me as well. I thought perhaps Concierge subscription might not allow it but it worked.

0 Votes 0 ·

Hello Alessandro,

  1. Which region are you using ?

  2. How long did you have the Cosmos DB database account?

  3. Was this in the same subscription? Under the same Azure login?

Hoping to hear back from you.

Thanks.

0 Votes 0 ·
Monalla-MSFT avatar image
6 Votes"
Monalla-MSFT answered ·

Hello @alessandro-vincenzi,

Thanks for providing the issue resolution.

Yes, you are correct. Due to high demand of resources, there is an ongoing issue going on with the capacity allotment.


I hope this information helps. Please feel free to reach back out for any questions or concerns you may have in the future.






· 3 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Waiting for the sandbox to expire and having to try again, "many many times" over four days does not sound like much of a resolution. As someone else mentioned, this seems to be more of an issue with the sandbox expiring and not cleaning everything up. So that when the next time we try to create a sandbox CosmosDB, it thinks one already exists. Hopefully MS comes up with a resolution that way we are not all spending days trying to get through a 39 min module.

3 Votes 3 ·

Hi Monika,

Any news regarding the issue? if you have any way of forwarding the issue to the right support team would be great

Thanks

3 Votes 3 ·

Hello @admir,

Please send us an email at AzCommunity@Microsoft.com so we can work offline and post any findings that we may find in the thread here.

Subject : ATTN:Monika

I hope to hear back from you soon.

Thanks again for reaching out to us.

0 Votes 0 ·
alessandro-vincenzi avatar image
1 Vote"
alessandro-vincenzi answered ·

Hello Monika.

Just came back to my desk and found your answer.
The sandboxes stay open for 4 hours and the one I used was gone. I repeated the process enabling a new sandbox and logged into the portal. Now the deployment worked and the CosmosDB is there. Miracle.

Anyway, I had this problem many times before and there is another thread about this same same error. I'm not the only one. I had to go through this deployment many many times in the last four days and this last one mentioned above has been the only one that worked. The only workaround that i found was waiting for the sandbox to expire, logging out from the portal and the doc pages and repeat the same deployment.

I would add that most of the deployments that I tried in the last four days were failing because of the low availability of resources these days. The error message in this case asked to wait and try again. But every time i begun with a new sandbox I had the error about the "free tier already applied". New sandbox, new deployment, failure because of low resources, new deployment, failure on free tier and so on ...

My educated guess is that deployments of a Cosmos failing for the "lack of resources" leaves some traces.
The following deployment that you try sees the free tier already applied and fails, maybe because of something left dandling from the previous one.

Ok, issue solved.


· 2 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I have the same problem "Free tier has already been applied to another Azure Cosmos DB account in this subscription". In a brand new sandbox.


0 Votes 0 ·

Have you ever had any precedent CosmosDB faillure on a deployment? Fisrt one absolute?

0 Votes 0 ·
MadhoolikaSiruvuri-5787 avatar image
0 Votes"
MadhoolikaSiruvuri-5787 answered ·

Hi @alessandro-vincenzi , Based on your suggestion i tried to wait till the sanbox expired and re logged in , but still i am getting the same error. I have been trying out exercises for quiet sometime now, but its just now that i am experiencing this isuue.

@MonikaReddyNalla-0080 would you be able to help me out with the issue. ?

· 4 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MadhoolikaSiruvuri-5787, I too facing the same error even after the renewal of sandbox.

0 Votes 0 ·

@MadhoolikaSiruvuri-5787 & @PrabhulChandran-1583 - Please send us an email at AzCommunity@Microsoft.com so we can work offline and post any findings that we may find in the thread here.

Subject : ATTN:Monika

I hope to hear back from you soon.

Thanks again for reaching out to us.

0 Votes 0 ·

Me too is getting following error during my learning path. Waiting for your reply on this.

Free tier has already been applied to another Azure Cosmos DB account in this subscription

0 Votes 0 ·

Hello @AshishAnand-6808 - We have received your email and responded back with a follow up steps. Please let us know if you have any further questions or clarifirications required on the same.

0 Votes 0 ·
SlavaLovkiy-5743 avatar image
0 Votes"
SlavaLovkiy-5743 answered ·

Also stuck in training session being unable to create free tier CosmosDB account.
{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n \"code\": \"BadRequest\",\r\n \"message\": \"Free tier has already been applied to another Azure Cosmos DB account in this subscription. To apply free tier to this account, you can select another subscription for this account or delete the existing free tier account. You can have up to one free tier account per subscription.\\r\\nActivityId: f802b167-be01-4163-8354-07e948f8cc85, Microsoft.Azure.Documents.Common/2.11.0\"\r\n}"}]}

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Urielafs avatar image
0 Votes"
Urielafs answered ·

man... well it's free I guess we couldn't expect 100% fail proof.
I'll try to get my other badges that don't require cosmos db deployment

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JochenFranois-2936 avatar image
0 Votes"
JochenFranois-2936 answered ·

Hi, I'm having the exact same issue.

A screenshot of my activity-log indicates that it fails during the Deployment step. It was a brand new sandbox-env.



8616-screenshot-2020-05-24-at-091433.png



·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

admir avatar image
0 Votes"
admir answered ·

Hi Folks, not sure if it will work for others but i noticed, that for some reason there can be multiple Concierge Subscriptions then depending on this pick the resource group
Dont know why these are not cleared...
smrux1



link to screenshot https://prnt.sc/smrux1
hope this helps!

Cheers

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JayantDaruvuri-6054 avatar image
0 Votes"
JayantDaruvuri-6054 answered ·

{
"code": "BadRequest",
"message": "Free tier has already been applied to another Azure Cosmos DB account in this subscription. To apply free tier to this account, you can select another subscription for this account or delete the existing free tier account. You can have up to one free tier account per subscription.
}

  • Tried using another sandbox, but the issue didn't go away.

  • Unable to complete the Microsoft learn modules because of this error.

  • Tried creating the Cosmos DB in other regions and still have the same problem.

  • Can't progress on the Microsoft Learn website because of this issue.


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HarrietLawrie-8829 avatar image
0 Votes"
HarrietLawrie-8829 answered ·

I had an issue trying to provision resources in my region and I just went back to the create an account step and tried it again with a slightly different name and chose another nearby region and it worked.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

KannanU avatar image
6 Votes"
KannanU answered ·

Try selecting Apply Free Tier Discount to Do Not Apply.
After changing this option in my sandbox account, the deployment error was gone for me

· 6 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you, that worked for me also.

Within same sandbox:

  • Deleted failed deployment

  • Created new Azure CosmosDB with same Account name as per previous failed attempt

  • Selected 'Apply Free Tier Discount' to 'Do Not Apply'

  • Created CosmosDB successfully

4 Votes 4 ·
KKMuller avatar image KKMuller DavidCarrington-4893 ·

This approach worked for me. Thanks for that suggestion.

0 Votes 0 ·

Worked for me. Thanks

0 Votes 0 ·

This worked for me as well. I completed one of the Learn courses on one day, and started a second when I ran into this issue. Thanks!

1 Vote 1 ·

Hey . Thanks mate. THis solution works. i am able to deploy the Cosmos DB.

0 Votes 0 ·

Thank you. This worked for me.

0 Votes 0 ·