Runtime Overview Exit codes

Last modified by Carlijn Kokkeler on 2024/09/17 15:13

In this document, we will use the information from the actual root cause analysis to make a generic view that can be used if you run into the same or a similar problem in the future. The focus will be on providing insights into what is an exit code, the main exit codes returned by a container when it stops and how can that help you to resolve your problem.  

Should you have any questions, please get in touch with academy@emagiz.com.

1. Key concepts

In a previous microlearning we explained that a container can have multiple statuses. Among these, there is the status Exit which is returned by the container uppon stopping and comes together with a code. The exit code usually points out the reason why the container stopped. In the section below we describe the most common exit codes that you can encounter in eMagiz.

rca-knowledgebase-runtime-overview-exit-codes.png  

2. Exit code values

  • Exited with code 0
    • The application inside the container completed its work successfully without any errors.
  • Exited with code 1
    • There was a general error in the application, which could be due to a variety of reasons like incorrect arguments or a failed dependency. 
    • For example when you are missing a property value.
  • Exited with code 125
    • The docker run command was not executed successfully. 
    • This usually occurs when eMagiz fails to execute a certain command on that container, e.g. Start, Stop.
  • Exited with code 126
    • The command inside the container was found but cannot be executed. This can be due to permission issues or if the command is not executable. 
    • For example, when eMagiz is running on premises and the permissions are incorrectly configured.
  • Exited with code 127
    • The command was not found. This usually happens if a script is missing or the path is not set correctly.
  • Exited with code 137
    • The container was forcefully stopped
    • This happens when the container exceeds its memory resource limit (OOM).
  • Exited with code 139
    • The application inside the container crashed due to a segmentation fault, which is usually caused by accessing memory that the process does not have permission to access.
        
  • Exited with code 143
    • The container stopped gracefully after receiving the operating system's SIGTERM signal, which instructs the container to do so.
    • For example, when you command the container to stop via Deploy Architecture or when eMagiz stops the container, e.g. Stop Machine deployment step.
        
  • Exited with code 255
    • Container exited, returning an exit code outside the acceptable range, meaning the cause of the error is not known.

3. Suggested Additional Readings