Skip to content

Push to the registry fails with HTTP 500 #1645

Closed

Description

@sergeyfd

I've built a test image which is completely runnable locally and can be pushed to some of our internal registries. However a push to the new 2.4 fails with HTTP 500 error. Docker client is 1.7. Here's what I see in the Registry logs:

Apr 18 17:24:14 d203360-004-e2 docker/97614f2c5f0c[1266]: time="2016-04-18T21:24:14.358396646Z" level=error msg="error canceling upload after error: remove /var/lib/registry/docker/registry/v2/repositories/trepo/test/_uploads/e599441e-c252-43fd-bb67-3f148a371adb/data: no such file or directory" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=2421915b-0e83-4c86-8d37-f159020ba62e http.request.method=PUT http.request.remoteaddr="172.17.42.1:42294" http.request.uri="/v2/trepo/test/blobs/uploads/e599441e-c252-43fd-bb67-3f148a371adb?_state=NDmSo6YXFo4JCPic8Z-WphfbNXNX6IZD-iAmo-WMJOp7Ik5hbWUiOiJ0cmVwby90ZXN0IiwiVVVJRCI6ImU1OTk0NDFlLWMyNTItNDNmZC1iYjY3LTNmMTQ4YTM3MWFkYiIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0xOFQyMToyNDoxNC4wODk1MjgwMjlaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=006d2351-5202-425d-8503-7148f085bb77 service=registry vars.name="trepo/test" vars.uuid=e599441e-c252-43fd-bb67-3f148a371adb version=v2.4.0
Apr 18 17:24:14 d203360-004-e2 docker/97614f2c5f0c[1266]: time="2016-04-18T21:24:14.381202807Z" level=debug msg="filesystem.PutContent(\"/docker/registry/v2/repositories/trepo/test/_uploads/e599441e-c252-43fd-bb67-3f148a371adb/hashstates/sha256/32\")" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=2421915b-0e83-4c86-8d37-f159020ba62e http.request.method=PUT http.request.remoteaddr="172.17.42.1:42294" http.request.uri="/v2/trepo/test/blobs/uploads/e599441e-c252-43fd-bb67-3f148a371adb?_state=NDmSo6YXFo4JCPic8Z-WphfbNXNX6IZD-iAmo-WMJOp7Ik5hbWUiOiJ0cmVwby90ZXN0IiwiVVVJRCI6ImU1OTk0NDFlLWMyNTItNDNmZC1iYjY3LTNmMTQ4YTM3MWFkYiIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0xOFQyMToyNDoxNC4wODk1MjgwMjlaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=006d2351-5202-425d-8503-7148f085bb77 service=registry trace.duration=22.612295ms 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=11812c35-66e6-4582-b500-e0260f431467 trace.line=95 vars.name="trepo/test" vars.uuid=e599441e-c252-43fd-bb67-3f148a371adb version=v2.4.0
Apr 18 17:24:14 d203360-004-e2 docker/97614f2c5f0c[1266]: time="2016-04-18T21:24:14.381374577Z" level=error msg="response completed with error" err.code=unknown err.detail="filesystem: remove /var/lib/registry/docker/registry/v2/repositories/trepo/test/_uploads/e599441e-c252-43fd-bb67-3f148a371adb: directory not empty" err.message="unknown error" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=2421915b-0e83-4c86-8d37-f159020ba62e http.request.method=PUT http.request.remoteaddr="172.17.42.1:42294" http.request.uri="/v2/trepo/test/blobs/uploads/e599441e-c252-43fd-bb67-3f148a371adb?_state=NDmSo6YXFo4JCPic8Z-WphfbNXNX6IZD-iAmo-WMJOp7Ik5hbWUiOiJ0cmVwby90ZXN0IiwiVVVJRCI6ImU1OTk0NDFlLWMyNTItNDNmZC1iYjY3LTNmMTQ4YTM3MWFkYiIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0xOFQyMToyNDoxNC4wODk1MjgwMjlaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=185.749525ms http.response.status=500 http.response.written=247 instance.id=006d2351-5202-425d-8503-7148f085bb77 service=registry vars.name="trepo/test" vars.uuid=e599441e-c252-43fd-bb67-3f148a371adb version=v2.4.0

