Profile Image
shaikasiefhussain

Exiting with code 143

I am running a talendui as pods in Kubenretes and it terminating with exit code 143

 

Report URL - https://gceasy.io/my-gc-report.jsp?p=c2hhcmVkLzIwMjMvMDkvNC9nYy5sb2dzLS05LTMyLTIw&channel=WEB

  • exitingwithcode143

  • talendui

  • kubernetes

  • sigtermsignal

Please Sign In or to post your comment or answer

Profile Image

sainath

Hello shaikasiefhussain,

 

After reviewing the GC log report you provided, I have noticed that your application has been allocated only 120mb of memory. I am concerned if this amount is enough for your application to run smoothly. Inadequate memory allocation may result in an out-of-memory (OOM) condition, which can cause an exit with code 143. I suggest investigating further if this amount of memory is sufficient for your application's needs: 

  1. Normal Termination: A pod can receive a SIGTERM signal when it's being gracefully terminated, typically by a Kubernetes control plane component, or by a user when deleting a pod or scaling down a deployment. In this case, the application should have a chance to clean up any resources and exit gracefully.

  2. Custom Signal Handling: Your application code may have custom signal handling, where it responds to SIGTERM by doing specific actions before exiting. Check your application code for any signal handling logic.

  3. Kubernetes Configuration: Review your Kubernetes deployment or pod configuration to ensure that there are no unusual termination conditions or preStop hooks that might be sending SIGTERM.

  4. Logs: Inspect the logs of your pod to see if there are any error messages or indications of what might be causing it to receive the SIGTERM signal.

  5. Resource Limits: Ensure that you've set appropriate resource limits and requests for CPU and memory in your pod configuration. Resource constraints can lead to unexpected terminations.

  6. Container Health: Check the health of the container itself. It might be experiencing crashes due to a bug or an external issue.

  7. Check Dependencies: If your application relies on external services or dependencies, ensure that those services are available and responsive.

  8. Kubernetes Events: Look at Kubernetes events for your pod and node to see if there are any relevant events that provide more information about the termination.

  9. Kubernetes Version: Sometimes, issues like this can be related to the version of Kubernetes or the underlying infrastructure. Make sure you are running a stable and supported version.

 

Profile Image

Mahesh

Hello Shaikasief,

 

The code 143 indicates that the pod was terminated gracefully by the signal SIGTERM. 

  1. Pod may be terminated if it exceeds its allocated resources such as CPU or Memory 

    and the Kubernetes cluster needs to reclaim those resources. In this case, Kubernetes sends a SIGTERM signal to the pod to allow it to clean up before termination.

  2. If your application within the pod is crashing or encountering issues, it might terminate itself or be terminated by Kubernetes. In such cases, Kubernetes sends a SIGTERM signal to initiate a graceful shutdown.

 

In order to troubleshoot the problem, you can:

  1. Check the Kubernetes events and logs for the pod to see if there are any relevant messages or errors. You can use the kubectl describe pod <pod-name> command to inspect events.

  2. Review your application's logs to identify any issues that might be causing it to terminate prematurely.

Profile Image

Kishore Josyula

Hi Shaikasiefhussain,

 

I investigated a similar issue and found java.lang.OutOfMemoryError: Java heap space error in the Pod console logs. You can look for similar errors in the console or app logs to understand the exact cause of the problem. From the GC logs attached, the resource allocation on the pod looks small, You can consider increasing the app memory depending on the error message you see in the logs. 

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • exitingwithcode143

  • talendui

  • kubernetes

  • sigtermsignal