Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Remediation Jobs fail with "Could not initiate execution"

    Scheduled Pinned Locked Moved Support
    otter
    2 Posts 2 Posters 6 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      williamb_5729
      last edited by

      I have just begun evaluating Otter. I currently have a Windows 2012 R2 instance running the Otter Agent.

      The server is a member of the IIS role, which itself is a member of the Configurable role.

      The Configurable role has a plan that is defined as:

      ##AH:UseTextMode
      call Ensure-PowerShell-5();
      

      The Ensure-PowerShell-5 module is stored in a Git based Raft, named Default. The module itself is defined as:

      ##AH:UseTextMode
      ##AH:Description Ensure PowerShell version 5 or later is installed.
      module Ensure-PowerShell-5
      {
          # Ensure PowerShell version 5 or later is installed
          {
              PSEnsure
              (
                  Key: PowerShell-v5,
                  Value: True,
                  Collect: $PSVersionTable.PSVersion.Major -ge 5,
                  Configure: '@(Get-Service | Where-Object {$_.Name -eq "INEDOBMAGT"}).Count',
                  Debug: true,
                  Verbose: true
              );
      
              # Only executes if PSEnsure Configure executed
              Restart-Server();
          }
      }
      

      The Ensure-PowerShell-5 module is currently incomplete, but it does properly detect configuration drift. When attempting to remediate the drift by choosing the Remediate with Job button on the Servers page, the execution fails.

      The Service log contains the error:

      Category: ExecutionDispatcherRunner
      Message: Could not initiate execution #334
      Details: 
      System.NullReferenceException: Object reference not set to an instance of an object.
      at Inedo.Otter.Service.Executions.ActiveJobExecution.<BuildConfigurationExecuter>d__4.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Inedo.Otter.Service.Executions.ActiveJobExecution.<CreateJobExecutionAsync>d__3.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Inedo.Otter.Service.Executions.ActiveExecution.<CreateAsync>d__3.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Inedo.Otter.Service.Executions.ExecutionDispatcherRunner.<RunAsync>d__7.MoveNext()
      

      Orchestration Plans will run successfully.

      Any assistance in determining the cause of this failure would be greatly appreciated. As it stands, I can detect drift, but am unable to remedy the situation.

      Product: Otter
      Version: 2.0.11

      1 Reply Last reply Reply Quote 0
      • T Offline
        thoven
        last edited by

        This was resolved in the latest release of Otter (v2.0.12 at the time of posting).

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post
        Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation