Help Center/ ModelArts/ Troubleshooting/ Inference Deployment/ Service Deployment/ Exit Code 127 Is Reported During Service Deployment
Updated on 2025-09-10 GMT+08:00

Exit Code 127 Is Reported During Service Deployment

Symptom

When you save a custom image and deploy it as a real-time service, you see the error "The failed container exited with ExitCode:127."

Possible Causes

  • Image configuration issue: The image does not contain the required dependencies or tools.
  • Script or command error: The deployment script contains commands that cannot be executed.
  • Permission issues: The script or command does not have the execute permission.
  • Resource issues: Resources are insufficient when the service is started.

Solution

  • Check the image configuration:
    • Check whether the image contains all necessary dependencies and tools.
    • If a custom image is used, ensure that all dependencies are installed correctly.
  • Check the script or command:
    • Check whether the commands used in the deployment script are correct and can be used in the image.
    • If the script contains custom commands, ensure that the paths are correct.
  • Check the permission settings:

    Ensure that the script file has the execute permission. You can run the following command to add the execute permission:

    chmod +x your_script.sh
  • Check the resources:
    • If resources are insufficient during service startup, adjust the service's resource specifications (such as the CPU and memory).
    • If the service is deployed in a public resource pool, wait until the resources are released and try again.
  • Recreate the service:

    If the problem continues, recreate the service.

  • Other suggestions:

    If the problem continues, contact Huawei Cloud technical support and provide detailed logs and environment information for further troubleshooting.