6

When I recreate my VM I got the following error:

Problem occurred during request to Azure services. Cloud provider details: Unable to edit or replace deployment 'VM-Name': previous deployment from '8/20/2019 6:20:33 AM' is still active (expiration time is '8/27/2019 5:17:41 AM'). Please see https://aka.ms/arm-deploy for usage details.

Help me please to understand. What could be the cause of the error ?


UPDATED:

This deployment has not been started previously. Prior to this, errors were received during creation:

Azure is not available now. Please Try again later

There were several such errors one at a time and then I got that error related to:

Unable to edit or replace deployment

My assumptions about this. Tell me, am I right or not ?

I launched the image, then after some time I recreated it. Creation began, but at that moment the connection with Azure was lost. Then, when the connection was restored, we tried to make a deployment that was not removed in the previous attempt (because there was no connection with Azure). As a result, we got such an error.

Does this theory make sense?

Kirill Sereda
  • 469
  • 1
  • 10
  • 25

4 Answers4

6

This can also occur if you use Bicep templates for your ARM deployement and multiple modules or resources in the template have the same name:

module fooModule '../modules/foo.bicep' = {
   name: 'foo'
}

module barModule '../modules/bar.bicep' = {
   name: 'foo'
}
Darrell
  • 1,905
  • 23
  • 31
5

exactly what it says, there is another deployment with the same name going on at this time, either change the name of the deployment you are trying to queue or wait for the other deployment to finish\fail

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
  • I updated my question. Do you think this has a place to be? – Kirill Sereda Nov 16 '19 at 08:12
  • I'm not sure what the actual question is, if you wait max of 2 hours deployment will fail and you can restart it. or you can go to the portal and cancel it (or using the sdk) – 4c74356b41 Nov 16 '19 at 09:49
  • I understand you, thank you. I would also like to know at least an approximate reason why this could happen. – Kirill Sereda Nov 16 '19 at 09:53
  • well, this will ALWAYS happen as you try to create a deployment with the same name as the one that already exists and is running. if you try to create a deployment with the same anem and it is failed or completed it will overwrite it – 4c74356b41 Nov 16 '19 at 09:59
  • they think they did not have it. your guess is wrong. the error posted by the op originally clearly indicates what is the fault. in reality deployments can hang for more than 2 hours (and can be created by somebody else in the company). please assume a person who works 60h\week on azure stuff and has about 3k upvotes in the tag knows a thing or two about azure. – 4c74356b41 Mar 26 '21 at 12:24
  • Just to add my 2c on this, I ran into this recently as I do reuse the deployment name and the deployment was hung with a 500 Gateway Timeout. Canceling and re-running the job gave the "DeploymentActive" error. Solution was to delete the deployment and start fresh. – RiverHeart May 19 '23 at 18:29
0

I got the same error initially pipeline was working but when retriggered pipeline took more time so i canceled the deployment and made a fresh rerun it encounters. i think i need wait until that deployment filed.

  • 3
    I think this qualifies as an answer, but you might want to polish it a little according to [answer] and maybe take the [tour]. – Yunnosch Jan 31 '23 at 15:42
0

Go to azure portal. Choose the resource group and click 'Deployments' under the setting. Find running deployment, cancel or restart deployment.

Tun
  • 824
  • 3
  • 16
  • 30