rpardini / docker-registry-proxy

An HTTPS Proxy for Docker providing centralized configuration and caching of any registry (quay.io, DockerHub, k8s.gcr.io)
Apache License 2.0
912 stars 170 forks source link

Add DISABLE_IPV6 to ignore AAAA records when proxying requests #142

Open deejgregor opened 2 years ago

deejgregor commented 2 years ago

I was getting signal 11 crashes from nginx with docker-registry-proxy versions 0.6.2 and 0.6.4 (test performed pulling ubuntu through docker-registry-proxy without it being in the cache):

2022/10/19 03:54:57 [alert] 74#74: worker process 76 exited on signal 11

Leading to image pull errors in Docker and Kubernetes, e.g.:

docker: error pulling image configuration: download failed after attempts=6: EOF.

With the latest code in master, I get failures like instead of signal 11, but it sometimes seems to work, however:

2022/10/19 04:00:39 [crit] 83#83: *23 connect() to [2606:4700::6812:7c19]:443 failed (99: Address not available) while connecting to upstream, client: 127.0.0.1, server: proxy_caching_, request: "GET /v2/library/ubuntu/blobs/sha256:d63f752103bb93d846e17fa9996d3e708717c51b106382fe84d8527ee47a3547 HTTP/1.1", upstream: "https://[2606:4700::6812:7c19]:443/registry-v2/docker/registry/v2/blobs/sha256/d6/d63f752103bb93d846e17fa9996d3e708717c51b106382fe84d8527ee47a3547/data?verify=1666155039-2OQ%2BkxWXW53KIWSACLv3vpuPCD8%3D", host: "registry-1.docker.io"

If I set DISABLE_IPV6=true with this change, it works just fine, no errors like shown above.

rpardini commented 2 years ago

Test workflow failed also against the master branch. Something possibly unrelated broke...

deejgregor commented 1 year ago

Test workflow failed also against the master branch. Something possibly unrelated broke...

Doh! Sorry, I missed your comment. I'll take a look shortly.

vegassor commented 1 year ago

Hi @deejgregor ! Did you have a chance to take a look at the check?

gz243 commented 1 year ago

Hi, any chance we can get this fix released? Thank you.