must-gather fails with error running backup collection: errors occurred while gathering data
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
- Must gather
Issue
-
While executing the
oc adm must-gathercommand, errors similar to the following one is shown in the command output:error running backup collection: errors occurred while gathering data: [skipping gathering <resource>/<resource_name> due to error: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Resolution
Those messages indicates that there are some resources that cannot be collected, but must-gather has a fallback mechanism in case it has issues gathering data, and in most of the cases the must-gather is collected with few missing information.
If the must-gather directory contains several directories inside, like the ones shown in the Diagnostic Steps section, and it is at least several MB size, please compact it and upload to the case, providing also the output with the error messages.
For different errors like "unable to download output from pod must-gather-XXXXX: No available strategies to copy", refer to error generating must-gather: No available strategies to copy.
Root Cause
Must-gather has a fallback mechanism in case it has issues gathering data.
Diagnostic Steps
Check if the generated must-gather directory contains data, checking there are different directories inside and the size of the directory is from several MB to GB:
$ du -sh must-gather.local.[random-ID]/
886M must-gather.local.[random-ID]/
$ tree -L 2 must-gather.local.[random-ID]/
must-gather.local.[random-ID]/
├── event-filter.html
├── quay-io-openshift-release-dev-ocp-v4-0-art-dev-sha256-[sha256]
│ ├── cluster-scoped-resources
│ ├── etcd_info
│ ├── event-filter.html
│ ├── host_service_logs
│ ├── ingress_controllers
│ ├── insights-data
│ ├── monitoring
│ ├── namespaces
│ ├── network_logs
│ ├── pod_network_connectivity_check
│ ├── static-pods
│ ├── timestamp
│ ├── version
│ └── web_hooks
└── timestamp
$ tree -L 3 must-gather.local.[random-ID]/
[...]
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.