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

Error response from daemon: unknown: artifact stencilapi:4.3.0.1 not found #17544

Closed
wei-hsin-story opened this issue Sep 14, 2022 · 19 comments
Closed
Assignees
Labels
more-info-needed The issue author need to provide more details and context to the issue needs/triage triage issue before assigning

Comments

@wei-hsin-story
Copy link

wei-hsin-story commented Sep 14, 2022

upgraded from v2.2.1 to v2.6.0 .

I found some conditions when pull partial image occurred "Error response from daemon: unknown: artifact stencilapi:4.3.0.1 not found"
But from UI , it exactly existed the image.

Then I deleted the image stencilapi and re-push ,
I feel confused from UI.
image
image

It have two the same image repository
Now it is work for me.
But how to remove redundant repositories ?
I have no idea to do , because delete it from UI seems to not work.

Is there more methods for correct operation ?

@tm-chang
Copy link

Hello, We upgrade harbor from 2.2. We also encountered the similar issue. We found different from Harbor UI to API request.
For example:
Use API:
https://xxx.xxx.com/api/v2.0/projects//repositories//artifacts/4.3.0.12/tags?page=1&page_size=10&with_signature=false&with_immutable_status=false
The result:
{
"errors": [
{
"code": "NOT_FOUND",
"message": "/<repo_name>:4.3.0.12 not found"
}
]
}

UI:
截圖 2022-09-19 下午4 28 02

Pls help find root cause.
Thanks,
TM

@willislin0206
Copy link

Today we also had the same issues.
When upgrade to latest version , we found partial images CAN NOT pull.
Total image repository 2047 , about 60 counts occurred "Not Found"

any solutions or else advices for me?
Thanks!

@chlins
Copy link
Member

chlins commented Sep 20, 2022

Hello, We upgrade harbor from 2.2. We also encountered the similar issue. We found different from Harbor UI to API request. For example: Use API: https://xxx.xxx.com/api/v2.0/projects//repositories//artifacts/4.3.0.12/tags?page=1&page_size=10&with_signature=false&with_immutable_status=false The result: { "errors": [ { "code": "NOT_FOUND", "message": "/<repo_name>:4.3.0.12 not found" } ] }

UI: 截圖 2022-09-19 下午4 28 02

Pls help find root cause. Thanks, TM

@tm-chang It seems your API path is not correct, please refer to harbor swagger docs.

@chlins
Copy link
Member

chlins commented Sep 20, 2022

@wei-hsin-story @willy2653 Please check the artifact table to look for the missing artifacts.

@chlins chlins assigned chlins and wy65701436 and unassigned chlins Sep 25, 2022
@stonezdj
Copy link
Contributor

stonezdj commented Sep 26, 2022

You could try this workaround:

  1. Backup your database data and expose the database port
  2. Check the duplicate repository name
// change the localhost to the hostname of your database host, and also change the username/password if required
docker run --rm firstfloor/before_reindex:latest --dburl=postgres://postgres:root123@localhost:5432/registry --command=list

  1. Fix the duplicated repository name
// change the localhost to the hostname of your database host,and also change the username/password if required
docker run --rm firstfloor/before_reindex:latest --dburl=postgres://postgres:root123@localhost:5432/registry --command=fix
  1. Reindex the repository table
REINDEX TABLE repository;

@wei-hsin-story
Copy link
Author

@wei-hsin-story @willy2653 Please check the artifact table to look for the missing artifacts.
Hi @chlins
some imags were impacted can't pull by Tag Name.
It's very tricky.
ArtifactQuery

If using the sha256 to pull, it's actually work !

@wei-hsin-story
Copy link
Author

@stonezdj
I will try the method to remove duplicate repository name.
thanks for your advice and response !

@stonezdj stonezdj self-assigned this Sep 27, 2022
@wy65701436
Copy link
Contributor

dup with: #15620

@stonezdj
Copy link
Contributor

@wei-hsin-story Does it work?

@wei-hsin-story
Copy link
Author

@stonezdj
sorry for later.
I prepare the new environment to validate.

@wy65701436 wy65701436 added the more-info-needed The issue author need to provide more details and context to the issue label Nov 1, 2022
@wy65701436
Copy link
Contributor

@stonezdj we still need to investigate why the index on repository name is corrupted.

@thechristschn
Copy link

I currently have the same problem after updating from 2.1.1 to 2.6.2 with 10 of 1272 repositories.

@stonezdj I would really like to try your proposed fix. But is the source of firstfloor/before_reindex:latest public? I would like to know what the image does, before I execute it in our environment.

@stonezdj
Copy link
Contributor

stonezdj commented Feb 6, 2023

The source of firstfloor/before_reindex:latest: https://github.com/stonezdj/before_reindex

@stonezdj
Copy link
Contributor

stonezdj commented Mar 14, 2023

Because this issue is uneasy to reproduce in our env, and we have no clear conclusion for it, handle it case by case.

@github-actions
Copy link

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

@github-actions github-actions bot added the Stale label May 13, 2023
@wy65701436
Copy link
Contributor

Hey @stonezdj, what do you think about closing this issue and using the workaround mentioned in #17544 (comment)? Also, I didn't see any reports of this issue in v2.8.

@github-actions github-actions bot removed the Stale label May 29, 2023
@github-actions
Copy link

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

@github-actions github-actions bot added the Stale label Jul 28, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2023
@MinerYang MinerYang removed the Stale label Oct 23, 2023
@stonezdj
Copy link
Contributor

stonezdj commented Feb 27, 2024

The issue might related to the glibc2.28 change. the glibc 2.28 changed some character sort order esp -_$ with a-z A-Z
see
https://wiki.postgresql.org/wiki/Locale_data_changes
https://postgresql.verite.pro/blog/2018/08/27/glibc-upgrade.html

It caused the database index corruption.

Harbor-db v2.2.x --> glibc 2.26
Harbor-db v2.3.0 --> glibc 2.30
The only way to fix is to remove the duplicate item and reindex the table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-info-needed The issue author need to provide more details and context to the issue needs/triage triage issue before assigning
Projects
None yet
Development

No branches or pull requests

8 participants