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

Harbor replicating harbor-core cause bearer token is not valid yet error in helm installation #18971

Closed
ugurmendi opened this issue Jul 21, 2023 · 7 comments
Assignees
Labels

Comments

@ugurmendi
Copy link

Hello when we deploy harbor registry with helm , we set the replica number to two,after that in another harbor instance (outside of the kubernetes cluster,) we try push base replication the error is 401 unauthorized access,and remote harbor registry state became unhealty after when we examined both harbor-core pods one of them is working fine in other pod the error occured "bearer token is not valid yet"

@MinerYang
Copy link
Contributor

MinerYang commented Jul 24, 2023

Is it the situation same to this issue? #18880
Please kindly provide more info like config file, harbor version and the core.log&&registry.log for both of your source harbor and target harbor.
And is one of the registry container is unhealthy, the service would be impacted, please make sure container is in healthy state.
And also have try to call this reuqest token API on target harbor-core pod

@ugurmendi
Copy link
Author

ugurmendi commented Jul 24, 2023

Yes same isssue with that ticket id for values.yaml I only changes the areas which ares shown blow:
certSource: secret
ingress:
hosts: "foo"
core: "foo"
notary: "foo.bar.notary"
externalURL: "https://foo"
core:
image:
repository: goharbor/harbor-core
tag: v2.8.2

set the service account to be used, default if left empty

serviceAccountName: ""

mount the service account token

automountServiceAccountToken: false
replicas: 2 when I sett the replicas to two error starting to occured in core
revisionHistoryLimit: 10

Startup probe values

startupProbe:
enabled: true
initialDelaySeconds: 10

These are my pods
image


harbor-core-5fb6788d94-2h2lk error which causing the situation
23/07/24 08:20:25.740 [I] [server.go:281] http server Running on http://:8080
2023-07-24T08:22:06Z [INFO] [/controller/registry/controller.go:222]: Start regular health check for registries with interval 5m0s
2023-07-24T08:22:12Z [ERROR] [/pkg/token/token.go:68]: parse token error, token is not valid yet
2023-07-24T08:22:12Z [WARNING] [/server/middleware/security/v2_token.go:53][requestID="090875cdcc40c534cf970459b8173d45"]: failed to decode bearer token: token is not valid yet

harbor-core-5fb6788d94-2zgpb other core pod logs:
2023/07/24 08:20:20.630 [I] [server.go:281] http server Running on http://:8080
2023-07-24T08:20:33Z [INFO] [/controller/registry/controller.go:222]: Start regular health check for registries with interval 5m0s

For other harbor it is working just fine there is no problem in both harbor instance unless I set the replica count to 2 for harbor-core

Harbor version is 2.8.2

@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 Sep 22, 2023
@ugurmendi
Copy link
Author

ugurmendi commented Sep 22, 2023

still open

@github-actions github-actions bot removed the Stale label Sep 23, 2023
@shapirus
Copy link

FWIW, I'm no longer seeing this issue after changing from a harbor-operator managed instance of harbor v2.5.4 to harbor v2.9.0 deployed via the helm chart. Can now run more than one replica of harbor-core without getting authentication errors.

Copy link

github-actions bot commented Jan 5, 2024

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 Jan 5, 2024
Copy link

github-actions bot commented Feb 4, 2024

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 Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants