skip to Main Content

We were using RedHat Openshift for hosting and deploying our application.

Everything was working fine untill recently the deployments using DeploymentConfig just started throwing ‘Crashloop backoff error’ with not much logs and fails as soon as we try to deploy.

Even using the old code which was working is now failing. Only deployments of already existing images in imagestreams can be deployed.

Any new deployment, will come and sit in image streams from nexus, but as soon as we edit the tag in deplymentconfig the pods will throw ‘Crashloop backoff error’ and then reverting to the old image

We tried checking with older code commits which used to work even they are failing.

2

Answers


  1. A crash in the container during startup will often result in a CrashLoopBackOff error. In my daily practice of addressing this issue, I check the logs of the failing pod. Even if the pod crashes immediately, there should be logs that can provide an indication of what went wrong.

    oc logs <pod_name> --previous
    

    The --previous flag will show the logs from the pod’s previous instance, which is the one that crashed.

    Additionally, in some cases, you can inspect the YAML file in the deployment configuration, as it may contain error logs as well. Good luck!

    Login or Signup to reply.
  2. I would check the following options:

    • The application running in your container panics and dies.
    • Liveness probe failed.
    • Readiness probe failed (I would try to increase initialDelaySeconds).
    • Openshift has FIPS mode enabled but the deployed application/operator pod is
      not FIPS complaint, (Federal Information Processing Standards).
    • The container image needs to run as a specific user (manage_scc).
    • The process started inside the image isn’t a long running process and finds no tty and the container just exits and gets restarted repeatedly (crash loop in OpenShift).
    • A base image is being used and there is no long running command that would keep this container alive.

    You may try the following if the previous steps did not help:

    • Check ENTRYPOINT.
    • Try running your image locally.
    • Did you try oc describe pod ?
    • You can try oc debug – it will create a copy of the pod and provide you a shell.

    Reference: CrashLoopBackOff status for Openshift Pod

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search