Skip to content

500 Error (possible problem pushing a container update) #1116

Closed

Description

@rncry
docker -v
Docker version 1.8.3, build f4bf5c7

Running the registry with:
sudo docker run -d --restart=always -e REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/dockerdata -v /mnt/docker:/dockerdata -e REGISTRY_STORAGE_CACHE=inmemory -e REGISTRY_STORAGE=filesystem -p 5000:5000 registry:2.1

When trying to push a new version of an image it has started failing:
sudo docker push docker-registry:5000/studio-local-base/arnold
The push refers to a repository [docker-registry:5000/studio-local-base/arnold](len: 2)
4cd893a8aa15: Pushing [==================================================>] 32 B/32 B
Received unexpected HTTP status: 500 Internal Server Error

Accompanied by the following from docker logs on the registry container:

time="2015-10-20T15:04:07Z" level=error msg="response completed with error" err.code=UNKNOWN err.detail="remove /dockerdata/docker/registry/v2/repositories/studio-local-base/arnold/_uploads/f35b75a4-c81f-4122-867a-e4751fc879ef: directory not empty" err.message="unknown error" http.request.host="docker-registry:5000" http.request.id=cbdc0d2d-94a6-430f-b7c4-2ffecf45d585 http.request.method=PUT http.request.remoteaddr="172.20.121.186:51425" http.request.uri="/v2/studio-local-base/arnold/blobs/uploads/f35b75a4-c81f-4122-867a-e4751fc879ef?_state=6O9hW2L1tmTADi0w4kiK3oZ1akIA0-BMd8g6l8zE3Wd7Ik5hbWUiOiJzdHVkaW8tbG9jYWwtYmFzZS9hcm5vbGQiLCJVVUlEIjoiZjM1Yjc1YTQtYzgxZi00MTIyLTg2N2EtZTQ3NTFmYzg3OWVmIiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0xMC0yMFQxNTowNDowN1oifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=78.200352ms http.response.status=500 http.response.written=216 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 vars.name="studio-local-base/arnold" vars.uuid=f35b75a4-c81f-4122-867a-e4751fc879ef version=v2.1.1 
172.20.121.186 - - [20/Oct/2015:15:04:07 +0000] "PUT /v2/studio-local-base/arnold/blobs/uploads/f35b75a4-c81f-4122-867a-e4751fc879ef?_state=6O9hW2L1tmTADi0w4kiK3oZ1akIA0-BMd8g6l8zE3Wd7Ik5hbWUiOiJzdHVkaW8tbG9jYWwtYmFzZS9hcm5vbGQiLCJVVUlEIjoiZjM1Yjc1YTQtYzgxZi00MTIyLTg2N2EtZTQ3NTFmYzg3OWVmIiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0xMC0yMFQxNTowNDowN1oifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 HTTP/1.1" 500 216 "" "docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:04:20Z" level=info msg="response completed" http.request.host="docker-registry:5000" http.request.id=0f4d0589-9a16-45f7-8b7f-def018647f04 http.request.method=GET http.request.remoteaddr="172.20.121.97:49006" http.request.uri="/v2/" http.request.useragent="docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=1.38022ms http.response.status=200 http.response.written=2 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 version=v2.1.1 
172.20.121.97 - - [20/Oct/2015:15:04:20 +0000] "GET /v2/ HTTP/1.1" 200 2 "" "docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:04:20Z" level=info msg="response completed" http.request.host="docker-registry:5000" http.request.id=da933105-3726-4e25-92cd-e18a3acfc140 http.request.method=GET http.request.remoteaddr="172.20.121.97:49009" http.request.uri="/v2/" http.request.useragent="docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=1.539568ms http.response.status=200 http.response.written=2 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 version=v2.1.1 
172.20.121.97 - - [20/Oct/2015:15:04:20 +0000] "GET /v2/ HTTP/1.1" 200 2 "" "docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:04:20Z" level=info msg="response completed" http.request.host="docker-registry:5000" http.request.id=54290f74-2b6d-49e9-8246-824631580c70 http.request.method=GET http.request.remoteaddr="172.20.121.97:49010" http.request.uri="/v2/studio-local-base/artist/manifests/latest" http.request.useragent="docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=41.461873ms http.response.status=200 http.response.written=118923 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 version=v2.1.1 
172.20.121.97 - - [20/Oct/2015:15:04:20 +0000] "GET /v2/studio-local-base/artist/manifests/latest HTTP/1.1" 200 118923 "" "docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:04:39Z" level=info msg="response completed" http.request.host="docker-registry:5000" http.request.id=2cdcf1c9-6458-49f8-a7d0-0beed51ac083 http.request.method=GET http.request.remoteaddr="172.20.121.186:51428" http.request.uri="/v2/" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=1.464967ms http.response.status=200 http.response.written=2 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 version=v2.1.1 
172.20.121.186 - - [20/Oct/2015:15:04:39 +0000] "GET /v2/ HTTP/1.1" 200 2 "" "docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:04:39Z" level=info msg="response completed" http.request.host="docker-registry:5000" http.request.id=71b2bb66-f114-43e8-bd0c-322ce90bab0c http.request.method=POST http.request.remoteaddr="172.20.121.186:51429" http.request.uri="/v2/studio-local-base/arnold/blobs/uploads/" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.duration=38.044235ms http.response.status=202 http.response.written=0 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 version=v2.1.1 
172.20.121.186 - - [20/Oct/2015:15:04:39 +0000] "POST /v2/studio-local-base/arnold/blobs/uploads/ HTTP/1.1" 202 0 "" "docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:04:39Z" level=warning msg="the ResponseWriter does not implement CloseNotifier" http.request.host="docker-registry:5000" http.request.id=af07ecdb-2d84-42da-becf-ff5ae84092f1 http.request.method=PATCH http.request.remoteaddr="172.20.121.186:51430" http.request.uri="/v2/studio-local-base/arnold/blobs/uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608?_state=vP--jYJj2wCVgCHKWOpPzc2FJNRvD0eXhZLcEWCd1Yp7Ik5hbWUiOiJzdHVkaW8tbG9jYWwtYmFzZS9hcm5vbGQiLCJVVUlEIjoiNGNhNDZmZDEtMjc4NS00NTUxLThkY2ItNWU2NGMyMzdhNjA4IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDE1LTEwLTIwVDE1OjA0OjM5LjI5ODA5MDI0OFoifQ%3D%3D" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64" instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 vars.name="studio-local-base/arnold" vars.uuid=4ca46fd1-2785-4551-8dcb-5e64c237a608 version=v2.1.1 
time="2015-10-20T15:04:39Z" level=info msg="response completed" http.request.host="docker-registry:5000" http.request.id=af07ecdb-2d84-42da-becf-ff5ae84092f1 http.request.method=PATCH http.request.remoteaddr="172.20.121.186:51430" http.request.uri="/v2/studio-local-base/arnold/blobs/uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608?_state=vP--jYJj2wCVgCHKWOpPzc2FJNRvD0eXhZLcEWCd1Yp7Ik5hbWUiOiJzdHVkaW8tbG9jYWwtYmFzZS9hcm5vbGQiLCJVVUlEIjoiNGNhNDZmZDEtMjc4NS00NTUxLThkY2ItNWU2NGMyMzdhNjA4IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDE1LTEwLTIwVDE1OjA0OjM5LjI5ODA5MDI0OFoifQ%3D%3D" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.duration=24.073861ms http.response.status=202 http.response.written=0 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 version=v2.1.1 
172.20.121.186 - - [20/Oct/2015:15:04:39 +0000] "PATCH /v2/studio-local-base/arnold/blobs/uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608?_state=vP--jYJj2wCVgCHKWOpPzc2FJNRvD0eXhZLcEWCd1Yp7Ik5hbWUiOiJzdHVkaW8tbG9jYWwtYmFzZS9hcm5vbGQiLCJVVUlEIjoiNGNhNDZmZDEtMjc4NS00NTUxLThkY2ItNWU2NGMyMzdhNjA4IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDE1LTEwLTIwVDE1OjA0OjM5LjI5ODA5MDI0OFoifQ%3D%3D HTTP/1.1" 202 0 "" "docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:04:39Z" level=warning msg="the ResponseWriter does not implement CloseNotifier" http.request.host="docker-registry:5000" http.request.id=bb9060d7-589a-49a0-9683-bff10bb6fb93 http.request.method=PUT http.request.remoteaddr="172.20.121.186:51431" http.request.uri="/v2/studio-local-base/arnold/blobs/uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608?_state=5Xn8lV3o-RUULYZ5M3YtdkqOu2wVqVAmVXqjQhgvYct7Ik5hbWUiOiJzdHVkaW8tbG9jYWwtYmFzZS9hcm5vbGQiLCJVVUlEIjoiNGNhNDZmZDEtMjc4NS00NTUxLThkY2ItNWU2NGMyMzdhNjA4IiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0xMC0yMFQxNTowNDozOVoifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64" instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 vars.name="studio-local-base/arnold" vars.uuid=4ca46fd1-2785-4551-8dcb-5e64c237a608 version=v2.1.1 
time="2015-10-20T15:04:39Z" level=error msg="unable to delete layer upload resources \"/docker/registry/v2/repositories/studio-local-base/arnold/_uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608\": remove /dockerdata/docker/registry/v2/repositories/studio-local-base/arnold/_uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608: directory not empty" http.request.host="docker-registry:5000" http.request.id=bb9060d7-589a-49a0-9683-bff10bb6fb93 http.request.method=PUT http.request.remoteaddr="172.20.121.186:51431" http.request.uri="/v2/studio-local-base/arnold/blobs/uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608?_state=5Xn8lV3o-RUULYZ5M3YtdkqOu2wVqVAmVXqjQhgvYct7Ik5hbWUiOiJzdHVkaW8tbG9jYWwtYmFzZS9hcm5vbGQiLCJVVUlEIjoiNGNhNDZmZDEtMjc4NS00NTUxLThkY2ItNWU2NGMyMzdhNjA4IiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0xMC0yMFQxNTowNDozOVoifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64" instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 vars.name="studio-local-base/arnold" vars.uuid=4ca46fd1-2785-4551-8dcb-5e64c237a608 version=v2.1.1 
time="2015-10-20T15:04:39Z" level=error msg="unknown error completing upload: &os.PathError{Op:\"remove\", Path:\"/dockerdata/docker/registry/v2/repositories/studio-local-base/arnold/_uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608\", Err:0x27}" http.request.host="docker-registry:5000" http.request.id=bb9060d7-589a-49a0-9683-bff10bb6fb93 http.request.method=PUT http.request.remoteaddr="172.20.121.186:51431" http.request.uri="/v2/studio-local-base/arnold/blobs/uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608?_state=5Xn8lV3o-RUULYZ5M3YtdkqOu2wVqVAmVXqjQhgvYct7Ik5hbWUiOiJzdHVkaW8tbG9jYWwtYmFzZS9hcm5vbGQiLCJVVUlEIjoiNGNhNDZmZDEtMjc4NS00NTUxLThkY2ItNWU2NGMyMzdhNjA4IiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0xMC0yMFQxNTowNDozOVoifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64" instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 vars.name="studio-local-base/arnold" vars.uuid=4ca46fd1-2785-4551-8dcb-5e64c237a608 version=v2.1.1 
time="2015-10-20T15:04:39Z" level=error msg="unable to delete layer upload resources \"/docker/registry/v2/repositories/studio-local-base/arnold/_uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608\": remove /dockerdata/docker/registry/v2/repositories/studio-local-base/arnold/_uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608/.nfs000000008910766f00000049: device or resource busy" http.request.host="docker-registry:5000" http.request.id=bb9060d7-589a-49a0-9683-bff10bb6fb93 http.request.method=PUT http.request.remoteaddr="172.20.121.186:51431" http.request.uri="/v2/studio-local-base/arnold/blobs/uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608?_state=5Xn8lV3o-RUULYZ5M3YtdkqOu2wVqVAmVXqjQhgvYct7Ik5hbWUiOiJzdHVkaW8tbG9jYWwtYmFzZS9hcm5vbGQiLCJVVUlEIjoiNGNhNDZmZDEtMjc4NS00NTUxLThkY2ItNWU2NGMyMzdhNjA4IiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0xMC0yMFQxNTowNDozOVoifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64" instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 vars.name="studio-local-base/arnold" vars.uuid=4ca46fd1-2785-4551-8dcb-5e64c237a608 version=v2.1.1 
time="2015-10-20T15:04:39Z" level=error msg="error canceling upload after error: remove /dockerdata/docker/registry/v2/repositories/studio-local-base/arnold/_uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608/.nfs000000008910766f00000049: device or resource busy" http.request.host="docker-registry:5000" http.request.id=bb9060d7-589a-49a0-9683-bff10bb6fb93 http.request.method=PUT http.request.remoteaddr="172.20.121.186:51431" http.request.uri="/v2/studio-local-base/arnold/blobs/uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608?_state=5Xn8lV3o-RUULYZ5M3YtdkqOu2wVqVAmVXqjQhgvYct7Ik5hbWUiOiJzdHVkaW8tbG9jYWwtYmFzZS9hcm5vbGQiLCJVVUlEIjoiNGNhNDZmZDEtMjc4NS00NTUxLThkY2ItNWU2NGMyMzdhNjA4IiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0xMC0yMFQxNTowNDozOVoifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64" instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 vars.name="studio-local-base/arnold" vars.uuid=4ca46fd1-2785-4551-8dcb-5e64c237a608 version=v2.1.1 
time="2015-10-20T15:04:39Z" level=error msg="response completed with error" err.code=UNKNOWN err.detail="remove /dockerdata/docker/registry/v2/repositories/studio-local-base/arnold/_uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608: directory not empty" err.message="unknown error" http.request.host="docker-registry:5000" http.request.id=bb9060d7-589a-49a0-9683-bff10bb6fb93 http.request.method=PUT http.request.remoteaddr="172.20.121.186:51431" http.request.uri="/v2/studio-local-base/arnold/blobs/uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608?_state=5Xn8lV3o-RUULYZ5M3YtdkqOu2wVqVAmVXqjQhgvYct7Ik5hbWUiOiJzdHVkaW8tbG9jYWwtYmFzZS9hcm5vbGQiLCJVVUlEIjoiNGNhNDZmZDEtMjc4NS00NTUxLThkY2ItNWU2NGMyMzdhNjA4IiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0xMC0yMFQxNTowNDozOVoifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=72.475092ms http.response.status=500 http.response.written=216 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 vars.name="studio-local-base/arnold" vars.uuid=4ca46fd1-2785-4551-8dcb-5e64c237a608 version=v2.1.1 
172.20.121.186 - - [20/Oct/2015:15:04:39 +0000] "PUT /v2/studio-local-base/arnold/blobs/uploads/4ca46fd1-2785-4551-8dcb-5e64c237a608?_state=5Xn8lV3o-RUULYZ5M3YtdkqOu2wVqVAmVXqjQhgvYct7Ik5hbWUiOiJzdHVkaW8tbG9jYWwtYmFzZS9hcm5vbGQiLCJVVUlEIjoiNGNhNDZmZDEtMjc4NS00NTUxLThkY2ItNWU2NGMyMzdhNjA4IiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0xMC0yMFQxNTowNDozOVoifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 HTTP/1.1" 500 216 "" "docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:06:19Z" level=info msg="response completed" http.request.host="docker-registry:5000" http.request.id=35a9d9f3-c579-4654-9c4b-5dcae6ebc4ad http.request.method=GET http.request.remoteaddr="172.20.121.11:43084" http.request.uri="/v2/" http.request.useragent="docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=1.47743ms http.response.status=200 http.response.written=2 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 version=v2.1.1 
172.20.121.11 - - [20/Oct/2015:15:06:19 +0000] "GET /v2/ HTTP/1.1" 200 2 "" "docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:06:19Z" level=info msg="response completed" http.request.host="docker-registry:5000" http.request.id=ecb5086b-030b-48ba-84f5-373be116b907 http.request.method=GET http.request.remoteaddr="172.20.121.11:43087" http.request.uri="/v2/" http.request.useragent="docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=1.495046ms http.response.status=200 http.response.written=2 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 version=v2.1.1 
172.20.121.11 - - [20/Oct/2015:15:06:19 +0000] "GET /v2/ HTTP/1.1" 200 2 "" "docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:06:19Z" level=info msg="response completed" http.request.host="docker-registry:5000" http.request.id=9193db51-7016-48d6-b3d2-c44815ab5b3c http.request.method=GET http.request.remoteaddr="172.20.121.11:43088" http.request.uri="/v2/studio-local-base/artist/manifests/latest" http.request.useragent="docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=44.442606ms http.response.status=200 http.response.written=118923 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 version=v2.1.1 
172.20.121.11 - - [20/Oct/2015:15:06:19 +0000] "GET /v2/studio-local-base/artist/manifests/latest HTTP/1.1" 200 118923 "" "docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:08:20Z" level=info msg="response completed" http.request.host="docker-registry:5000" http.request.id=921ede68-bb7c-4301-b116-bc7d490b6b93 http.request.method=GET http.request.remoteaddr="172.20.121.11:43128" http.request.uri="/v2/" http.request.useragent="docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=2.215876ms http.response.status=200 http.response.written=2 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 version=v2.1.1 
172.20.121.11 - - [20/Oct/2015:15:08:20 +0000] "GET /v2/ HTTP/1.1" 200 2 "" "docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:08:20Z" level=info msg="response completed" http.request.host="docker-registry:5000" http.request.id=b5ee2068-28fa-497f-96f2-ef2da76d89b2 http.request.method=GET http.request.remoteaddr="172.20.121.11:43131" http.request.uri="/v2/" http.request.useragent="docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=1.427842ms http.response.status=200 http.response.written=2 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 version=v2.1.1 
172.20.121.11 - - [20/Oct/2015:15:08:20 +0000] "GET /v2/ HTTP/1.1" 200 2 "" "docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64"
time="2015-10-20T15:08:21Z" level=info msg="response completed" http.request.host="docker-registry:5000" http.request.id=c90154c5-ae85-4fa1-8584-4a21f03949b5 http.request.method=GET http.request.remoteaddr="172.20.121.11:43132" http.request.uri="/v2/studio-local-base/artist/manifests/latest" http.request.useragent="docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=40.662546ms http.response.status=200 http.response.written=118923 instance.id=36bd7160-9cb6-42e8-b9b1-5d80420f3885 version=v2.1.1 
172.20.121.11 - - [20/Oct/2015:15:08:20 +0000] "GET /v2/studio-local-base/artist/manifests/latest HTTP/1.1" 200 118923 "" "docker/1.7.0 go/go1.4.2 git-commit/0baf609 kernel/3.13.0-63-generic os/linux arch/amd64"

Activity

  1. RichardScothern commented on Oct 20, 2015

    @RichardScothern

    The registry is unable to remove upload artifacts

    I see device or resource busy in your logs, which indicates problems with the filesystem. Is this a POSIX filesystem or something else like NFS?

  2. rncry commented on Oct 20, 2015

    @rncry
    Author

    It's NFS, but the only thing touching the file server is the docker registry, will that cause a problem?

    The problem only just started showing up (just after I added tags to the containers, not sure if that's just a coincidence though) it's been working fine for a while..

    Sent from my iPhone

    On 20 Oct 2015, at 18:03, Richard Scothern [email protected] wrote:

    The registry is unable to remove upload artifacts

    I see device or resource busy in your logs, which indicates problems with the filesystem. Is this a POSIX filesystem or something else like NFS?

    —
    Reply to this email directly or view it on GitHub.

  3. RichardScothern commented on Oct 21, 2015

    @RichardScothern

    It looks like there is a .nfs file in your upload directory. Unfortunately I know almost nothing about NFS, but it looks some process has an open file descriptor on that file preventing it from being deleted. lsof is your friend here.

  4. rncry commented on Oct 22, 2015

    @rncry
    Author

    Thanks Richard, I'll take a look. It seems like the only process that could
    have an open file descriptor on that system is the registry itself?

    Should we stay away from using an NFS backed registry?

    On Wed, Oct 21, 2015 at 6:05 PM, Richard Scothern [email protected]
    wrote:

    It looks like there is a .nfs file in your upload directory.
    Unfortunately I know almost nothing about NFS, but it looks some process
    has an open file descriptor on that file preventing it from being deleted.
    lsof is your friend here.

    —
    Reply to this email directly or view it on GitHub
    #1116 (comment)
    .

  5. RichardScothern commented on Oct 22, 2015

    @RichardScothern

    The .nfs file is used by NFS itself for inter-node communication (as far as I can tell).

    There may be mount options which do enable a registry to work with NFS. I recommend you ask on irc #docker-distribution to see if anybody else has made it work. Otherwise there are other driver backends to choose from.

  6. jstabenow commented on Oct 26, 2015

    @jstabenow

    are there any solutions/workarounds to resolve/fix this issue?

    ref: #971
    docker: moby/moby#15833

  7. stevvooe commented on Oct 30, 2015

    @stevvooe
    Collaborator

    @jstabenow The main issue is that there some consistency guarantee we get with local disks that we don't get with nfs. My guess would be that the mount options need to be tweaked to avoid the EBUSY errors. The other possibility is that we should retry the operation, but we don't have a reliable reproduction to test this out.

    This seems to be happening during the upload deletion phase. We can tell because we are concluding and upload and cannot delete the .nfs file.

    I google "device or resource busy nfs" and found a whole lot of possible workarounds that you may want to try.

  8. psigen commented on Nov 2, 2015

    @psigen

    I just checked using lsof and determined that the registry itself is holding the stale file handle:

    registry  1161 1179             root    6r      REG               0,39        32      49743 /var/lib/registry/docker/registry/v2/repositories/test_image/_uploads/5ac646c9-dc2b-4378-87e0-4ec45c646192/.nfs000000000000c24f00000003

    This handle is kept around until I do another docker push, at which point it is promptly deleted, and a stale handle for the new image is now created:

    registry  1161 1179             root    6r      REG               0,39        32      49745 /var/lib/registry/docker/registry/v2/repositories/test_image2/_uploads/395cb041-4b23-4c60-8bc1-bca7e89ce952/.nfs000000000000c25100000004

    One cause of NFS stale file handles is when a file handle is still open when an OS call attempts to delete the file. Is it possible that the reference to the file handle used for the upload is still in scope in the registry when the subsequent step of deleting the _uploads/ directory occurs?

    On a normal filesystem, this probably doesn't cause any issues because the OS can simply hang onto the inode, but since NFS creates an undeletable busy resource in the same directory when the file is deleted, it fails the directory delete operation.

    If this is the case, adjusting the scope of the upload file handle might resolve the issue.

  9. stevvooe commented on Nov 2, 2015

    @stevvooe
    Collaborator

    @psigen I do agree that the nfs problem is happening during cleanup of the upload resource.

    I'm a little confused by details of your analysis. Are you saying that we are holding on to an extra resource during the deletion or that the resource is created as a side-effect of the deletion? What do you mean by "adjusting the scope of the upload file handle"? Are you suggesting that we change the path layout?

    Really, I expect this to be resolved with a changed nfs configuration. I don't know NFS well enough to make a suggestion, but there has to be something that will ensure that these deletes can proceed in a posix fashion, especially since we've seen this work in some cases but not others.

  10. psigen commented on Nov 2, 2015

    @psigen

    I've already tried a number of NFS file options (noac, sync, hard), but the underlying issue is that something in the registry is maintaining an open file handle on the uploaded blob as far as the OS is concerned.

    When the file blob is deleted, as long as that file handle is kept open by the registry, the NFS driver creates a stale file placeholder .nfsXXXXXXXX that shows up as an undeletable file in the same directory (all access is blocked by device or resource busy errors). As long as that file exists, the parent directory cannot be deleted.

    I'm not very familiar with golang, so when I'm referring to a scope issue, I'm referring to one or more of the IO operations on the uploaded binary blob opening a file descriptor from the OS but not disposing of it, making the file descriptor remain open until another file is uploaded. At this point the original handle probably goes out of scope and gets GC'ed, which cleans up the stale file. When I say "adjusting the scope" I mean making sure that the handle gets disposed within the appropriate function scope.

    I'm basing this on the fact that the .nfsXXXXXXXXX files are not spurious, they remain in place exactly as long as the registry is running, or until a client does another docker push.

    I was doing some investigation into the blobwriter API in registry/storage, where I suspect the problem might be originating, but I don't really have an environment to build all of this, so I haven't made much progress.

  11. stevvooe commented on Nov 2, 2015

    @stevvooe
    Collaborator

    @psigen The problem code path is likely in (*blobWriter).Commit, if we are leaking a resource. The reader allocated in (*blobWriter).validateBlob since there isn't a balancing close. I'll submit a PR for that, but I recommend you continue the analysis.

  12. psigen commented on Nov 2, 2015

    @psigen

    Thanks @stevvooe: I just tested out your fork #1149, and this issue is completely resolved on my NFS mount!

  13. added this to the Registry/2.2 milestone on Nov 2, 2015
  14. stevvooe commented on Nov 2, 2015

    @stevvooe
    Collaborator

    @psigen O wow. Good to hear!

    Closing this as fixed!

    @RichardScothern Any chance getting this into the release?

  15. self-assigned this
    on Nov 2, 2015
  16. mindscratch commented on Nov 2, 2015

    @mindscratch

    this would be great, would love to upgrade to docker 1.8.x once the updated registry is out.

  17. michaelsauter commented on Nov 3, 2015

    @michaelsauter

    @stevvooe Thanks a lot for the fix! Would be great to get this into a release soon.

  18. stevvooe commented on Nov 3, 2015

    @stevvooe
    Collaborator

    @michaelsauter No problem. Looks like it made the release that happened today!

  19. michaelsauter commented on Nov 4, 2015

    @michaelsauter

    @stevvooe Awesome.

  20. jstabenow commented on Nov 4, 2015

    @jstabenow

    @stevvooe You made my day! Thank you for taking the time!

  21. stevvooe commented on Nov 4, 2015

    @stevvooe
    Collaborator

    Direct your thanks to @psigen. His analysis pointed us in the right direction!

  22. bsuiram commented on Apr 15, 2016

    @bsuiram

    We are seeing these errors on v2.4.0 of distribution, reverting to v2.3.1. Regression?
    @stevvooe

  23. stevvooe commented on Apr 15, 2016

    @stevvooe
    Collaborator

    @bsuiram Unless you're using NFS, it is unlikely you're seeing the same problem. Open another issue describing the problem and we'll take a look.

  24. bsuiram commented on Apr 18, 2016

    @bsuiram

    @stevvooe, we are using nfs.
    I can open another issue if thats better, but i think this issue is related.

  25. stevvooe commented on Apr 18, 2016

    @stevvooe
    Collaborator

    @bsuiram We fixed this issue with #1149. It is possible that there is a regression, but the fix is likely another patch like that. I think it would be best if you opened a second issue, referencing this one as a possible cause. If they are duplicates, we can make that call after root cause has been identified.

  26. RichardScothern commented on Apr 20, 2016

    @RichardScothern

    @bsuiram : please come to #1645

  27. somashekarg commented on Mar 16, 2017

    @somashekarg

    somashekar@somashekar:~/Desktop/mssql$ heroku container:push --app mssql-test
    Sending build context to Docker daemon 371 MB
    Step 1/7 : FROM heroku/heroku:16
    ---> cc0caac6a5c5
    Step 2/7 : FROM microsoft/mssql-server-linux:latest
    ---> aa104c338ea3
    Step 3/7 : EXPOSE 1433
    ---> Using cache
    ---> 3e89f2aabd0b
    Step 4/7 : ARG user
    ---> Using cache
    ---> 80b32c2af42e
    Step 5/7 : WORKDIR /var/opt/mssql
    ---> Using cache
    ---> 869aa05a0587
    Step 6/7 : VOLUME /var/opt/mssql/data /var/opt/mssql/data
    ---> Using cache
    ---> 6add8a1f42f3
    Step 7/7 : CMD /opt/mssql/bin/sqlservr
    ---> Using cache
    ---> 68537ddb86c3
    Successfully built 68537ddb86c3
    The push refers to a repository [registry.heroku.com/mssql-test/web]
    02d9d2901297: Retrying in 1 second
    588e319013ef: Retrying in 1 second
    7e20a5da50cf: Retrying in 5 seconds
    3da04e6301f6: Retrying in 5 seconds
    f1e60b0cfe77: Retrying in 1 second
    cc31aa8aca7d: Waiting
    668724d35c59: Waiting
    d7c22be21371: Waiting
    c1bd37d01c89: Waiting
    943edb549a83: Waiting
    bf6751561805: Waiting
    f934e33a54a6: Waiting
    e7ebc6e16708: Waiting
    received unexpected HTTP status: 500 Internal Server Error
    ! Error: docker push exited with 1
    While pushing to heroku private space i am getting this error

  28. stevvooe commented on Mar 16, 2017

    @stevvooe
    Collaborator

    @somashekarg You'll have to contact heroku. A 500 error is a catch all and could be anything. It also looks like it is a part of their infrastructure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions