Skip to content

Exit codes

This page lists the exit codes the Outpost agent, the watchdog, and the Windows single-file installer return on an endpoint, for agent 0.2.0. Use it when a deployment tool, a script, or a service manager reports a number and you need to know whether anything is wrong. Several codes mean success or a planned restart, not a failure.

  • Programs: outpost-agent, outpost-watchdog (Windows only), and outpost-agent-setup.exe.
  • The commands and flags these codes belong to are described in the Agent command reference.
  • The Windows MSI is run by Windows Installer (msiexec), which returns the standard Windows Installer exit codes. They are not listed here.

These codes apply to every command except update, which has its own codes below.

CodeMeaningWhat to do
0The command finished.Nothing.
1The command failed. The reason is printed, or written to the agent log.Read the message, then the agent log.
2Unknown command or bad flags.Check the command against the Agent command reference.
3run found another copy of the agent already running. Not a crash.Nothing, if the service is running. Stop the service before you run the agent in a terminal.
4The agent installed an update of itself and must restart to run it. Not a failure.Nothing. The service manager starts it again on the new version.
5install found the agent’s service already defined. Not a failure.Restart the service to run the new version. See Code 5 from install.

On Linux, FreeBSD, OpenBSD, and macOS, install over an installed agent that runs the same binary rewrites the service definition to the one this version installs, and then exits with 5. It does not start, stop, or enable the service. The tarball’s install.sh and the macOS package read 5 as an upgrade and restart the service. When the installed service runs a different binary, nothing is changed. A definition that cannot be refreshed exits with 1 instead.

On Windows, install refuses if the OutpostAgent service exists, and exits with 1. Use the Windows installers instead.

The update command returns its own codes. It never returns 3, 4, or 5.

CodeMeaningWhat to do
0Up to date, or updated and the service came back on the new version. Also returned when the only newer build is held back because it was rolled back on this endpoint before.Nothing.
1The check, the install, or the restart failed, or the service did not come back on the new version within 90 seconds.Read the message, then the agent log.
2Bad flags or an extra argument.Check the flags: --check and --json.
10With --check: a newer agent or tray is available. Not a failure.Run outpost-agent update without --check to install it.
11Not run as an elevated administrator (Windows) or root, or the service refused the request.Run it again from an elevated prompt or as root.
12Nothing done: the last update is still on probation, or another update is running. Not a failure.Try again later. See Agent and tray updates.

The watchdog runs on Windows as the OutpostWatchdog service.

CodeMeaningWhat to do
0The watchdog stopped cleanly.Nothing.
1The watchdog failed.Read watchdog.log. See Where the logs are.
2Unknown command.Nothing. Windows starts the watchdog itself.
4The watchdog rolled back an agent update that did not confirm itself during probation, and must restart to run the restored version. Not a failure.Nothing. The service restarts on its own. The rolled-back version is not installed again on this endpoint.

The Windows single-file installer. Deployment tools read these codes.

CodeMeaningWhat to do
0Installed or uninstalled.Nothing.
1The person at the computer declined at the consent panel. Not a failure.Nothing, or agree the install with them. For deployment tools, see Run the single-file installer silently.
2Unknown flag or an extra argument.Check the options in the Agent command reference.
3The installer’s payload is missing or unreadable.Download the installer again.
4The built-in configuration is missing or unusable.Download a new installer from the console, or run it with --skip-config to install without enrolling.
5The installation failed.Read outpost-setup.log in the temporary folder of the account that ran the installer.
6Not run with administrator rights.Run it again as an administrator.

After --uninstall returns, the install folder can remain for a second or two while a copy of the uninstaller in %TEMP% removes it. A tool that checks for the folder at once may still see it.

When the agent or the watchdog runs as a Windows service, it does not pass these codes to Windows, because Windows would show them as unrelated system messages. Each service reports a Windows error code chosen for the text Windows shows in System event 7023.

Process codeServiceEvent 7023 reads
0EitherNo event 7023. The service stopped cleanly.
3OutpostAgent, already running“An instance of the service is already running.”
4OutpostAgent after an update, or OutpostWatchdog after a rollback“This application must be restarted.”
Any otherEither“An internal error occurred.” The cause is in the service’s own log.

Windows also logs event 7031, which says the service terminated unexpectedly and that the corrective action is to restart it. That event is the restart being scheduled. It follows every non-zero code, including a routine update.

Both services restart 5 seconds after the first failure, 30 seconds after the second, and 2 minutes after each further one. Windows resets the failure count after 15 minutes without a failure.

Content is licensed CC BY 4.0. Code samples are MIT. Outpost and the Outpost mark are trademarks of Outpost Business Solutions, PBC and are not covered by either license.