harbor icon indicating copy to clipboard operation
harbor copied to clipboard

Multiple Harbors Copying 401

Open hsy-go opened this issue 1 year ago • 5 comments

We have deployed two Harbor clusters based on shared storage

  1. An error occurred when using the copy function from Harbor1 (A, B) to Harbor (C, D) error: Jun 27 17:59:35 172.22.0.1 jobservice[1035]: 2024-06-27T09:59:35Z [ERROR] [/controller/replication/transfer/image/transfer.go:470]: failed to pull the manifest of artifact yeepay-docker-staging-local/jgs-invoice-server:202406271757_4583886c: http status code: 401, body: {"errors":[{"code":"UNAUTHORIZED","message":"unauthorized to access repository: yeepay-docker-staging-local/jgs-invoice-server, action: pull: unauthorized to access repository: yeepay-docker-staging-local/jgs-invoice-server, action: pull"}]} Jun 27 17:59:35 172.22.0.1 jobservice[1035]: 2024-06-27T09:59:35Z [ERROR] [/controller/replication/transfer/image/transfer.go:194]: http status code: 401, body: {"errors":[{"code":"UNAUTHORIZED","message":"unauthorized to access repository: yeepay-docker-staging-local/jgs-invoice-server, action: pull: unauthorized to access repository: yeepay-docker-staging-local/jgs-invoice-server, action: pull"}]} Jun 27 17:59:35 172.22.0.1 jobservice[1035]: 2024-06-27T09:59:35Z [ERROR] [/controller/replication/transfer/image/transfer.go:200]: got error during the whole transfer period, mark the job failure Jun 27 17:59:35 172.22.0.1 jobservice[1035]: 2024-06-27T09:59:35Z [ERROR] [/jobservice/runner/redis.go:123]: Job 'REPLICATION:48ca340393330104ecd48016' exit with error: run error: got error during the whole transfer period, mark the job failure Jun 27 17:59:35 172.22.0.1 jobservice[1035]: 2024-06-27T09:59:35Z [ERROR] [/jobservice/hook/hook_agent.go:155]: Retry: sending hook event error: {"errors":[{"code":"NOT_FOUND","message":"task with job ID a12e5b32f8128ed9aee99c32 not found"}]}

hsy-go avatar Jun 27 '24 10:06 hsy-go

共享存储的二台harbor,复制任务去另一套harbor失败率太高,jobservice组件报401

hsy-go avatar Jun 27 '24 10:06 hsy-go

Please make sure your account has proper permission to pull image from repository yeepay-docker-staging-local/jgs-invoice-server

MinerYang avatar Jul 01 '24 05:07 MinerYang

Please check the harbor core log in the source Harbor, and make sure there is no such log https://github.com/goharbor/harbor/blob/4ecc60dbd748569e2d759d6c449e0e6797104146/src/core/auth/authenticator.go#L158

stonezdj avatar Jul 08 '24 07:07 stonezdj

Please check the harbor core log in the source Harbor, and make sure there is no such log

https://github.com/goharbor/harbor/blob/4ecc60dbd748569e2d759d6c449e0e6797104146/src/core/auth/authenticator.go#L158

Please check the harbor core log in the source Harbor, and make sure there is no such log

https://github.com/goharbor/harbor/blob/4ecc60dbd748569e2d759d6c449e0e6797104146/src/core/auth/authenticator.go#L158

I have the same issue, and I suspect that the two Harbor nodes cannot share the same token, which might be causing the problem. Currently, I can only stop the jobservice on one of the nodes. Is there any way to avoid this issue?

hert525 avatar Aug 21 '24 04:08 hert525

I also encountered the same problem, where the push time when using repository replication would throw the following exception: 2024-10-14T14:33:56Z [ERROR] [/controller/replication/transfer/image/transfer.go:194]: http status code: 401, body: {"errors":[{"code":"UNAUTHORIZED","message":"unauthorized to access repository: test/nginx, action: push: unauthorized to access repository: test/nginx, action: push"}]} Under the same configuration, using pull is normal.

AnUtiles avatar Oct 14 '24 14:10 AnUtiles

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[bot] avatar Jan 18 '25 09:01 github-actions[bot]

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[bot] avatar Feb 18 '25 09:02 github-actions[bot]