Repository navigation
Description
This happens consistently when trying to pull an image that shares a layer with another image that has been expired. Because the TTL is 7 days we have images which we are unable to pull for multiple days until that image hits the TTL.
Steps to reproduce:
- Patch the latest version of distribution to set the expiry to something small (10 minutes). This is to make the problem reproducible quickly
At https://github.com/docker/distribution/blob/06fa77aa11a3913096efcb9b5bd25db8ef55a939/registry/proxy/proxymanifeststore.go#L15
Change to: const repositoryTTL = time.Duration(10 * time.Minute)
- Build and run distribution configured as proxy to registry-1.docker.io
docker build -t registry .
docker run -d -p5000:5000 \
-e REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io \
-e REGISTRY_STORAGE_CACHE_BLOBDESCRIPTOR=inmemory \
--name registry registry
- Pull the library/python image from the local registry proxy
docker rmi localhost:5000/library/python
docker pull localhost:5000/library/python
- Wait a few minutes and pull the library/node image
docker rmi localhost:5000/library/python
docker rmi localhost:5000/library/node
docker pull localhost:5000/library/node
- After waiting 10 minutes from step 3 you should see a message in registry logs about deleting blobs:
time="2017-08-15T17:25:21.516625079Z" level=debug msg="filesystem.Stat("/docker/registry/v2/blobs/sha256/81/81a1ab6955f8a17045fb4c2866b21c91445837507e86d489b03744557e6ed209/data")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=32.961µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Stat" trace.id=c635fc90-4397-4fa3-b10c-f32ed9578170 trace.line=138 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:21.516820044Z" level=debug msg="filesystem.Delete("/docker/registry/v2/repositories/library/python/_manifests/revisions/sha256/81a1ab6955f8a17045fb4c2866b21c91445837507e86d489b03744557e6ed209/link")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=107.87µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=0ff8eb93-21c9-4200-822d-01cd733c4d91 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:21.516941798Z" level=debug msg="filesystem.Delete("/docker/registry/v2/repositories/library/python/_layers/sha256/81a1ab6955f8a17045fb4c2866b21c91445837507e86d489b03744557e6ed209/link")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=54.834µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=e8c98a94-f16e-435e-b1ff-05a6db79329c trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:22.411773597Z" level=debug msg="filesystem.Delete("/docker/registry/v2/repositories/library/python/_layers/sha256/968120d8cbe8c99ab47504ffeb49e16ce3b773d14ba4eb78c7a5eca6ad34e00c/link")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=167.598µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=ef753f71-1268-4194-9dd4-44a5d1c52e8b trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:22.411921019Z" level=info msg="Deleting blob: /docker/registry/v2/blobs/sha256/96/968120d8cbe8c99ab47504ffeb49e16ce3b773d14ba4eb78c7a5eca6ad34e00c" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:22.412218761Z" level=debug msg="filesystem.Delete("/docker/registry/v2/blobs/sha256/96/968120d8cbe8c99ab47504ffeb49e16ce3b773d14ba4eb78c7a5eca6ad34e00c")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=246.403µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=1c013292-4444-4b5c-b308-23ca41022912 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:22.564524978Z" level=debug msg="filesystem.PutContent("/scheduler-state.json")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=30.512342ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=37717880-31f6-434b-b53b-8d995df33d65 trace.line=96 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:22.870933249Z" level=debug msg="filesystem.Stat("/")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=46.644µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Stat" trace.id=64602e0e-95de-411c-8874-7149fcc69d3b trace.line=138 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:25.771801383Z" level=debug msg="filesystem.Delete("/docker/registry/v2/repositories/library/python/_layers/sha256/2b032b8bbe8bc215ad3337035d0183fc353841ec6478d1c481e6e13628ad9e00/link")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=167.598µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=e372ab76-7ee4-4f64-a39a-d32d69cc3ec1 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:25.771924435Z" level=info msg="Deleting blob: /docker/registry/v2/blobs/sha256/2b/2b032b8bbe8bc215ad3337035d0183fc353841ec6478d1c481e6e13628ad9e00" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:25.779106183Z" level=debug msg="filesystem.Delete("/docker/registry/v2/blobs/sha256/2b/2b032b8bbe8bc215ad3337035d0183fc353841ec6478d1c481e6e13628ad9e00")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=7.123118ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=ec999c6f-bf75-4eae-87e8-2502741a661f trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:27.561749439Z" level=debug msg="filesystem.PutContent("/scheduler-state.json")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=27.048315ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=3419b00d-1ea6-42e2-8f4f-6dadca82d361 trace.line=96 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:32.872650715Z" level=debug msg="filesystem.Stat("/")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=52.137µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Stat" trace.id=0b9a662b-29f2-4b19-bc23-ae0c13957819 trace.line=138 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:33.955121366Z" level=debug msg="filesystem.Delete("/docker/registry/v2/repositories/library/python/_layers/sha256/032924b710ba95b71e9a2d971e705bab895ddf7a219994c2cf8761f6959e62ed/link")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=177.186µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=310fddc4-a281-4e1b-8386-4512515c1786 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:33.955241721Z" level=info msg="Deleting blob: /docker/registry/v2/blobs/sha256/03/032924b710ba95b71e9a2d971e705bab895ddf7a219994c2cf8761f6959e62ed" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:33.956808833Z" level=debug msg="filesystem.Delete("/docker/registry/v2/blobs/sha256/03/032924b710ba95b71e9a2d971e705bab895ddf7a219994c2cf8761f6959e62ed")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=1.512178ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=b6b3f5c5-ab15-4b2f-ab65-7e0310b58ea3 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:34.708783931Z" level=debug msg="filesystem.Delete("/docker/registry/v2/repositories/library/python/_layers/sha256/a9a5b35f6ead105e66a9af969454ac09b5772eeb0c6281972c48d2ce882e8eba/link")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=156.311µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=bc8112d8-f7cc-4ae8-b20b-8ddd0b191504 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:34.708953327Z" level=info msg="Deleting blob: /docker/registry/v2/blobs/sha256/a9/a9a5b35f6ead105e66a9af969454ac09b5772eeb0c6281972c48d2ce882e8eba" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:34.723095091Z" level=debug msg="filesystem.Delete("/docker/registry/v2/blobs/sha256/a9/a9a5b35f6ead105e66a9af969454ac09b5772eeb0c6281972c48d2ce882e8eba")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=14.092723ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=1351974e-bb2b-459a-a5c6-112ef82d163d trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:37.126646541Z" level=debug msg="filesystem.Delete("/docker/registry/v2/repositories/library/python/_layers/sha256/450f5ea3e7eafb6df380c997fa891c13693af5ef46eb7a8ac6c54b58d00fecbb/link")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=166.699µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=f878de6c-a418-4c27-aa03-13e137fe9d53 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:37.12677958Z" level=info msg="Deleting blob: /docker/registry/v2/blobs/sha256/45/450f5ea3e7eafb6df380c997fa891c13693af5ef46eb7a8ac6c54b58d00fecbb" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:37.127005209Z" level=debug msg="filesystem.Delete("/docker/registry/v2/blobs/sha256/45/450f5ea3e7eafb6df380c997fa891c13693af5ef46eb7a8ac6c54b58d00fecbb")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=172.193µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=e4e7a4ac-2356-4a5c-a4ed-d1e0682175d5 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:37.565964096Z" level=debug msg="filesystem.PutContent("/scheduler-state.json")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=30.373808ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=95f3b9b9-0b4a-4fac-8aba-07092f4d68e9 trace.line=96 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:38.457333866Z" level=debug msg="filesystem.Delete("/docker/registry/v2/repositories/library/python/_layers/sha256/b1dca9769b8b2f680ff0ed0de230c1d8984715ea8608e8a7df08b44a982f1fb3/link")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=161.006µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=06ada939-1974-4378-8b58-24afcbb8424e trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:38.45747999Z" level=info msg="Deleting blob: /docker/registry/v2/blobs/sha256/b1/b1dca9769b8b2f680ff0ed0de230c1d8984715ea8608e8a7df08b44a982f1fb3" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:38.458513945Z" level=debug msg="filesystem.Delete("/docker/registry/v2/blobs/sha256/b1/b1dca9769b8b2f680ff0ed0de230c1d8984715ea8608e8a7df08b44a982f1fb3")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=973.127µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=25f52868-4bd1-49f1-a9cd-453c12d29162 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:39.423246535Z" level=debug msg="filesystem.Delete("/docker/registry/v2/repositories/library/python/_layers/sha256/0d7cffe4bfd71fa93d626a4a0761dc02083eda97bfc757feafdc168a9b24fbda/link")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=162.504µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=2567d11e-85a8-467d-9521-edc039c08729 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:39.423393558Z" level=info msg="Deleting blob: /docker/registry/v2/blobs/sha256/0d/0d7cffe4bfd71fa93d626a4a0761dc02083eda97bfc757feafdc168a9b24fbda" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:39.430487012Z" level=debug msg="filesystem.Delete("/docker/registry/v2/blobs/sha256/0d/0d7cffe4bfd71fa93d626a4a0761dc02083eda97bfc757feafdc168a9b24fbda")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=7.03922ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=901fd0c0-2812-4164-8d08-50006117bfcd trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:39.604583279Z" level=debug msg="filesystem.Delete("/docker/registry/v2/repositories/library/python/_layers/sha256/ad74af05f5a24bcf9459ae1cf7718628c2aeb6b587eb51b6eeaf639aca3e566f/link")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=159.508µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=fedb294a-0a8b-426f-8569-15704de2eae6 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:39.604724709Z" level=info msg="Deleting blob: /docker/registry/v2/blobs/sha256/ad/ad74af05f5a24bcf9459ae1cf7718628c2aeb6b587eb51b6eeaf639aca3e566f" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:39.620825712Z" level=debug msg="filesystem.Delete("/docker/registry/v2/blobs/sha256/ad/ad74af05f5a24bcf9459ae1cf7718628c2aeb6b587eb51b6eeaf639aca3e566f")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=16.030289ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=973070df-b3b6-44c4-8bbb-b41a73c29417 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:42.561907601Z" level=debug msg="filesystem.PutContent("/scheduler-state.json")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=27.883109ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=7570e3b4-5552-4673-a9a3-a4b9064b2e95 trace.line=96 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:42.871661741Z" level=debug msg="filesystem.Stat("/")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=55.633µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Stat" trace.id=513ab546-9e48-4ec8-a111-b154db454013 trace.line=138 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:44.872937411Z" level=debug msg="filesystem.Delete("/docker/registry/v2/repositories/library/python/_layers/sha256/3245b5a1c52cbf0ae23d948fb94ef7b321e3dc54e13c3f6cf79951ed8237f03e/link")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=163.802µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=6b8af6d0-ba88-4fb8-a41d-6c758d3df506 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:44.873077842Z" level=info msg="Deleting blob: /docker/registry/v2/blobs/sha256/32/3245b5a1c52cbf0ae23d948fb94ef7b321e3dc54e13c3f6cf79951ed8237f03e" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry version=v2.6.0-rc.1-213-g06fa77aa.m
time="2017-08-15T17:25:44.907699933Z" level=debug msg="filesystem.Delete("/docker/registry/v2/blobs/sha256/32/3245b5a1c52cbf0ae23d948fb94ef7b321e3dc54e13c3f6cf79951ed8237f03e")" environment=development go.version=go1.8.3 instance.id=cb5c9bf9-bc57-422c-9da2-51eefab7bfc6 service=registry trace.duration=34.561764ms trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Delete" trace.id=75af8054-f141-4211-9fa8-8182d8fd3a08 trace.line=178 version=v2.6.0-rc.1-213-g06fa77aa.m
- Try to pull library/node again and see an error
docker rmi localhost:5000/library/python
docker rmi localhost:5000/library/node
docker pull localhost:5000/library/node # <--- this causes an error
Using default tag: latest
latest: Pulling from library/node
ad74af05f5a2: Retrying in 1 second
2b032b8bbe8b: Retrying in 1 second
a9a5b35f6ead: Downloading [==================================================>] 43.23MB/43.23MB
3245b5a1c52c: Waiting
afa075743392: Waiting
9fb9f21641cd: Waiting
2e38fbae54d2: Waiting
64e77472dc48: Waiting
unexpected EOF
Logs from registry on failed pull:
distribution-logs-EOF-pull.txt
Repeatedly trying docker pull localhost:5000/library/node fails until 10 minutes after the first pull at which point it succeeds.
If you hit the API directly for one of the blobs that is stuck retrying you get back a 200 OK but with an empty body:
$ curl -svO localhost:5000/v2/library/node/blobs/sha256:3245b5a1c52cbf0ae23d948fb94ef7b321e3dc54e13c3f6cf79951ed8237f03e
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 5000 (#0)
> GET /v2/library/node/blobs/sha256:3245b5a1c52cbf0ae23d948fb94ef7b321e3dc54e13c3f6cf79951ed8237f03e HTTP/1.1
> Host: localhost:5000
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Cache-Control: max-age=31536000
< Content-Length: 131858814
< Content-Type: application/octet-stream
< Docker-Content-Digest: sha256:3245b5a1c52cbf0ae23d948fb94ef7b321e3dc54e13c3f6cf79951ed8237f03e
< Docker-Distribution-Api-Version: registry/2.0
< Etag: "sha256:3245b5a1c52cbf0ae23d948fb94ef7b321e3dc54e13c3f6cf79951ed8237f03e"
< X-Content-Type-Options: nosniff
< Date: Tue, 15 Aug 2017 17:49:08 GMT
<
{ [0 bytes data]
* transfer closed with 131858814 bytes remaining to read
* Closing connection 0
Docker version/info
$ docker version
Client:
Version: 17.06.0-ce
API version: 1.30
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:31:53 2017
OS/Arch: darwin/amd64
Server:
Version: 17.06.0-ce
API version: 1.30 (minimum version 1.12)
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:51:55 2017
OS/Arch: linux/amd64
Experimental: true
$ docker info
Containers: 4
Running: 1
Paused: 0
Stopped: 3
Images: 55
Server Version: 17.06.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfb82a876ecc11b5ca0977d1733adbe58599088a
runc version: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.36-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.855GiB
Name: moby
ID: NWWG:VGBP:CL62:HAK7:WMUH:AVT2:7AN2:4DCR:DDT5:ST3A:HDSW:VNZI
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 30
Goroutines: 41
System Time: 2017-08-15T17:08:28.029292033Z
EventsListeners: 1
No Proxy: *.local, 169.254/16
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Activity
russellcardullo commentedon Aug 15, 2017
Logs from when I did the curl that returned an empty body. Followed same steps as above and waited for the blob delete first before curling to reproduce the issue:
russellcardullo commentedon Aug 15, 2017
Reproduced again to capture pprof output for goroutines. Attached logs and pprof capture taken immediately after the curl returned an empty body.
distribution_logs.with_pprof.txt
pprof_goroutines.txt
abaumann commentedon Jan 8, 2018
We seem to be hitting this same EOF error after 7 days using the Google Pipelines API - any updates on this issue or ways around it? They recently added caching to GCR for images rather than always pulling from the original registry and this behavior is new
jsravn commentedon Apr 11, 2018
The workaround is to restart and delete the cache before the 7 day ttl. We run it in k8s w/ emptyDir, so can just delete the pod. It's not ideal though as we lose the entire cache weekly.
Fundebug commentedon May 2, 2018
I solve the problem by just rebuild the image and push it to the registry.
antoniou commentedon May 14, 2018
We also had to work around it by restarting our Docker Registry systemd unit before the cache expires:
https://www.freedesktop.org/software/systemd/man/systemd.service.html#RuntimeMaxSec=
docwhat commentedon Sep 25, 2018
Is there anything I can do to get this fixed sooner rather than later?
This is really annoying and hard to track down.
I've been searching for months, off and on.
manishtomar commentedon Sep 26, 2018
@docwhat Until the bug is fixed your best option is to clean the cache before the expiry time.
xulz commentedon Dec 20, 2018
any plan or status update on the issue fixing?
The issue has been raised 16 month...
warmchang commentedon Jan 8, 2019
Any plan to fix this issue? Thanks.
manishtomar commentedon Jan 8, 2019
There are no plans on getting this fixed anytime soon. It will be great if someone can root cause this and provide a patch.
andyzhangx commentedon Jan 9, 2019
OMG, I hit this issue every few weeks, any expert could fix this issue? Is there better any workaround except "restart"? This severe issue makes the proxy very unstable
andyzhangx commentedon Jan 9, 2019
is it possible to configure the TTL time
7 days? I could accept restart registry proxy every 3 months ..andyzhangx commentedon Jan 9, 2019
what drawback if I set
repositoryTTLvalue to one year or more long time ? Only occupies the disk space? My disk has 1TB, it could host huge amount of repos.https://github.com/docker/distribution/blob/06fa77aa11a3913096efcb9b5bd25db8ef55a939/registry/proxy/proxymanifeststore.go#L15
manishtomar commentedon Jan 9, 2019
@andyxning That is totally acceptable. It will be nice if there can be a PR to make this configurable so that its easy for others have this workaround.
37 remaining items
vglaiju commentedon Jun 20, 2024
@manishtomar Thank you for suggesting this, i m facing this during image push.
Please suggest, Is this compatibility to be enabled in the deployment yaml of registry?
milosgajdos commentedon Jun 20, 2024
Schema1 will be deprecated in v3 release and v2 release is essentially in maintenance mode. If I were you I'd strongly advise you to rebuild your v1 images into v2.
jakob-tsd commentedon Aug 19, 2025
For posterity and other people hitting this on podman, this is how the bug looks like through podman:
And if you use the Debian package, you can disable the blobdescriptor cache through
/etc/docker/registry/config.yml.I changed the relevant line to
but of course
blah(or even empty) works just as well.ondrejkopka commentedon Nov 25, 2025
hi, is possible to fix this please? i use latest version and i face EOF issue every day (just changed blobdescriptor so i'll see if that helps)
lesliexlxiao commentedon Dec 12, 2025
Is it true that the latest official code still has the following issues?
T0: Blob exists normally
T1: TTL expires, expiration callback triggers
T2: Execute blobs.Delete()
T3: Client request arrives
T4: Enter ServeBlob()
T5: Pull completes
T6: Expiration callback continues execution
T7: AddBlob acquires lock, creates new entry2
T8: 💥 Data inconsistency
docwhat commentedon Dec 16, 2025
🧠 🌩️ I'm just brainstorming since fixing this properly seems difficult.
Could the server deal with the problem in a better way?
As an example, when a layer is requested, maybe it could detect that the layer is missing and then it could return a 404. It's not perfect, but it shows what really happened.
Ideally, it would then go and mark the image as broken or maybe just delete it. A little confusing since the user would be like "it was there a minute ago!".
Unfortunately, if I remember correctly, finding the images that use that layer is not cheap so that's probably not acceptable.
The client has that information, though. Is there a REST API call to "verify" that all the parts of an image exist? Maybe the client could call that when a layer is 404. Then the verify can mark the image as bad.
I don't like that it depends on the client being a good team player, but what can you do.
Hmmm. I suppose this also could be a DoS vector, depending on how expensive the verify function is (if it doesn't exist already).
Maybe it could do quick checks before serving an image to ensure the layers are there and if not, return a error right away?
Even if an image has a 100 layers, doing HEAD checks wouldn't take that long, would it? If we change the database schema, we could save when the last HEAD check was performed and what it returned.
Most of the backends return size and a checksum. Those could be used to be doubly sure the layer in good shape.
fix(proxy): ref-count shared blobs and refresh TTL on cache hit
fix(proxy): ref-count shared blobs and refresh TTL on cache hit
storage: serve filesystem blobs directly from the file
storage: serve filesystem blobs directly from the file
storage: serve filesystem blobs directly from the file
storage: serve filesystem blobs directly from the file
fix(proxy): ref-count shared blobs and refresh TTL on cache hit
storage: serve filesystem blobs directly from the file
fix(proxy): ref-count shared blobs and refresh TTL on cache hit