Skip to content

Can't get logs for a crashlooping pod #5417

Closed

Description

@sosiouxme

If my pod keeps crashing (in this case due to external dependency missing) it gets put into CrashLoopBackOff state. The problem then is that you can't get logs in that state so it's hard to figure out why it's crashing.

# oc get pods
NAME                          READY     STATUS             RESTARTS   AGE
logging-kibana-1-rsjx9        1/2       CrashLoopBackOff   15         3d
# oc logs logging-kibana-1-rsjx9 kibana
Error from server: Internal error occurred: Pod "logging-kibana-1-rsjx9" in namespace "logging" : pod is not in 'Running', 'Succeeded' or 'Failed' state - State: "Pending"

I think it would be better if CrashLoopBackOff state were counted the same as Failed for log access purposes.

Activity

  1. deads2k commented on Oct 27, 2015

    @deads2k
    Contributor

    This changed at some point. I'm on a much older build at home, but I can check crash looping logs.

  2. 0xmichalis commented on Oct 27, 2015

    @0xmichalis
    Contributor

    Is docker logs working?

  3. sosiouxme commented on Oct 27, 2015

    @sosiouxme
    MemberAuthor

    I should mention the context: This is from our latest internal OSE 3.1 build. So reasonably close to master.

    Yes, docker logs works. Of course the ordinary user can only get to them via the API.

  4. 0xmichalis commented on Oct 29, 2015

    @0xmichalis
    Contributor
  5. 0xmichalis commented on Oct 29, 2015

    @0xmichalis
    Contributor

    We probably need to cherry-pick kubernetes/kubernetes#15799 for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions