BSA: NSH script job ends with Exit Code 13 or 141

Version 1

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


    BladeLogic Server Automation Suite


    BMC BladeLogic Server Automation Suite



    NSH script job ends with Exit Code 13 or 141




    Defect QM002067423



    The exit code 13 indicates a broken pipe.  In cases when the NSH Script exits normally with a zero exit code but then the NSH Script Job shows a exit code 13, this indicates that an open connection established to the target during the execution of the script was not closed and when the Job Run was shutting down.

    One possible mitigation is to ensure to close any connections to remote servers after establishing them by running something like:

    <nsh command> cd //@; disconnect ${NSH_RUNCMD_HOST}

    Exit Code 141 is a combination of errors 128 and 13 which gives you 141 and the same disconnect command may address the connection issue with that error as well. 

    This issue is resolved in 8.9.02 by defect QM002067423


    Article Number:


    Article Type:

    Solutions to a Product Problem

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