TrueSight Orchestration / Atrium Orchestrator PowerShell adapter returns exit code 259 instead of error output

Version 1
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BMC Atrium Orchestrator Base Adapters


    APPLIES TO:

    BMC Atrium Orchestrator Content 20.xx.xx TrueSight Orchestration Content 20.xx.xx



    PROBLEM:

     

    The PowerShell adapter for TrueSight Orchestration / BMC Atrium Orchestrator does not return the full error from commands that fail. Instead, when a command fails the adapter returns a generic error:

      

    <output>
      <line index="1">Copyright 2010 BMC Software Ltd, Version: 1.5  </line>
      <line index="2">Connecting to remote service...</line>
      <line index="3">Connected to remote host.</line>
      <line index="4">The pipe is being closed.</line>
      <line index="5">Error while reading hRemoteStdErrorPipe: ListenRemoteStdOutputPipeThread()</line>
      <line index="6">Remote application exited with code: 259 </line>
    </output>

      

    This means a workflow cannot know what the error is and respond to it appropriately.

     


    CAUSE:

    The adapter uses an xCMD utility that only consumes output streams, so it fails to process the data written on error streams. The utility does not process the actual output.


    SOLUTION:

    Versions 20.16.01 and later of the PowerShell adapter include the parameter <redirect-error-to-success-output-stream>, which tells the adapter whether to redirect the command output error stream to the success output stream. Set this parameter to "true" in your adapter configuration or request. For more information about this parameter, see the page "Configuring the PowerShell adapter" in the TrueSight Orchestration documentation.


    Article Number:

    000106068


    Article Type:

    Solutions to a Product Problem



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles