# Fix Docker Pull Timeout Registry Error
You're trying to pull Docker images but getting timeout errors connecting to registry-1.docker.io or other registries. The pull fails after waiting too long.
Introduction
Error: pull access denied, repository does not exist or may require authorization
net/http: request canceled while waiting for connection (Client.Timeout exceeded)Docker Hub and other registries can be slow or unreachable due to network issues, rate limiting, or firewall restrictions.
Symptoms
- Error messages appear in logs
- Service fails to respond correctly
- Unexpected behavior in production
Common Causes
- Configuration misconfiguration
- Resource exhaustion or limits
- Network connectivity issues
- Permission or access denied
Step-by-Step Fix
Test Registry Connectivity
```bash # Test basic connectivity ping -c 3 registry-1.docker.io
# Test HTTPS curl -I https://registry-1.docker.io/v2/
# Test with verbose curl -v https://registry-1.docker.io/v2/
# Check DNS nslookup registry-1.docker.io dig registry-1.docker.io ```
Check Docker daemon:
```bash # Check Docker status systemctl status docker
# Check Docker info docker info | grep -A 10 "Registry"
# Check Docker logs journalctl -u docker -n 100 ```
Common Causes and Solutions
Cause 1: Network Connectivity Issues
# Error: Connection timed outSolution:
```bash # Check firewall iptables -L -n | grep 443 firewall-cmd --list-all
# Allow Docker traffic firewall-cmd --add-service=docker --permanent firewall-cmd --reload
# Check proxy settings echo $HTTP_PROXY echo $HTTPS_PROXY
# Configure Docker proxy mkdir -p /etc/systemd/system/docker.service.d cat > /etc/systemd/system/docker.service.d/proxy.conf << 'EOF' [Service] Environment="HTTP_PROXY=http://proxy.example.com:8080" Environment="HTTPS_PROXY=http://proxy.example.com:8080" Environment="NO_PROXY=localhost,127.0.0.1" EOF
systemctl daemon-reload systemctl restart docker ```
Cause 2: DNS Resolution Issues
# Error: Temporary failure in name resolutionSolution:
```bash # Check DNS cat /etc/resolv.conf
# Add Docker DNS servers cat > /etc/docker/daemon.json << 'EOF' { "dns": ["8.8.8.8", "8.8.4.4", "1.1.1.1"] } EOF
systemctl restart docker ```
Cause 3: Docker Hub Rate Limiting
# Error: too many requests, rate limit exceededSolution:
```bash # Check rate limit curl -s -H "Authorization: Bearer $(curl -s 'https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull' | jq -r .token)" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest -I 2>/dev/null | grep -i ratelimit
# Login to Docker Hub for higher limits docker login
# Or use authenticated pull docker pull -u username -p password myimage ```
Cause 4: Slow Registry Connection
# Error: Timeout waiting for connectionSolution: Use a mirror:
```bash # Configure Docker mirror cat > /etc/docker/daemon.json << 'EOF' { "registry-mirrors": [ "https://mirror.gcr.io", "https://registry.docker-cn.com", "https://docker.mirrors.ustc.edu.cn" ] } EOF
systemctl restart docker ```
Cause 5: MTU Issues
# Error: Connection reset, large images failSolution:
```bash # Check MTU ip link show docker0
# Set MTU in Docker config cat > /etc/docker/daemon.json << 'EOF' { "mtu": 1400 } EOF
systemctl restart docker ```
Cause 6: Private Registry Issues
# Error: x509 certificate signed by unknown authoritySolution:
```bash # Add registry to insecure registries cat > /etc/docker/daemon.json << 'EOF' { "insecure-registries": ["registry.example.com:5000"] } EOF
# Or add CA certificate mkdir -p /etc/docker/certs.d/registry.example.com:5000 cp ca.crt /etc/docker/certs.d/registry.example.com:5000/
systemctl restart docker ```
Cause 7: Docker Daemon Issues
# Error: Cannot connect to Docker daemonSolution:
```bash # Restart Docker systemctl restart docker
# Check Docker socket ls -la /var/run/docker.sock
# Add user to docker group usermod -aG docker $USER
# Check Docker service systemctl status docker ```
Complete Docker Daemon Configuration
# /etc/docker/daemon.json
{
"registry-mirrors": [
"https://mirror.gcr.io",
"https://docker.mirrors.ustc.edu.cn"
],
"insecure-registries": ["registry.internal:5000"],
"dns": ["8.8.8.8", "8.8.4.4"],
"mtu": 1400,
"max-concurrent-downloads": 10,
"max-concurrent-uploads": 5,
"default-ulimits": {
"nofile": {
"Name": "nofile",
"Hard": 65535,
"Soft": 65535
}
},
"log-driver": "json-file",
"log-opts": {
"max-size": "100m",
"max-file": "3"
}
}Alternative Solutions
Use Alternative Registry
```bash # Pull from alternative source docker pull quay.io/username/image docker pull gcr.io/project/image docker pull ghcr.io/owner/image
# Tag for local use docker tag quay.io/username/image myimage:latest ```
Save and Load Images
```bash # On machine with access docker pull myimage:latest docker save myimage:latest -o myimage.tar
# Transfer and load on target machine docker load -i myimage.tar ```
Use Docker Registry Cache
```yaml # docker-compose.yml for registry cache version: '3' services: registry: image: registry:2 ports: - "5000:5000" environment: REGISTRY_PROXY_REMOTEURL: https://registry-1.docker.io REGISTRY_STORAGE_CACHE_BLOBDESCRIPTOR: inmemory volumes: - registry-data:/var/lib/registry
volumes: registry-data: ```
```bash # Configure to use local cache cat > /etc/docker/daemon.json << 'EOF' { "registry-mirrors": ["http://localhost:5000"] } EOF
systemctl restart docker ```
Verification
```bash # Test pull docker pull hello-world
# Test with verbose docker pull --debug alpine:latest
# Check registry connectivity curl -I https://registry-1.docker.io/v2/
# Check Docker info docker info
# Test with timeout docker pull --timeout 300 myimage:latest ```
Prevention
- 1.[ ] Check network connectivity to registry
- 2.[ ] Verify DNS resolution
- 3.[ ] Check firewall rules
- 4.[ ] Configure proxy if needed
- 5.[ ] Use registry mirrors
- 6.[ ] Login to Docker Hub for higher rate limits
- 7.[ ] Check MTU settings
- 8.[ ] Verify Docker daemon is running
- 9.[ ] Check certificate issues for private registries
- 10.[ ] Try alternative registry or save/load method
- 11.## Common Causes
- Configuration misconfiguration
- Missing or incorrect credentials
- Network connectivity issues
- Version compatibility problems
- Resource exhaustion or limits
- Permission or access denied
Related Articles
- [Fix docker build cache invalidated unnecessary layers Issue in Docker-Errors](docker-build-cache-invalidated-unnecessary-layers)
- [Fix Docker Build Cache Invalidation Optimization Issue in Docker](docker-build-cache-invalidation-optimization)
- [Fix docker build context slow large files Issue in Docker-Errors](docker-build-context-slow-large-files)
- [Fix docker build multi stage copy from not found Issue in Docker-Errors](docker-build-multi-stage-copy-from-not-found)
- [Fix docker buildkit export local tar layer missing Issue in Docker-Errors](docker-buildkit-export-local-tar-layer-missing)
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "TechArticle", "headline": "Fix Docker Pull Timeout Registry Error", "description": "Step-by-step guide to fix Docker pull timeout errors. Resolve registry connection issues, configure mirrors, and pull images successfully.", "url": "https://www.fixwikihub.com/fix-docker-pull-timeout-registry", "publisher": { "@type": "Organization", "name": "FixWikiHub", "url": "https://www.fixwikihub.com" }, "author": { "@type": "Person", "name": "FixWikiHub Editorial Team" }, "datePublished": "2026-04-27T10:23:00.000Z", "dateModified": "2026-04-27T10:23:00.000Z" } </script>