Email Template step failure

I am trying to create an email template that runs at the end of my deploy. However I cannot see the actual failure message. Both Octopus.Deployment.Error and Octopus.Step.Status.ErrorDetail are giving me “One or more child activities failed.” which is not a very helpful error message. I would like to get the actual error that the step produced, such as out of disk space etc… Am I looking in the wrong place? I am using the suggested email template.

Hi,

Thanks for getting in touch. We fixed this issue (https://github.com/OctopusDeploy/Issues/issues/2216) in Octopus 3.2.12 late last year. Can you tell me what version of Octopus you’re currently using? If you’re using this version or newer, can you attached your full raw log (http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task) so I can try to diagnose it further.

Looking forward to you reply.

Rob

Hi,
Sorry it’s taken me a bit to get back to you. We are using version 3.3.3. I broke the deploy using a powershell script it just throws an error “This is the error I want to see”

When I get the email it just says One or more child activities failed.

This is the email template.

#{if Octopus.Deployment.Error}Error: #{Octopus.Deployment.Error}#{/if}#{unless Octopus.Deployment.Error}Success#{/unless} deploying #{Octopus.Project.Name} #{Octopus.Release.Number} to #{Octopus.Environment.Name}

Initiated by #{unless Octopus.Deployment.CreatedBy.DisplayName}#{Octopus.Deployment.CreatedBy.Username}#{/unless} #{if Octopus.Deployment.CreatedBy.DisplayName}#{Octopus.Deployment.CreatedBy.DisplayName}#{/if} #{if Octopus.Deployment.CreatedBy.EmailAddress} (#{Octopus.Deployment.CreatedBy.EmailAddress})#{/if} at #{Octopus.Deployment.Created}

#{if Octopus.Release.Notes}

Release notes

#{Octopus.Release.Notes}

#{/if}

Deployment process

The deployment included the following actions:

    #{each action in Octopus.Action}
  • #{action.Name} #{if action.Package.NuGetPackageId}— #{action.Package.NuGetPackageId} version #{action.Package.NuGetPackageVersion}#{/if}
  • #{/each}

View the detailed deployment log.

Task summary

    #{each step in Octopus.Step} #{if step.Status.Code}
  1. #{step | HtmlEscape} — #{step.Status.Code} #{if step.Status.Error}
    #{step.Status.Error | HtmlEscape}
    #{step.Status.ErrorDetail | HtmlEscape}
    #{/if}
  2. #{/if} #{/each}

This is the email I get.

Error: One or more child activities failed. deploying Dynamics AX 2.0.8 to Dynamics AX Test

Initiated by Daniel Guenter (Daniel.Guenter@memoryexpress.commailto:%20Daniel.Guenter@memoryexpress.com) at Wednesday, April 6, 2016 9:12:52 AM

Deployment process

The deployment included the following actions:

  • Break Build
  • Install MemX.PS.Core.Module — MemX.PS.Core.Module version 1.0.0.11
  • Install MemX.PS.SQL.Module — MemX.PS.SQL.Module version 1.0.0.6
  • Install MemX.PS.AX.Module — MemX.PS.AX.Module version 1.0.0.26
  • Get AOS Config
  • Dynamics AX - AOS Disable Batch Processing
  • PRTG - Pause Monitoring
  • Stop CDX Realtime Services
  • Stop CDX Async Client Services
  • Stop CDX Async Server Services
  • Dynamics AX - AOS Drain Users
  • Dynamics AX - Stop AOS
  • SQL - Backup Database AOS
  • SQL - Backup Database AOS Model
  • Dynamics AX - Import ModelStore — MemX.AX.AOS.ModelStore version 1.0.1.60
  • Dynamics AX - Apply ModelStore Schema
  • Dynamics AX - HG - Set VCS Version
  • Dynamics AX - AOS Import Data
  • Dynamics AX - Start AOS
  • Dynamics AX - Import Environment Data
  • Dynamics AX - Synchronize Database
  • Dynamics AX - Initialize Data
  • Dynamics AX - Publish Reports
  • Dynamics AX - Restore Channel Database
  • Dynamics AX - Update Channel Database — MemX.POS.Setup.ChannelDB version 6.3.100.80
  • Start CDX Async Server Services
  • Start CDX Realtime Services
  • Start CDX Async Client Services
  • PRTG - Resume Monitoring
  • Dynamics AX - AOS Enable Batch Processing
  • Dynamics AX - Publish POS — MemX.POS.Setup version 2.0.7.1
  • Email Status

View the detailed deployment loghttp://build.memoryexpress.com:8090/app#/deployments/Deployments-341.

Task summary

  1. Break Build — Failed

One or more child activities failed.

Octopus.Shared.Tasks.ActivityFailedException: One or more child activities failed.

at Octopus.Shared.Tasks.ParallelWorkOrder`1.AssertAllCompletedTasksThusFarAreSuccessful() in Y:\work\refs\tags\3.3.2\source\Octopus.Shared\Tasks\ParallelWorkOrder.cs:line 78

at Octopus.Shared.Tasks.ParallelWorkOrder`1.Execute() in Y:\work\refs\tags\3.3.2\source\Octopus.Shared\Tasks\ParallelWorkOrder.cs:line 33

at Octopus.Shared.Tasks.OctoParallel.ForEach[T](IEnumerable1 workItems, Nullable1 maxParallelism, Action`1 executeCallback, CancellationToken cancellation) in Y:\work\refs\tags\3.3.2\source\Octopus.Shared\Tasks\OctoParallel.cs:line 20

at Octopus.Server.Orchestration.Deploy.DeploymentTaskController.DistributeStepAcrossMachines(PlannedStep step) in Y:\work\refs\tags\3.3.2\source\Octopus.Server\Orchestration\Deploy\DeploymentTaskController.cs:line 187

at Octopus.Server.Orchestration.Deploy.DeploymentTaskController.DispatchStep(PlannedStep step) in Y:\work\refs\tags\3.3.2\source\Octopus.Server\Orchestration\Deploy\DeploymentTaskController.cs:line 81

  1. Install MemX.PS.Core.Module — Skipped
  2. Install MemX.PS.SQL.Module — Skipped
  3. Install MemX.PS.AX.Module — Skipped
  4. Get AOS Config — Skipped
  5. Dynamics AX - AOS Disable Batch Processing — Skipped
  6. PRTG - Pause Monitoring — Skipped
  7. Stop CDX Realtime Services — Skipped
  8. Stop CDX Async Client Services — Skipped
  9. Stop CDX Async Server Services — Skipped
  10. Dynamics AX - AOS Drain Users — Skipped
  11. Dynamics AX - Stop AOS — Skipped
  12. SQL - Backup Database AOS — Skipped
  13. SQL - Backup Database AOS Model — Skipped
  14. Dynamics AX - Import ModelStore — Skipped
  15. Dynamics AX - Apply ModelStore Schema — Skipped
  16. Dynamics AX - AOS Import Data — Skipped
  17. Dynamics AX - Start AOS — Skipped
  18. Dynamics AX - Import Environment Data — Skipped
  19. Dynamics AX - Synchronize Database — Skipped
  20. Dynamics AX - Initialize Data — Skipped
  21. Dynamics AX - Publish Reports — Skipped
  22. Dynamics AX - Restore Channel Database — Skipped
  23. Dynamics AX - Update Channel Database — Skipped
  24. Start CDX Async Server Services — Skipped
  25. Start CDX Realtime Services — Skipped
  26. Start CDX Async Client Services — Skipped
  27. PRTG - Resume Monitoring — Skipped
  28. Dynamics AX - AOS Enable Batch Processing — Skipped
  29. Dynamics AX - Publish POS — Skipped
  30. Email Status — Running

ServerTasks-1915.log.txt (6 KB)

Hi,

First, I’m very sorry for the long delay in following-up. I was able to reproduce the issue as you described and it’s definitely a different bug to the one I originally mentioned. I found we previously had an issue for this issue but it was closed. I’ve re-opened it and you can track it’s progress at the following URL. https://github.com/OctopusDeploy/Issues/issues/1872

Thanks

Rob