docker-registry-proxy icon indicating copy to clipboard operation
docker-registry-proxy copied to clipboard

proxy_cache_revalidate when downloading from jfrog artifactory

Open peterhaaf opened this issue 5 years ago • 4 comments

Hi,

while working with with the new nginx.conf ( with manifest cache), i observed an issue when accessing JFrogs artifactory repo.

When having the nginx parameter proxy_cache_revalidate set to on, i get a 404 error, when trying to access an object a second time ( = when it is expired). So i needed to set this parameter to "off"

Unfortunately I did not know the reason for this, yet. Any idea where to look at ?

Thanx Peter

peterhaaf avatar Oct 20 '20 12:10 peterhaaf

Interesting. If you could please post the docker command line (envs and such) for docker-registry-proxy, and also the docker logs for the container while doing the pulls...

rpardini avatar Oct 21 '20 12:10 rpardini

can i send these files to you via email, they contain some data which should not be in public git ?

peterhaaf avatar Oct 21 '20 12:10 peterhaaf

@peterhaaf Nope, please redact the secrets and post it here with appropriate markdown, thanks

rpardini avatar Dec 02 '20 14:12 rpardini

We saw an issue with artifactory too like this where we got "unknown blob" errors / 404's when trying to push images with pre-existing layers. I believe its a bug on their end. As I was able to reproduce this issue without this proxy by running:

curl -X GET -v -H "Authorization: Bearer $TOKEN" ${ARTIFACTORY_REPO}/new-image/blobs/sha256:<sha>
                       
curl -X GET -v -H "Authorization: Bearer $TOKEN" ${ARTIFACTORY_REPO}/source-image/blobs/sha256:<sha>

The first curl would return 404 Not Found for 3-5 minutes and the second curl always worked consistently (302 Found). After 3-5 mins they both returned 302 Found.

tfreiling989 avatar Jul 07 '23 22:07 tfreiling989