ImagePullBackOff Troubleshooting
Introduction
Sometimes we receive a ticket reporting that a pod is stuck in ImagePullBackOff or has an image pull issue. In this document, we cover common error types and how to troubleshoot them.
502 Bad Gateway
If you encounter a 502 Bad Gateway while pulling an image, first try to reproduce the issue.
Reproduce
- SSH into the helper node of the cluster.
- Try pulling the image manually.
- Use the same image pull credentials as the affected pod.
In most cases the secret is hamdocker-credential, but always verify it in the pod spec.
- If you encounter the same error on the helper node, the problem is likely related to Hamstore.
- If the image pulls successfully from the helper node, check the node where the pod is scheduled:
- Try pulling the same image from that node as well.
- The issue might be network-related or caused by local node conditions (for example, not enough disk space to cache the image).
Debug Hamstore
If you reproduce the same issue on the helper node, start by checking Hamstore logs:
cd ~/hamstore
docker-compose logs -f --tail 100 | grep -i error
Review the logs and troubleshoot based on the error type.
Common Hamstore Errors
DNS issues
If you see an error like cannot resolve, check Hamstore DNS configuration:
-
Open the
docker-compose.ymlfile under:~/hamstore -
Check the DNS configuration for the
mitmandnginxcontainers. -
Verify the configured resolvers and fix/replace them if needed.
Then restart the containers:
docker-compose up -d --force-recreate
Finally, try pulling the image again and confirm whether the issue is resolved.