distribution: Unknown error with 2.5.1/2.6.0-rc1/2.6.0-rc2 and Amazon S3

Testing with Amazon S3

Run command

docker run -d -p 5000:5000 --restart=always --name registry2 -v /root/certs:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/MYCERT.crt -e REGISTRY_HTTP_TLS_KEY=/certs/MYCERT.key -e REGISTRY_STORAGE_DELETE_ENABLED=True -e REGISTRY_STORAGE=s3 -e REGISTRY_STORAGE_S3_BUCKET=MYBUCKET -e REGISTRY_STORAGE_S3_ACCESSKEY=MYACCESSKEY -e REGISTRY_STORAGE_S3_REGION=eu-west-1 -e REGISTRY_STORAGE_S3_SECRETKEY=MYSECRETKEY registry:2.6.0-rc.2

Log Error

[03/Jan/2017:07:44:38 +0000] "GET /v2/_catalog HTTP/2.0" 500 133 "" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
time="2017-01-03T07:44:38Z" level=error msg="response completed with error" err.code=unknown err.detail="s3aws: invalid path: /docker/registry/v2/repositories/" err.message="unknown error" go.version=go1.7.3 http.request.host="MYREGISTRYURL:5000" http.request.id=3853a3ed-c3fe-4861-bf50-173a538cdd32 http.request.method=GET http.request.remoteaddr="MYIP:60599" http.request.uri="/v2/_catalog" http.request.useragent="Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0" http.response.contenttype="application/json; charset=utf-8" http.response.duration=11.306346ms http.response.status=500 http.response.written=133 instance.id=4b00186d-80ec-42ed-99fc-fe46e67c1e71 version=v2.6.0-rc.2 

Browser Error https://MYREGISTRYURL:5000/v2/_catalog

{"errors":[{"code":"UNKNOWN","message":"unknown error","detail":{"Path":"/docker/registry/v2/repositories/","DriverName":"s3aws"}}]}

Amazon policies aren’t the problem, tested with S3FullAccess polocy

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 20 (2 by maintainers)

Most upvoted comments

@JaviSabalete The _ prefixed files are “system” directories, so this looks okay.

@dmcgowan I think your reproduction shows that we need a fix in the driver. Can we add a test case that hits one of these bad paths?

With <= 2.5.0 not working neither but no errors

Log Error

[03/Jan/2017:08:09:09 +0000] "GET /v2/_catalog HTTP/1.1" 200 20 "" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
time="2017-01-03T08:13:28Z" level=info msg="response completed" go.version=go1.6.3 http.request.host="MYREGISTRYURL:5000" http.request.id=1e234ebd-74cb-4828-bc65-922eb0148659 http.request.method=GET http.request.remoteaddr="MYIP:33167" http.request.uri="/v2/_catalog" http.request.useragent="Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0" http.response.contenttype="application/json; charset=utf-8" http.response.duration=19.635087ms http.response.status=200 http.response.written=20 instance.id=eca3e7ae-f179-4f12-a392-c50ef2e8513d version=v2.5.0

Browser Error https://MYREGISTRYURL:5000/v2/_catalog

{"repositories":[]}