Why does podman logs show initial journal cursor error for rootless user?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 8
  • Podman

Issue

  • podman logs <container_name> for rootless users reports with below error:

     Error: initial journal cursor: failed to get cursor: cannot assign requested address
    

Resolution

Edit file/etc/containers/containers.conf by changing the log_driver as k8s-file and uncomment events_logger as journald.

   # vi containers.conf           
   log_driver = "k8s-file"      <-- changing log_driver
   events_logger = "journald"   <-- uncomment events_logger

Root Cause

Red Hat does not recommend journald as log_driver for rootless users because rootless users are member of WHEEL group.

Diagnostic Steps

  • Run podman along with --log-driver as journald.

    # podman run \
    --name example \
    --hostname test \
    --detach \
    --restart=unless-stopped \
    --security-opt seccomp=$PATH\
    --log-driver journald \ ubi8
    
  • Check for error in container log.

    # podman logs <container_name>
    Error: initial journal cursor: failed to get cursor: cannot assign requested address
    

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