Skip to main content

Pod Exit Codes

Porter uses Kubernetes under the hood. This means that all of your applications are Deployments with their individual Pods. These pods run containers inside of them which may crash because of a variety of errors.

We have compiled a list of the most common exit codes that may help you find the root cause of a crash.

Note: This list is non-exhaustive.

  • A valid exit code is between 0 and 255, 0 means that the container exited normally. You may find this to be the case with Job containers.
  • Generally speaking, if the container exited due to an internal signal then the exit code is between 1 and 128 and if it exited due to an external signal, the exit code is between 129 and 255.
  • The above will not hold true if the application programmer chooses to follow a different convention of using exit codes.

Typical exit codes

  • 137: indicates that the process was killed by SIGKILL. One possible reason is that the pod was out of memory.
  • 1 and 255: indicates common issues. Check container logs for further troubleshooting. For example, this could be the result of exit(1) or exit(-1). -1 is translated to 255.
  • 2: This could happen because of a misuse of a shell builtin when using Bash.
  • 126: A command was invoked that could not be executed by the system.
  • 127: Command was not found. Please check your $PATH or for a possible typo.
  • 128: Invalid argument to exit().
  • 130: Process terminated with Ctrl+C.

Note: Normally, an exit code of 128+n denotes the fatal signal n from the standard Linux interruption signals.