Error: "Command failed: non-zero exit status"

Symptom

An agent is in an error state and is not successfully executing a CLI command specified in the script, and the following conditions are true:

  • The agent has the following error:

    Command failed: non-zero exit status
  • In the Action Result Output dialog box, the output of the CLI command is the following:

    Cannot execute command. Command not allowed.
  • The switch is configured to use a remote authentication and authorization service, such as TACACS+.

Cause

Network Analytics Engine (NAE) scripts execute CLI commands as the admin user, and do not attempt to authenticate before executing the CLI command. The remote authentication and authorization service is not allowing the admin user to execute commands without prior authentication.

Action
Configure the remote authentication and authorization service to allow authorization without authentication for the admin user.