Pod logs being truncated on OpenShift

Solution Verified - Updated -

Environment

  • Red Hat OpenShift Service on AWS [ROSA]
    • 4.x
  • Red Hat OpenShift Dedicated [OSD]
    • 4.x
  • Azure Red Hat OpenShift [ARO]
    • 4.x
  • Red Hat OpenShift Container Platform [RHOCP]
    • 4.x

Issue

  • Why are my pod logs truncated?
  • My OpenShift Console is truncating my pod logs.

Resolution

  • If the issue is observed from both OpenShift Console and from oc command, it could be an indication that your application is truncating the logs. For example, the application could be using a wrapper process which controls stdout.
  • If only the OpenShift Console is truncating the logs, please check for special and/or unicode characters in your logs messages. If that is not the case, please open a support case for further analysis.

Diagnostic Steps

  1. Using the OpenShift Console, on the Logs tab for the impacted pod, try to open the Raw file in another window or Download the log file to check if the logs appear truncated.

  2. Also confirm if the logs are being truncated by accessing the pod logs via oc command:

    $ oc logs <pod name> -n <namespace>
    

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments