Troubleshooting commands

This section provides troubleshooting commands.

Check the status of the pods in all namespaces

If an error occurred during the installation and the oc get cluster version command returns and error, the following command can be run to determine the status of pods in all namespaces:

$ oc get pods --all-namespaces

NAMESPACE                         NAME                                            READY   STATUS      RESTARTS   AGE
openshift-apiserver-operator      openshift-apiserver-operator-85cb746d55-zqhs8   1/1     Running     1          9m
openshift-apiserver               apiserver-67b9g                                 1/1     Running     0          3m
openshift-apiserver               apiserver-ljcmx                                 1/1     Running     0          1m
openshift-apiserver               apiserver-z25h4                                 1/1     Running     0          2m
openshift-authentication-operator authentication-operator-69d5d8bf84-vh2n8        1/1     Running     0          5m
...

Checking the logs of a pod

The logs for a Pod that is listed in the output of the previous command can be checked by running the following command:

$ oc logs <pod_name> -n <namespace>

Gathering debug information

You can gather debugging information that might help to troubleshoot and debug certain issues with an Red Hat OpenShift Container Platform by running the following command:

$ oc debug node/<nodename>
chroot /host
toolbox
dbginfo.sh

The scp command can be used to retrieve the data from the RHOCP node