Activity

  1. RichardScothern commented on Apr 18, 2016

    @RichardScothern

    error canceling upload after error: remove /var/lib/registry/docker/registry/v2/repositories/trepo/test/_uploads/e599441e-c252-43fd-bb67-3f148a371adb/data: no such file or directory is problematic

    Can you post the logs from the docker engine (in debug mode)?

  2. sergeyfd commented on Apr 19, 2016

    @sergeyfd
    ContributorAuthor

    Here you are:

    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.278160082-04:00" level=debug msg="Calling POST /images/{name:.*}/push"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.278200330-04:00" level=info msg="POST /v1.19/images/localhost:5000/trepo/test/push?tag="
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.278428924-04:00" level=debug msg="pinging registry endpoint http://localhost:5000/v0/"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.278460354-04:00" level=debug msg="attempting v2 ping for registry endpoint https://localhost:5000/v2/"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.279868602-04:00" level=debug msg="attempting v1 ping for registry endpoint https://localhost:5000/v1/"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.280964693-04:00" level=debug msg="Error from registry "https://localhost:5000/v0/\" marked as insecure: unable to ping registry endpoint https://localhost:5000/v0/\nv2 ping attempt failed with error: Get https://localhost:5000/v2/: tls: oversized record received with length 20527\n v1 ping attempt failed with error: Get https://localhost:5000/v1/_ping: tls: oversized record received with length 20527. Insecurely falling back to HTTP"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.281005064-04:00" level=debug msg="attempting v2 ping for registry endpoint http://localhost:5000/v2/"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.287381922-04:00" level=debug msg="pinging registry endpoint http://localhost:5000/v0/"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.287411094-04:00" level=debug msg="attempting v2 ping for registry endpoint https://localhost:5000/v2/"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.288659433-04:00" level=debug msg="attempting v1 ping for registry endpoint https://localhost:5000/v1/"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.289741388-04:00" level=debug msg="Error from registry "https://localhost:5000/v0/\" marked as insecure: unable to ping registry endpoint https://localhost:5000/v0/\nv2 ping attempt failed with error: Get https://localhost:5000/v2/: tls: oversized record received with length 20527\n v1 ping attempt failed with error: Get https://localhost:5000/v1/_ping: tls: oversized record received with length 20527. Insecurely falling back to HTTP"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.289778790-04:00" level=debug msg="attempting v2 ping for registry endpoint http://localhost:5000/v2/"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.320423342-04:00" level=debug msg="Checking against map[string]string{"latest":"e82b3843f960f60b39dad2daa225130122ae9979ba110adb6088e427921195cf"}"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.320473825-04:00" level=debug msg="Getting authorization for trepo/test [pull push]"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.320492309-04:00" level=debug msg="Pushing repository: localhost:5000/trepo/test:latest"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.321710300-04:00" level=debug msg="Pushing layer: e82b3843f960f60b39dad2daa225130122ae9979ba110adb6088e427921195cf"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.322044403-04:00" level=debug msg="activateDeviceIfNeeded(e82b3843f960f60b39dad2daa225130122ae9979ba110adb6088e427921195cf)"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.322069960-04:00" level=debug msg="[devmapper] cancelDeferredRemoval START(docker-253:5-1048768-e82b3843f960f60b39dad2daa225130122ae9979ba110adb6088e427921195cf)"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.322197715-04:00" level=debug msg="[devmapper] cancelDeferredRemoval END(%!s(func() string=0x701740))"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.428222433-04:00" level=debug msg="activateDeviceIfNeeded(d7dce7c0d37f476e4b45035e04dfe9897009be13fe5706135c9886cf964d779d)"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.428992492-04:00" level=debug msg="[devmapper] cancelDeferredRemoval START(docker-253:5-1048768-d7dce7c0d37f476e4b45035e04dfe9897009be13fe5706135c9886cf964d779d)"
    Apr 19 10:14:13 d203360-004-e2 docker: time="2016-04-19T10:14:13.429100229-04:00" level=debug msg="[devmapper] cancelDeferredRemoval END(%!s(func() string=0x701740))"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.569917404-04:00" level=debug msg="[devmapper] UnmountDevice(hash=d7dce7c0d37f476e4b45035e04dfe9897009be13fe5706135c9886cf964d779d)"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.569978974-04:00" level=debug msg="[devmapper] Unmount(/var/lib/docker/devicemapper/mnt/d7dce7c0d37f476e4b45035e04dfe9897009be13fe5706135c9886cf964d779d)"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.612923200-04:00" level=debug msg="[devmapper] Unmount done"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.612983166-04:00" level=debug msg="[devmapper] deactivateDevice(d7dce7c0d37f476e4b45035e04dfe9897009be13fe5706135c9886cf964d779d)"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.613076317-04:00" level=debug msg="[devmapper] RemoveDeviceDeferred START(docker-253:5-1048768-d7dce7c0d37f476e4b45035e04dfe9897009be13fe5706135c9886cf964d779d)"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.616846227-04:00" level=debug msg="[devmapper] RemoveDeviceDeferred END(docker-253:5-1048768-d7dce7c0d37f476e4b45035e04dfe9897009be13fe5706135c9886cf964d779d)"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.616876266-04:00" level=debug msg="[devmapper] deactivateDevice END(d7dce7c0d37f476e4b45035e04dfe9897009be13fe5706135c9886cf964d779d)"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.616894470-04:00" level=debug msg="[devmapper] UnmountDevice(hash=d7dce7c0d37f476e4b45035e04dfe9897009be13fe5706135c9886cf964d779d) END"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.622420663-04:00" level=debug msg="rendered layer for e82b3843f960f60b39dad2daa225130122ae9979ba110adb6088e427921195cf of [32] size"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.622505037-04:00" level=debug msg="[registry] Calling "POST" http://localhost:5000/v2/trepo/test/blobs/uploads/"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.706187997-04:00" level=debug msg="[registry] Calling "PUT" http://localhost:5000/v2/trepo/test/blobs/uploads/fc187633-5271-4ca7-ad8e-42216b119ada?_state=Dyevin1j-pNCNa5er11BENOv3p4RJ1hFp_wc44G1tIF7Ik5hbWUiOiJ0cmVwby90ZXN0IiwiVVVJRCI6ImZjMTg3NjMzLTUyNzEtNGNhNy1hZDhlLTQyMjE2YjExOWFkYSIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0xOVQxNDoxNDoxNS42MzIzMDg4OTNaIn0%3D"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.706267587-04:00" level=debug msg="Using cached token for "
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.861837916-04:00" level=debug msg="Unexpected response from server: "{\"errors\":[{\"code\":\"UNKNOWN\",\"message\":\"unknown error\",\"detail\":{\"DriverName\":\"filesystem\",\"Enclosed\":{\"Op\":\"remove\",\"Path\":\"/var/lib/registry/docker/registry/v2/repositories/trepo/test/_uploads/fc187633-5271-4ca7-ad8e-42216b119ada\",\"Err\":39}}}]}\n" http.Header{"Content-Type":[]string{"application/json; charset=utf-8"}, "Docker-Distribution-Api-Version":[]string{"registry/2.0"}, "Date":[]string{"Tue, 19 Apr 2016 14:14:15 GMT"}, "Content-Length":[]string{"247"}}"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.862032533-04:00" level=debug msg="[devmapper] UnmountDevice(hash=e82b3843f960f60b39dad2daa225130122ae9979ba110adb6088e427921195cf)"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.862061988-04:00" level=debug msg="[devmapper] Unmount(/var/lib/docker/devicemapper/mnt/e82b3843f960f60b39dad2daa225130122ae9979ba110adb6088e427921195cf)"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.914932493-04:00" level=debug msg="[devmapper] Unmount done"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.914989273-04:00" level=debug msg="[devmapper] deactivateDevice(e82b3843f960f60b39dad2daa225130122ae9979ba110adb6088e427921195cf)"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.915075614-04:00" level=debug msg="[devmapper] RemoveDeviceDeferred START(docker-253:5-1048768-e82b3843f960f60b39dad2daa225130122ae9979ba110adb6088e427921195cf)"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.919380356-04:00" level=debug msg="[devmapper] RemoveDeviceDeferred END(docker-253:5-1048768-e82b3843f960f60b39dad2daa225130122ae9979ba110adb6088e427921195cf)"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.919411053-04:00" level=debug msg="[devmapper] deactivateDevice END(e82b3843f960f60b39dad2daa225130122ae9979ba110adb6088e427921195cf)"
    Apr 19 10:14:15 d203360-004-e2 docker: time="2016-04-19T10:14:15.919429204-04:00" level=debug msg="[devmapper] UnmountDevice(hash=e82b3843f960f60b39dad2daa225130122ae9979ba110adb6088e427921195cf) END"

  3. RichardScothern commented on Apr 19, 2016

    @RichardScothern

    The registry is having a problem completing the upload. It tries to move this file:
    /var/lib/registry/docker/registry/v2/repositories/trepo/test/_uploads/e599441e-c252-43fd-bb67-3f148a371adb/data into the blobs directory but cannot find it.

    It then tries to rmdir /var/lib/registry/docker/registry/v2/repositories/trepo/test/_uploads/e599441e-c252-43fd-bb67-3f148a371adb but it's not empty.

    Is there anything unusual about your filesystem (vfs maybe)? Can you see what is in the upload directory?

    If you were to run an older registry version with the same configuration, does the problem still exhibit?

  4. sergeyfd commented on Apr 19, 2016

    @sergeyfd
    ContributorAuthor

    We use NFS (NetApp) as the backend storage here. We switched this Registry from 2.2.1 to 2.4. There were no issues when we were running 2.2.1. BTW, now we switched it back to 2.2.1 and pushes started coming through.

    _uploads directory on these failed pushes looks like this:

    ./test/_uploads/e599441e-c252-43fd-bb67-3f148a371adb/hashstates
    ./test/_uploads/8f429620-b753-4d24-adf3-731d69ee9e3e/hashstates
    ./test/_uploads/641ca759-7e70-4ad2-a2c0-4d077534e399/hashstates
    ./test/_uploads/178365e2-d16b-434a-8999-216c32bd71d2/hashstates
    ./test/_uploads/be03a8a7-25aa-40d5-8ca4-aa390df456cb/hashstates
    ./test/_uploads/e4556965-3395-4960-a9b0-60f2d1c42f80/hashstates
    ./test/_uploads/018d5ffb-4672-495e-9bf6-843f78e030a9/hashstates
    ./test/_uploads/a72944b8-2f62-4388-bf53-9c8d26dfa3bc/hashstates
    ./test/_uploads/fc187633-5271-4ca7-ad8e-42216b119ada/hashstates

  5. RichardScothern commented on Apr 19, 2016

    @RichardScothern

    Can you test with 2.3.1? I suspect this is a 2.4 problem, but want to be sure.

    Can you lsof the registry process and see if it's hanging onto an open fd? I think we are seeing a regression of #1116

  6. sergeyfd commented on Apr 19, 2016

    @sergeyfd
    ContributorAuthor

    Yes it does seem like a problem in 2.4. My push works all right in 2.3.1 and fails when I try to push same image into 2.4.

    I tried to catch any anomalies with lsof but wasn't able to.

  7. RichardScothern commented on Apr 20, 2016

    @RichardScothern

    I have a fix for one of the problems seen here #1645 (comment).

    @sergeyfd can you test your setup with this image distribution/registry:2.4.0-acd5b2

  8. stevvooe commented on Apr 20, 2016

    @stevvooe
    Collaborator

    @RichardScothern This doesn't look like a regression. The dangling files in #1116 are still getting closed. I think you have the main issue with the hashstates. There may be some other dangling nfs files.

    @sergeyfd Is that output done with ls -al? Are there any hidden files?

  9. sergeyfd commented on Apr 20, 2016

    @sergeyfd
    ContributorAuthor

    @RichardScothern distribution/registry:2.4.0-acd5b2 did not solve the issue.

    @stevvooe I do not see any hidden files under _uploads.

  10. RichardScothern commented on Apr 20, 2016

    @RichardScothern

    @stevvooe yes, this wasn't regression of the NFS dangling files. The hashstates not being cleaned up (which was actually fixed before the 2.0 release) was the regression.

    Anyway.

    @sergeyfd do you still see this error in the logs:
    filesystem: remove /var/lib/registry/docker/registry/v2/repositories/trepo/test/_uploads/e599441e-c252-43fd-bb67-3f148a371adb: directory not empty". If yes, what is in the that directory?

  11. sergeyfd commented on Apr 20, 2016

    @sergeyfd
    ContributorAuthor

    @RichardScothern This is what I see in the log file:

    Apr 20 15:19:40 d203360-004-e2 docker: time="2016-04-20T15:19:40.547221483-04:00" level=debug msg="Error from registry \"https://localhost:5000/v0/\" marked as insecure: unable to ping registry endpoint https://localhost:5000/v0/\nv2 ping attempt failed with error: Get https://localhost:5000/v2/: tls: oversized record received with length 20527\n v1 ping attempt failed with error: Get https://localhost:5000/v1/_ping: tls: oversized record received with length 20527. Insecurely falling back to HTTP"
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.708808928Z" level=error msg="unable to delete layer upload resources \"/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643\": filesystem: remove /var/lib/registry/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643: directory not empty" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.708903439Z" level=error msg="unknown error completing upload: driver.Error{DriverName:\"filesystem\", Enclosed:(*os.PathError)(0xc820474180)}" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.731407046Z" level=error msg="error canceling upload after error: remove /var/lib/registry/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643/data: no such file or directory" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.766926905Z" level=error msg="response completed with error" err.code=unknown err.detail="filesystem: remove /var/lib/registry/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643: directory not empty" err.message="unknown error" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=190.759038ms http.response.status=500 http.response.written=253 instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    
  12. RichardScothern commented on Apr 20, 2016

    @RichardScothern

    What is in /var/lib/registry/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643 ?

  13. sergeyfd commented on Apr 20, 2016

    @sergeyfd
    ContributorAuthor
    -bash-4.2$ ls -la
    total 12
    drwxr-xr-x.  3 dockeradm dockeradm 4096 Apr 20 15:19 .
    drwxr-xr-x. 11 dockeradm dockeradm 4096 Apr 20 15:19 ..
    drwxr-xr-x.  3 dockeradm dockeradm 4096 Apr 20 15:19 hashstates
    
  14. RichardScothern commented on Apr 20, 2016

    @RichardScothern

    Hmm. Removing the hashstates data is what this image fixed (i just reconfirmed with a posix fs), and I have no idea why it isn't being removed with NFS.

    Can you post the registry logs for the upload? (i want to check the ordering of the file operations)

  15. sergeyfd commented on Apr 20, 2016

    @sergeyfd
    ContributorAuthor

    Here you go:

    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: 172.17.42.1 - - [20/Apr/2016:19:19:42 +0000] "POST /v2/dubros/push_test/blobs/uploads/ HTTP/1.1" 202 0 "" "docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64"
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.578612861Z" level=debug msg="authorizing request" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.578825804Z" level=debug msg="(*linkedBlobStore).Resume" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.593471855Z" level=debug msg="filesystem.GetContent(\"/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643/startedat\")" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry trace.duration=14.534798ms 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).GetContent" trace.id=fe46cb15-0685-4ff4-9a93-892d439b3677 trace.line=82 vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.602919188Z" level=debug msg="filesystem.Writer(\"/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643/data\", true)" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry trace.duration=9.283532ms 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).Writer" trace.id=ae48c4ea-8498-4080-aa6b-fdb40f3ca63d trace.line=124 vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.603118463Z" level=debug msg="(*blobWriter).Commit" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.614270611Z" level=debug msg="filesystem.Stat(\"/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643/data\")" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry trace.duration=58.736\ufffd\ufffds 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=10268939-a645-4653-888f-d7e18dd7ffe0 trace.line=137 vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.632665311Z" level=debug msg="filesystem.Stat(\"/docker/registry/v2/blobs/sha256/a3/a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4/data\")" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry trace.duration=18.238925ms 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=c49b56a4-cdc6-4f46-8810-1699b45039dc trace.line=137 vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.652154269Z" level=debug msg="filesystem.PutContent(\"/docker/registry/v2/repositories/dubros/push_test/_layers/sha256/a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4/link\")" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry trace.duration=19.298073ms 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=51f9b7c1-e1e9-462a-8d10-9b7e64655364 trace.line=95 vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.70870274Z" level=debug msg="filesystem.Delete(\"/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643\")" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry trace.duration=56.408183ms 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=8f42a837-3811-402f-9d71-5f1ebed190b3 trace.line=177 vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.708808928Z" level=error msg="unable to delete layer upload resources \"/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643\": filesystem: remove /var/lib/registry/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643: directory not empty" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.708903439Z" level=error msg="unknown error completing upload: driver.Error{DriverName:\"filesystem\", Enclosed:(*os.PathError)(0xc820474180)}" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.708961107Z" level=debug msg="(*blobWriter).Rollback" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.731407046Z" level=error msg="error canceling upload after error: remove /var/lib/registry/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643/data: no such file or directory" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.766658857Z" level=debug msg="filesystem.PutContent(\"/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643/hashstates/sha256/32\")" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry trace.duration=35.071819ms 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=2e2bab05-65cf-42db-bd02-afb2c6b2aa1b trace.line=95 vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: time="2016-04-20T19:19:42.766926905Z" level=error msg="response completed with error" err.code=unknown err.detail="filesystem: remove /var/lib/registry/docker/registry/v2/repositories/dubros/push_test/_uploads/afd270cc-168d-4556-96de-cab0c4c5d643: directory not empty" err.message="unknown error" go.version=go1.6.1 http.request.host="localhost:5000" http.request.id=df7cb3a6-8e1a-4207-b544-835ab424732c http.request.method=PUT http.request.remoteaddr="172.17.42.1:34365" http.request.uri="/v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=190.759038ms http.response.status=500 http.response.written=253 instance.id=bd623b40-667d-4104-b41f-fbb8f3d25386 service=registry vars.name="dubros/push_test" vars.uuid=afd270cc-168d-4556-96de-cab0c4c5d643 version=acd5b26
    Apr 20 15:19:42 d203360-004-e2 docker/13c8d11e97f3[20183]: 172.17.42.1 - - [20/Apr/2016:19:19:42 +0000] "PUT /v2/dubros/push_test/blobs/uploads/afd270cc-168d-4556-96de-cab0c4c5d643?_state=FDkonNtuNSOdD4M7hz3ZCSJDsOQnB0qZhc2UEM813n57Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImFmZDI3MGNjLTE2OGQtNDU1Ni05NmRlLWNhYjBjNGM1ZDY0MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMFQxOToxOTo0Mi40NjQ3NzcxMTNaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 HTTP/1.1" 500 253 "" "docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64"
    
  16. 4 remaining items

  17. sergeyfd commented on Apr 21, 2016

    @sergeyfd
    ContributorAuthor

    @RichardScothern I've added some additional logging into BlobWriter and finally was able to catch the problem. Don't know how to fix it though

    Apr 21 12:37:04 d203360-004-e2 docker/881f96b5e8ca[20183]: time="2016-04-21T16:37:04.34900016Z" level=error msg="unable to delete layer upload resources \"/docker/registry/v2/repositories/dubros/push_test/_uploads/c2dee766-1177-4de8-8030-a3b3e34decfc\": filesystem: remove /var/lib/registry/docker/registry/v2/repositories/dubros/push_test/_uploads/c2dee766-1177-4de8-8030-a3b3e34decfc: directory not empty" go.version=go1.6 http.request.host="localhost:5000" http.request.id=25eba4bf-d894-4568-921a-a2092424793a http.request.method=PUT http.request.remoteaddr="172.17.42.1:52740" http.request.uri="/v2/dubros/push_test/blobs/uploads/c2dee766-1177-4de8-8030-a3b3e34decfc?_state=SAWgl8OaK9M6KWjmZjyzkcV6veqw_nJu7-taaZJdLwt7Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImMyZGVlNzY2LTExNzctNGRlOC04MDMwLWEzYjNlMzRkZWNmYyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMVQxNjozNzowNC4xNjI4NzgyMDFaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=6d15803c-d99e-4e78-8fcc-ec3e42a60168 service=registry vars.name="dubros/push_test" vars.uuid=c2dee766-1177-4de8-8030-a3b3e34decfc version=
    Apr 21 12:37:04 d203360-004-e2 docker/881f96b5e8ca[20183]: time="2016-04-21T16:37:04.360180866Z" level=debug msg="filesystem.List(\"/docker/registry/v2/repositories/dubros/push_test/_uploads/c2dee766-1177-4de8-8030-a3b3e34decfc\")" go.version=go1.6 http.request.host="localhost:5000" http.request.id=25eba4bf-d894-4568-921a-a2092424793a http.request.method=PUT http.request.remoteaddr="172.17.42.1:52740" http.request.uri="/v2/dubros/push_test/blobs/uploads/c2dee766-1177-4de8-8030-a3b3e34decfc?_state=SAWgl8OaK9M6KWjmZjyzkcV6veqw_nJu7-taaZJdLwt7Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImMyZGVlNzY2LTExNzctNGRlOC04MDMwLWEzYjNlMzRkZWNmYyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMVQxNjozNzowNC4xNjI4NzgyMDFaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=6d15803c-d99e-4e78-8fcc-ec3e42a60168 service=registry trace.duration=11.086168ms 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).List" trace.id=648d3694-b5db-45cc-b6b5-8445a20daca6 trace.line=150 vars.name="dubros/push_test" vars.uuid=c2dee766-1177-4de8-8030-a3b3e34decfc version=
    Apr 21 12:37:04 d203360-004-e2 docker/881f96b5e8ca[20183]: time="2016-04-21T16:37:04.360270286Z" level=error msg="Found: \"/docker/registry/v2/repositories/dubros/push_test/_uploads/c2dee766-1177-4de8-8030-a3b3e34decfc/.nfs00000000007f5e50000000c0\":" go.version=go1.6 http.request.host="localhost:5000" http.request.id=25eba4bf-d894-4568-921a-a2092424793a http.request.method=PUT http.request.remoteaddr="172.17.42.1:52740" http.request.uri="/v2/dubros/push_test/blobs/uploads/c2dee766-1177-4de8-8030-a3b3e34decfc?_state=SAWgl8OaK9M6KWjmZjyzkcV6veqw_nJu7-taaZJdLwt7Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImMyZGVlNzY2LTExNzctNGRlOC04MDMwLWEzYjNlMzRkZWNmYyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMVQxNjozNzowNC4xNjI4NzgyMDFaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=6d15803c-d99e-4e78-8fcc-ec3e42a60168 service=registry vars.name="dubros/push_test" vars.uuid=c2dee766-1177-4de8-8030-a3b3e34decfc version=
    Apr 21 12:37:04 d203360-004-e2 docker/881f96b5e8ca[20183]: time="2016-04-21T16:37:04.360353749Z" level=error msg="unknown error completing upload: driver.Error{DriverName:\"filesystem\", Enclosed:(*os.PathError)(0xc820474780)}" go.version=go1.6 http.request.host="localhost:5000" http.request.id=25eba4bf-d894-4568-921a-a2092424793a http.request.method=PUT http.request.remoteaddr="172.17.42.1:52740" http.request.uri="/v2/dubros/push_test/blobs/uploads/c2dee766-1177-4de8-8030-a3b3e34decfc?_state=SAWgl8OaK9M6KWjmZjyzkcV6veqw_nJu7-taaZJdLwt7Ik5hbWUiOiJkdWJyb3MvcHVzaF90ZXN0IiwiVVVJRCI6ImMyZGVlNzY2LTExNzctNGRlOC04MDMwLWEzYjNlMzRkZWNmYyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNi0wNC0yMVQxNjozNzowNC4xNjI4NzgyMDFaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.7.1 go/go1.4.2 kernel/3.10.0-229.11.1.el7.x86_64 os/linux arch/amd64" instance.id=6d15803c-d99e-4e78-8fcc-ec3e42a60168 service=registry vars.name="dubros/push_test" vars.uuid=c2dee766-1177-4de8-8030-a3b3e34decfc version=
    
    
  18. sergeyfd commented on Apr 21, 2016

    @sergeyfd
    ContributorAuthor

    I THINK I found the issue. In the blobWriter.Commit you need to call bw.Close() after bw.fileWriter.Commit() but before bw.removeResources(ctx). Otherwise romoveAll deletes still opened data file which leads to creation of that .nfsXXXXXX file. I made the change and it seems have fixed the push. In other files you use putContent which closes writer on exit.

    In 2.3.1:

    func (bw *blobWriter) Commit(ctx context.Context, desc distribution.Descriptor) (distribution.Descriptor, error) {
        context.GetLogger(ctx).Debug("(*blobWriter).Commit")
    
        if err := bw.bufferedFileWriter.Close(); err != nil {
            return distribution.Descriptor{}, err
        }
    
  19. stevvooe commented on Apr 21, 2016

    @stevvooe
    Collaborator

    @sergeyfd blobWriter shouldn't have to call bufferedFileWriter.Close. blobWriter.Close should be sufficient. Is it possible this close isn't propagating at the end of the http request?

  20. sergeyfd commented on Apr 21, 2016

    @sergeyfd
    ContributorAuthor

    @stevvooe In 2.4 there's no close call at all. And I am agree blobWriter.Close() is sufficient, but Commit doesn't do it. Probably I wasn't clear enough in the first paragraph.

  21. stevvooe commented on Apr 21, 2016

    @stevvooe
    Collaborator

    @sergeyfd I see. Look fileWriter.Commit isn't working correctly in 2.4 or needs to be paired with a Close call when committing. Inspection of https://github.com/docker/distribution/blob/master/registry/storage/driver/filesystem/driver.go#L357 shows this might be the correct fix.

  22. RichardScothern commented on Apr 21, 2016

    @RichardScothern

    that is helpful @sergeyfd. I think your fix is correct - there is no close after commit.

    Do you mind submitting a PR?

  23. sergeyfd commented on Apr 21, 2016

    @sergeyfd
    ContributorAuthor
  24. stevvooe commented on Apr 21, 2016

    @stevvooe
    Collaborator

    @sergeyfd Sorry if I wasn't clear: there should be a call to close in blobWriter.Commit. It should mirror what was there with bufferedFileWriter in 2.3.

  25. joekohut commented on Apr 26, 2016

    @joekohut

    I have run into the same docker push issue using Registry 2.4 on NFS storage:
    Received unexpected HTTP status: 500 Internal Server Error

    Registry v2.3.1 push behavior works as expected. Tested with 1.9.1 and 1.71 clients successfully. Same clients have the issue with v2.4.

  26. sergeyfd commented on Apr 26, 2016

    @sergeyfd
    ContributorAuthor

    @joekohut This problem is fixed with the PR #1666 Should be in the next release.

  27. jhcook commented on Apr 27, 2016

    @jhcook

    Hi. We are running:

    [justin.cook@k8sinfmas1 ~]$ cat /etc/redhat-release
    CentOS Linux release 7.2.1511 (Core)
    [justin.cook@k8sinfmas1 ~]$ rpm -qi docker-engine
    Name        : docker-engine
    Version     : 1.11.1
    Release     : 0.1.rc1.el7.centos
    ...
    [justin.cook@k8sinfmas1 ~]$ rpm -qi kubernetes
    Name        : kubernetes
    Version     : 1.2.0
    Release     : 0.9.alpha1.gitb57e8bd.el7
    ...
    

    We upgraded to that Docker release because we need privileged. We now have this NFS issue while pushing to an insecure registry. This is actually a big deal, and we would like this escalated to the next release.

  28. RichardScothern commented on Apr 27, 2016

    @RichardScothern

    Mark as fixed by #1666

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions