Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Internal Server Error when uploading images #5

Closed
koskit opened this issue Nov 28, 2022 · 2 comments
Closed

500 Internal Server Error when uploading images #5

koskit opened this issue Nov 28, 2022 · 2 comments

Comments

@koskit
Copy link

koskit commented Nov 28, 2022

Hey @chickenbellyfin ! Great UI for docker registry, really appreciate it.

I've had an issue maybe you can take a look.

I got an internal server error with the following page:
image

and the following logs:
[2022-11-28 18:15:11 +0000] [1] [ERROR] Exception occurred while handling uri: 'http://docker.{reducted}/' Traceback (most recent call last): File "handle_request", line 83, in handle_request from sanic.models.handler_types import ListenerType, MiddlewareType File "/app/src/app.py", line 46, in wrapped return await func(request, *args, **kwargs, creds=creds) File "/app/src/app.py", line 69, in list_repositories repositories = await fetch_repositories(registry, creds=creds) File "/app/src/data_fetch.py", line 55, in fetch_repositories tags = await asyncio.gather(*[api.get_tags(r, creds=creds) for r in repositories]) File "/app/src/api.py", line 53, in get_tags return res['tags'] KeyError: 'tags' [2022-11-28 18:15:11 +0000] - (sanic.access)[INFO][10.0.1.213:55462]: GET http://docker.{reducted}/ 500 799

From my investigation the issue seems to be the following:

When pushing a new image to a repo, it is listed in the catalog as follows:
GET: {reducted_domain}/v2/_catalog
returns:
{"repositories":["{image1}","{image2}","{image3}","{image4}","{image5}"]}
as it is expected to.

But the thing is, the image5 is currently being uploaded/pushed from my computer. The catalog shows it as an image as it is currently being pushed and created an entry for it, but there are no "data" on it when requesting it's tags.

So when requesting https://registry.{reducted}/v2/image5/master/tags/list the registry returns {"errors":[{"code":"NAME_UNKNOWN","message":"repository name not known to registry","detail":{"name":"testimage5"}}]}

So can we have a handle for it, maybe an entry of the image on the screen, but with no links for details?

Thanks again for the project, looks awesome!

@koskit
Copy link
Author

koskit commented Nov 28, 2022

@chickenbellyfin I have confirmed this was the cause of the error because now that the image finished being pushed, the UI works again.

@chickenbellyfin
Copy link
Owner

Thanks for the report. Added a workaround for a old registry bug.
distribution/distribution#777

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants