tencent cloud

Feedback

Container Process Exits

Last updated: 2024-12-13 14:48:39
    This article describes several scenarios that can cause containers to exit and provides instructions on how to troubleshoot these issues.

    Error Description

    When a container exits (not killed by external sources), the exit code is usually between 0 and 128. 0 indicates a normal exit and 1-127 indicates exits due to exceptions. For example, if an application detects that its launch parameters or conditions are not met or the application panics but the exception is not handled, the application will exit. Refer to Using Exit Codes to Troubleshoot Pod Exceptions for more information on container exit code details.

    Possible Causes

    Failure to resolve DNS
    Application configuration issues

    Troubleshooting

    Checking for DNS resolution failures

    If the application relies on the cluster DNS service, unresolved DNS requests will cause the application to throw exceptions and exit. For example, if the application needs to connect to the database when it launches and the database uses a service name or external domain name that needs to be resolved by a DNS server. Unresolved DNS requests lead to application exception and exit. Possible causes are as follows:
    The cluster network is not functioning properly, and Pods cannot connect to the DNS service.
    The DNS service not functioning properly and cannot respond to requests.
    The service name or domain name is unresolvable.

    Checking for application configuration issues

    If the application is not configured properly, this can also result in the application exiting. Possible causes are as follows:
    The configuration file is not correctly formatted. The application fails to resolve the configuration when launching, which leads to exceptions and exit.
    The configuration values do not meet requirements. For example, a missing required field value will cause the configuration to fail verification, which leads to application exceptions and exit.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support