distribution: docker push keeps retrying and failing to local registry
$ docker run -d -p 5000:5000 --name registry registry:2
$ docker push --disable-content-trust=false localhost:5000/ubuntu
The push refers to a repository [localhost:5000/ubuntu]
2f1da5476ba7: Pushing [==================================================>] 136.4 MB
could not verify layer data for: sha256:2f1da5476ba736f1c02df28b51515b4a996a55d6d8378a480ef7486a0d568ae2. This may be because internal files in the layer store were modified. Re-pulling or rebuilding this image may resolve the issue
I saw the 500 error in the docker registry log
time="2016-11-07T17:33:11Z" level=error msg="response completed with error" err.code=unknown err.detail="unexpected EOF" err.message="unknown error" go.version=go1.6.3 http.request.host="localhost:5000" http.request.id=aba55e29-f48f-4a22-b833-a42c66911f4f http.request.method=PATCH http.request.remoteaddr="192.168.168.1:35133" http.request.uri="/v2/ubuntu/blobs/uploads/062ec770-029f-417e-9f3c-1fb3150bf938?_state=kq_Zaj2MK2tHEQWBRfNagoqe1mLARvBBrajE-qyX2T97Ik5hbWUiOiJ1YnVudHUiLCJVVUlEIjoiMDYyZWM3NzAtMDI5Zi00MTdlLTlmM2MtMWZiMzE1MGJmOTM4IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDE2LTExLTA3VDE3OjMyOjQ2LjYzMDA5ODkyM1oifQ%3D%3D" http.request.useragent="docker/1.12.2 go/go1.6.3 git-commit/bb80604 kernel/3.13.0-95-generic os/linux arch/amd64 UpstreamClient(Docker-Client/1.12.2 \\(linux\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=24.438541532s http.response.status=500 http.response.written=70 instance.id=da4c4fab-730c-4be4-8c1a-38b9bcdfb6b6 vars.name=ubuntu vars.uuid=062ec770-029f-417e-9f3c-1fb3150bf938 version=v2.5.1
$ docker info
Containers: 9
Running: 1
Paused: 0
Stopped: 8
Images: 10
Server Version: 1.12.2
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 51
Dirperm1 Supported: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: host null bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor
Kernel Version: 3.13.0-95-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 80
Total Memory: 503.8 GiB
Name: summerpalace
ID: YPT4:YO6X:2QND:TWUU:S7ZN:CB4E:CSLJ:LQTL:WTZ3:DX7G:U6RU:OE2J
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
dockmaster.prod.luminatewireless.com:4001
127.0.0.0/8
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 34 (1 by maintainers)
I’m also hitting this issue. Unless someone can point to the fix, I would still consider this an open issue.
This gave me the answer that worked for me – in short, ensure that you run your Registry container with the
REGISTRY_HTTP_HOSTenv var specified:I’m also seeing this. docker service logs also shows no recognizable errors on the side of the registry, but eventually the push fails with a 500 internal server error.
i think i have a solution , make sure that you have the correct tag name for the image , i think this will fix this issue
I have the same issue.
Please check your docker proxy settings in
/etc/systemd/system/docker.service.d/http-proxy.conf. If you set the proxy, you need set no proxy entry.Another way, disable the proxy file with
mv http-proxy.conf http-proxy.bakdirectly .Notice,after you changed your proxy file. you have to reload the docker service.
sudo systemctl restart dockersudo systemctl daemon-reload@bachya Thanks so much for this! For some reason I can’t seem to find any real docs on
REGISTRY_HTTP_HOSTanywhere. Do you recall where you found the documentation for this?It happened to me, the issue was that i had no permits to create a new image, if you wanna overcome without adding permissions, upload using a different label to your image, and you should be fine =) if nt, just add permissions to your role =)
It was missing IAM permission on the user in my case.
I had a very similar error (retrying until failure) and it was not related to docker, but to the file system of the machine hosting the registry. In my case the logs were almost identical to yours except that they said
msg="mkdir: [...] permission denied"I solved it by running the
update-permissionsgitlab script.Now your case seems to be a little different. From your logs:
msg="unknown error reading request payload: unexpected EOF"I’d take a look at the registry’s directory (in my case it was
/var/opt/gitlab/gitlab-rails/shared/registry/docker/registry/v2/) and inspect what’s going on there. Have a look at the permissions and search for corrupt files. I hope this helps.I had similar issue where pushing kept getting stuck at retrying to push layers to registry. Problem was fixed by me noticing the server’s disk space was full and making space for it. Docker is not informing this in anyway here.
It kept trying that same layer every 10 seconds.