The resource 'Deployments-XXXX' was not found

Hi Team,

We have a release pipeline which pushes new package on all tenants everyday. But during some schedule runs we are getting below error and the task gets failed.

2022-03-28T18:04:45.8937871Z The resource ‘Deployments-3165098’ was not found.
2022-03-28T18:04:45.8944620Z Error from Octopus Server (HTTP 404 NotFound)
2022-03-28T18:04:45.8950141Z Exit code: -7
2022-03-28T18:04:45.9243567Z ##[error]"Failed to deploy release. The process ‘C:\hostedtoolcache\windows\octo\7.4.3663\x64\octo.cmd’ failed with exit code 4294967289
Error: The process ‘C:\hostedtoolcache\windows\octo\7.4.3663\x64\octo.cmd’ failed with exit code 4294967289
at ExecState._setResult (D:\a_tasks\OctopusDeployRelease_8ca1d96a-151d-44b7-bc4f-9251e2ea6971\3.1.57\node_modules\azure-pipelines-task-lib\toolrunner.js:942:25)
at ExecState.CheckComplete (D:\a_tasks\OctopusDeployRelease_8ca1d96a-151d-44b7-bc4f-9251e2ea6971\3.1.57\node_modules\azure-pipelines-task-lib\toolrunner.js:925:18)
at ChildProcess. (D:\a_tasks\OctopusDeployRelease_8ca1d96a-151d-44b7-bc4f-9251e2ea6971\3.1.57\node_modules\azure-pipelines-task-lib\toolrunner.js:838:19)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
2022-03-28T18:04:45.9318565Z ##[section]Finishing: Tenanted: UAT US

Is this issue caused when octopus is trying to log in [dbo].[DeploymentHistory] table in octopus DB and it fails to log that particular deployment? or this issue is occurring since we are using deprecated version 3.* for our Task on azure devops?

please help to mitigate above issue.
[Note: Release Gets successful sometimes and sometimes it gets failed with above error]

Ritvij Iyer

Hi @ritvij05,

Thanks for reaching out and welcome to the Octopus community!

While upgrading to the latest devops plugin version would bring a bunch of improvements, I don’t think that using version 3 is the root cause of the issue here.

As it’s able to complete ok sometimes, I’m thinking this could be a timing issue where the deployment hasn’t yet been written to the database before it’s being requested. Are you currently using using Deployment Target Triggers to kick off these deployments or do you have a seperate Deploy a Release build step?

I’d be happy to explore further if that’s not the case or you have any questions, feel free to let me know how you get on!

Best Regards,

Hi @finnian.dempsey ,
Thanks for the response.

We are using Deployment Target Triggers.
Whenever azure build pipeline creates a package, New release gets created in our octopus project. Please refer below image.

In our octopus project we have single process which consists of PowerShell script which executes sql scripts on multiple tenants.


Below is image for how our azure release pipeline looks.

Every time we encounter above error in step 4 (Tenanted: UAT US).

Ritvij Iyer

Hi @ritvij05,

Just jumping in here for Finnian as he is currently off shift as part of our Australian based team. Thank you for those screenshots they help us paint a picture of how your instance is set up.

With regards to that, are we able to get a bit more information on your environment setup such as if you are running a HA instance, are you using load balancers in your environment and could those possibly affect any connections to SQL servers?

It is interesting that the deployment seems to be sometimes failing as soon as it gets to the Tenanted deployments. Does it fail only on the Tenanted: UAT US step? What happens if you disable that step does the deployment run successfully?

I look forward to hearing from you but please reach out in the meantime if you need anything else,

Kind Regards,

Clare Martin

Hi @clare.martin ,
Yes, It only fails for Tenanted: UAT US. Is it because of huge number of tenants we have on EAST US? we have around 150-200.

Currently we have cloned Tenanted: UAT US task into multiple task to divide the tenant count based on tenant IDs.

We will test above changes and let you know if that works or still need anything from your end.

Thanks for the Support!!

Ritvij Iyer

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