Reputation: 168
I am trying to execute a script on multiple VM(2 servers for now) from Azure devops pipeline. Invocation of script is being done via Invoke-AzureRmVMRunCommand.
My issues: on first VM command is executing without any issues. But on second VM, I am getting below error:
2019-07-21T08:35:00.5804498Z ##[error]Run command extension execution is in progress. Please wait for completion before invoking a run command. ErrorCode: Conflict
ErrorMessage: Run command extension execution is in progress. Please wait for completion before invoking a run command.
StatusCode: 409
ReasonPhrase: Conflict
How can I avoid this error?
Upvotes: 3
Views: 15588
Reputation: 674
Solution 1: you can see what commands is executed in Azure portal below, then you can cancel the running command.
Solution 2: directly shutdown your VM, then start it and try to run commands again.
Upvotes: 1
Reputation: 21
I actually ran into this problem- although I had no other pipelines running simultaneously and my VMs in azure all appeared fine- I went ahead and did a restart on all in the resource group that would be affected. When I verified their restart succeeded, I re-ran the pipeline without issue.
"Did you try turning it off and on again?"
-Moss (The IT Crowd)
Upvotes: 1
Reputation: 21
Well- I ran into this- and it was happening because I had 4 pipelines- and I was kicking them off manually, simultaneously. They each had a restore DB action that was trying to happen at the same time.
Only kick off your pipelines that restore DBs on the same VMs one at a time.
Upvotes: 0
Reputation: 61
You can restart the server if possible, or you can wait 2hrs to timeout the session.
Upvotes: 2
Reputation: 168
Answering my own question:
Looks like one of the VM had some hung processes. When I rebooted both VMs, the VM which had issue generated an output file before restart.
Post restart, I am not getting the same issue again. Please look from this angle also If you are facing this issue.
Upvotes: 3