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

How to find gc logs ? #21403

Open
zrzzxw opened this issue Jan 13, 2025 · 2 comments
Open

How to find gc logs ? #21403

zrzzxw opened this issue Jan 13, 2025 · 2 comments

Comments

@zrzzxw
Copy link

zrzzxw commented Jan 13, 2025

I met with gc error status , like:
image
However, when I clicked the error log link to see what's happening, but it seems the data is too big to see the whole:
image
Could anyone have better method to get the whole error logs ?
I will very appreciate for that, thanks ~

@zrzzxw
Copy link
Author

zrzzxw commented Jan 13, 2025

And I also met with this error :
image
Ops....How to fix it ....

@stonezdj
Copy link
Contributor

stonezdj commented Jan 14, 2025

What is your garbage collection's schedule?

Because of this issue: https://github.com/goharbor/harbor/wiki/Harbor-FAQs#job-service, GC job will be lost of track after 24 hour when it is still running.
You can find the gc with the following command:

docker exec -it harbor-db bash
psql -U postgres -d registry

-- get the id of the latest execution
select id, status from execution where vendor_type = 'GARBAGE_COLLECTION' order by id desc
-- get the task of the latest gc execution
select job_id from task where execution_id = <execution_id>
-- tail the log file:
cd /data/job_logs/
tail -f <job_id>.log

If you cannot the execution of the GC, you need to find log files GC log under /data/job_logs by its content manually.

You have mentioned two errors, Are these two errors GC related?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants