Giter VIP home page Giter VIP logo

Comments (5)

zebox avatar zebox commented on May 29, 2024

Did you docker login before push from docker client host where you try push?

from registry-admin.

ChrisB85 avatar ChrisB85 commented on May 29, 2024

Yes of course, otherwise there would be no Layer already exists messages.

from registry-admin.

ChrisB85 avatar ChrisB85 commented on May 29, 2024

I noticed one more thing that is iportant here:
token not to be used after 2023-08-12 18:49:18 +0000 UTC - currently 2023-08-12 18:50:04.450141787 +0000 UTC m=+1137.976484753

registry_1        | time="2023-08-12T18:50:04.450025916Z" level=debug msg="authorizing request" go.version=go1.19.9 http.request.host=registry.example.com http.request.id=36ba250b-1f75-4e4f-82ef-20505c478ba7 http.request.method=PATCH http.request.remoteaddr=89.67.20.253 http.request.uri="/v2/someimage/blobs/uploads/96cdc261-78c2-413f-bddb-444561dce03b?_state=54yDQGIsRt40E4223ROMISjILe5wVTzsTZ5PCmcQu-N7Ik5hbWUiOiJjb3JvZmxleCIsIlVVSUQiOiI5NmNkYzI2MS03OGMyLTQxM2YtYmRkYi00NDQ1NjFkY2UwM2IiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMjMtMDgtMTJUMTg6NDc6MTkuMTc1NjY4OTMzWiJ9" http.request.useragent="docker/24.0.2 go/go1.20.4 git-commit/659604f kernel/5.15.90.1-microsoft-standard-WSL2 os/linux arch/amd64 UpstreamClient(Docker-Client/24.0.2 \(linux\))" vars.name=someimage vars.uuid=96cdc261-78c2-413f-bddb-444561dce03b
registry_1        | time="2023-08-12T18:50:04.450157953Z" level=info msg="token not to be used after 2023-08-12 18:49:18 +0000 UTC - currently 2023-08-12 18:50:04.450141787 +0000 UTC m=+1137.976484753"
registry_1        | time="2023-08-12T18:50:04.450243068Z" level=warning msg="error authorizing context: invalid token" go.version=go1.19.9 http.request.host=registry.example.com http.request.id=36ba250b-1f75-4e4f-82ef-20505c478ba7 http.request.method=PATCH http.request.remoteaddr=89.67.20.253 http.request.uri="/v2/someimage/blobs/uploads/96cdc261-78c2-413f-bddb-444561dce03b?_state=54yDQGIsRt40E4223ROMISjILe5wVTzsTZ5PCmcQu-N7Ik5hbWUiOiJjb3JvZmxleCIsIlVVSUQiOiI5NmNkYzI2MS03OGMyLTQxM2YtYmRkYi00NDQ1NjFkY2UwM2IiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMjMtMDgtMTJUMTg6NDc6MTkuMTc1NjY4OTMzWiJ9" http.request.useragent="docker/24.0.2 go/go1.20.4 git-commit/659604f kernel/5.15.90.1-microsoft-standard-WSL2 os/linux arch/amd64 UpstreamClient(Docker-Client/24.0.2 \(linux\))" vars.name=someimage vars.uuid=96cdc261-78c2-413f-bddb-444561dce03b
registry_1        | 172.27.0.2 - - [12/Aug/2023:18:50:04 +0000] "PATCH /v2/someimage/blobs/uploads/96cdc261-78c2-413f-bddb-444561dce03b?_state=54yDQGIsRt40E4223ROMISjILe5wVTzsTZ5PCmcQu-N7Ik5hbWUiOiJjb3JvZmxleCIsIlVVSUQiOiI5NmNkYzI2MS03OGMyLTQxM2YtYmRkYi00NDQ1NjFkY2UwM2IiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMjMtMDgtMTJUMTg6NDc6MTkuMTc1NjY4OTMzWiJ9 HTTP/1.1" 401 218 "" "docker/24.0.2 go/go1.20.4 git-commit/659604f kernel/5.15.90.1-microsoft-standard-WSL2 os/linux arch/amd64 UpstreamClient(Docker-Client/24.0.2 \\(linux\\))"

So I suppose token is expiring during push operation.

from registry-admin.

zebox avatar zebox commented on May 29, 2024

So I suppose token is expiring during push operation.

I think you are right, because registry-admin use default token TTL (60 seconds). It can be occurred when image has big size and a docker client pushing with chunked upload. PATCH method indicate about it in registry log.

I added TokenTTL option to registry section for registry-admin config

You can try it with updated docker image with tag master

docker pull zebox/registry-admin:master

and add token_ttl option with you TTL in the token-ra-config.yml config file:

# registry-admin config file
... 
registry:
  ...
  token_ttl: 3600 # value in seconds
  ...
...

I will add release tag later, after thoroughly test of all changes.

from registry-admin.

ChrisB85 avatar ChrisB85 commented on May 29, 2024

It works, thank you. I think we can close this ticket.

from registry-admin.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.