Azure Powershell CloseError: Long running operation failed with status 'NotFound'


We have a step in our database deployment process executing an Azure Powershell Script.

The step:

  • Deletes an Azure SQL Database
  • Waits 10 minutes or so
  • Restores the deleted database from a backup

During this process today we encountered the error:

CloseError: Long running operation failed with status 'NotFound'.

Now although the step failed because of the above the database did get restored.

Now I feel this error probably came from Azure (from research on the internet), rather than Octopus timing out or the like.

Can anyone confirm or not whether it was likely to be Azure rather than Octopus from the follow deployment log extract?



14:28:32   Info     |       Variable run condition was evaluated as true, so "Restore database on database deployment failure" will be run.
14:29:06   Info     |       Awaiting 10 minutes to ensure database deletion complete...
14:39:04   Info     |       Restore delete database *xyz* from PiTR: 2021-05-20T13:17:53.2207910Z
14:39:09   Info     |       Existing Deleted Databases Deletion Dates
14:39:09   Info     |       @{DeletionDate=20/05/2021 13:28:50}
14:39:09   Info     |       End of Deleted Databases Deletion Dates
14:39:09   Info     |       Database Deletion Date to restore 05/20/2021 13:28:50
14:39:09   Info     |       Restoring database...
14:43:30   Error    |       CloseError: Long running operation failed with status 'NotFound'.
14:43:30   Error    |       At C:\Octopus\Work\20210520132832-25283-31\Script.ps1:29 char:1
14:43:30   Error    |       + Restore-AzureRmSqlDatabase -FromDeletedDatabaseBackup -DeletionDate $ ...
14:43:30   Error    |       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14:43:30   Error    |       at <ScriptBlock>, C:\Octopus\Work\20210520132832-25283-31\Script.ps1: line 29
14:43:30   Error    |       at <ScriptBlock>, <No file>: line 1
14:43:30   Error    |       at <ScriptBlock>, C:\Octopus\Work\20210520132832-25283-31\Octopus.FunctionAppenderContext.ps1: line 116

Hey John,

Thanks for reaching out.

You are correct, this looks to be an error from Azure and not Octopus.

Please let me know if you have any other questions or concerns regarding it, or if I can help in any other way with this.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.