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

Solutions for getting invalid username or password on fresh install #1851

Open
JasonkayZK opened this issue Oct 31, 2024 · 6 comments
Open

Comments

@JasonkayZK
Copy link

I met invalid username or password error after i deployed the harbor via helm.

Something like this:

image

There are two configs that i modified:

  • Removed the quotes: changed harborAdminPassword: "Harbor12345" to harborAdminPassword: Harbor12345
  • Changed the externalURL https to http

For me, problem solved.

@MinerYang
Copy link
Collaborator

MinerYang commented Nov 4, 2024

Could you please try to clean the cache data/cookie of harbor site on the browser OR just open a new private window for test

@junlintianxiazhifulinzhongguo

I have tested it many times, but this method still doesn't work

@MinerYang
Copy link
Collaborator

Could you please provide your harbor values.yaml config and the harbor-core log

@junlintianxiazhifulinzhongguo
[root@master1 harbor]# helm install my-release harbor/harbor -n harbor-tenant --set expose.tls.enabled=false --set harborAdminPassword=Harbor12345
NAME: my-release
LAST DEPLOYED: Mon Nov  4 17:01:56 2024
NAMESPACE: harbor-tenant
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Please wait for several minutes for Harbor deployment to complete.
Then you should be able to visit the Harbor portal at https://core.harbor.domain
For more details, please visit https://github.com/goharbor/harbor

[root@master1 harbor]# kubectl get pods -n harbor-tenant
NAME                                            READY   STATUS    RESTARTS      AGE
my-release-harbor-core-664bfdcf9d-t7jbp         1/1     Running   0             76s
my-release-harbor-database-0                    1/1     Running   0             76s
my-release-harbor-jobservice-6548d7b5bc-q6dnd   1/1     Running   2 (64s ago)   76s
my-release-harbor-portal-67459df94b-mwnkj       1/1     Running   0             76s
my-release-harbor-redis-0                       1/1     Running   0             76s
my-release-harbor-registry-588bcc4bdb-bb8tk     2/2     Running   0             76s
my-release-harbor-trivy-0                       1/1     Running   0             76s

core logs

[root@master1 harbor]# kubectl logs -n harbor-tenant my-release-harbor-core-664bfdcf9d-t7jbp
Appending internal tls trust CA to ca-bundle ...
find: '/etc/harbor/ssl': No such file or directory
Internal tls trust CA appending is Done.
2024/11/04 09:02:00.426 [D]  init global config instance failed. If you do not use this, just ignore it.  open conf/app.conf: no such file or directory
2024-11-04T09:02:00Z [INFO] [/controller/artifact/annotation/parser.go:85]: the annotation parser to parser artifact annotation version v1alpha1 registered
2024-11-04T09:02:00Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.cncf.helm.config.v1+json registered
2024-11-04T09:02:00Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.cnab.manifest.v1 registered
2024-11-04T09:02:00Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.oci.image.index.v1+json registered
2024-11-04T09:02:00Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.docker.distribution.manifest.list.v2+json registered
2024-11-04T09:02:00Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.docker.distribution.manifest.v1+prettyjws registered
2024-11-04T09:02:00Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.oci.image.config.v1+json registered
2024-11-04T09:02:00Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.docker.container.image.v1+json registered
2024-11-04T09:02:00Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.goharbor.harbor.sbom.v1 registered
2024-11-04T09:02:00Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.wasm.config.v1+json registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/native/adapter.go:36]: the factory for adapter docker-registry registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/aliacr/adapter.go:44]: the factory for adapter ali-acr registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/awsecr/adapter.go:44]: the factory for adapter aws-ecr registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/azurecr/adapter.go:29]: Factory for adapter azure-acr registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/dockerhub/adapter.go:40]: Factory for adapter docker-hub registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/dtr/adapter.go:36]: the factory of dtr adapter was registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/githubcr/adapter.go:43]: the factory for adapter github-ghcr registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/gitlab/adapter.go:33]: the factory for adapter gitlab registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/googlegcr/adapter.go:37]: the factory for adapter google-gcr registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/huawei/huawei_adapter.go:40]: the factory of Huawei adapter was registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/jfrog/adapter.go:42]: the factory of jfrog artifactory adapter was registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/quay/adapter.go:53]: the factory of Quay adapter was registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/tencentcr/adapter.go:55]: the factory for adapter tencent-tcr registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/volcenginecr/adapter.go:40]: the factory for adapter volcengine-cr registered
2024-11-04T09:02:00Z [INFO] [/pkg/reg/adapter/harbor/adaper.go:31]: the factory for adapter harbor registered
2024-11-04T09:02:00Z [INFO] [/core/controllers/base.go:159]: Config path: /etc/core/app.conf
2024-11-04T09:02:00Z [INFO] [/core/main.go:145]: initializing cache ...
2024-11-04T09:02:00Z [ERROR] [/lib/cache/cache.go:124]: failed to ping redis://my-release-harbor-redis:6379/0?idle_timeout_seconds=30, retry after 500ms : dial tcp 10.233.19.119:6379: connect: connection r                          efused
2024-11-04T09:02:03Z [ERROR] [/lib/cache/cache.go:124]: failed to ping redis://my-release-harbor-redis:6379/0?idle_timeout_seconds=30, retry after 839.289525ms : dial tcp 10.233.19.119:6379: connect: conne                          ction refused
2024-11-04T09:02:07Z [ERROR] [/lib/cache/cache.go:124]: failed to ping redis://my-release-harbor-redis:6379/0?idle_timeout_seconds=30, retry after 1.906601703s : dial tcp 10.233.19.119:6379: connect: conne                          ction refused
2024-11-04T09:02:11Z [ERROR] [/lib/cache/cache.go:124]: failed to ping redis://my-release-harbor-redis:6379/0?idle_timeout_seconds=30, retry after 1.288597948s : dial tcp 10.233.19.119:6379: connect: conne                          ction refused
2024-11-04T09:02:12Z [INFO] [/core/main.go:164]: initializing configurations...
2024-11-04T09:02:12Z [INFO] [/lib/config/systemconfig.go:178]: key path: /etc/core/key
2024-11-04T09:02:12Z [INFO] [/lib/config/config.go:92]: init secret store
2024-11-04T09:02:12Z [INFO] [/core/main.go:166]: configurations initialization completed
2024-11-04T09:02:12Z [INFO] [/common/dao/base.go:67]: Registering database: type-PostgreSQL host-my-release-harbor-database port-5432 database-registry sslmode-"disable"
2024-11-04T09:02:12Z [ERROR] [/common/utils/utils.go:108]: failed to connect to tcp://my-release-harbor-database:5432, retry after 2 seconds :dial tcp 10.233.39.89:5432: connect: connection refused
2024-11-04T09:02:14Z [ERROR] [/common/utils/utils.go:108]: failed to connect to tcp://my-release-harbor-database:5432, retry after 2 seconds :dial tcp 10.233.39.89:5432: connect: connection refused
2024-11-04T09:02:16Z [ERROR] [/common/utils/utils.go:108]: failed to connect to tcp://my-release-harbor-database:5432, retry after 2 seconds :dial tcp 10.233.39.89:5432: connect: connection refused
2024-11-04T09:02:18Z [INFO] [/common/dao/base.go:72]: Register database completed
2024-11-04T09:02:18Z [INFO] [/common/dao/pgsql.go:135]: Upgrading schema for pgsql ...
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 1/u initial_schema (140.285792ms)
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 2/u 1.7.0_schema (166.414435ms)
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 3/u add_replication_op_uuid (175.713049ms)
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 4/u 1.8.0_schema (222.701118ms)
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 5/u 1.8.2_schema (234.824753ms)
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 10/u 1.9.0_schema (306.610531ms)
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 11/u 1.9.1_schema (315.651564ms)
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 12/u 1.9.4_schema (325.992527ms)
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 15/u 1.10.0_schema (365.983421ms)
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 30/u 2.0.0_schema (417.525232ms)
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 31/u 2.0.3_schema (426.729501ms)
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 40/u 2.1.0_schema (331.400859ms)
2024-11-04T09:02:18Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 41/u 2.1.4_schema (313.380124ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 50/u 2.2.0_schema (363.908341ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 51/u 2.2.1_schema (326.505418ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 52/u 2.2.2_schema (322.309936ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 53/u 2.2.3_schema (297.716569ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 60/u 2.3.0_schema (299.53436ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 61/u 2.3.4_schema (297.848928ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 70/u 2.4.0_schema (267.988672ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 71/u 2.4.2_schema (225.178695ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 80/u 2.5.0_schema (264.282518ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 81/u 2.5.2_schema (230.766101ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 82/u 2.5.3_schema (232.103205ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 90/u 2.6.0_schema (196.432655ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 91/u 2.6.2_schema (196.485021ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 100/u 2.7.0_schema (202.120591ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 110/u 2.8.0_schema (178.296574ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 111/u 2.8.1_schema (177.411703ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 120/u 2.9.0_schema (190.232881ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 130/u 2.10.0_schema (191.914372ms)
2024-11-04T09:02:19Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:765]: 140/u 2.11.0_schema (200.387486ms)
2024-11-04T09:02:19Z [INFO] [/core/main.go:204]: The database has been migrated successfully
2024-11-04T09:02:19Z [INFO] [/core/main.go:96]: User id: 1 updated its encrypted password successfully.
2024-11-04T09:02:19Z [INFO] [/core/main.go:321]: Registering Trivy scanner
2024-11-04T09:02:19Z [INFO] [/pkg/scan/init.go:56]: Successfully registered Trivy scanner at http://my-release-harbor-trivy:8080
2024-11-04T09:02:19Z [INFO] [/core/main.go:343]: Setting Trivy as default scanner
2024-11-04T09:02:19Z [ERROR] [/pkg/audit/forward.go:44]: failed to create audit log, error dial tcp: missing address
2024-11-04T09:02:19Z [INFO] [/core/main.go:242]: initializing notification...
2024-11-04T09:02:19Z [INFO] [/pkg/notification/notification.go:77]: notification initialization completed
2024-11-04T09:02:19Z [INFO] [/core/main.go:261]: Version: v2.11.1, Git commit: 6b7ecba1
2024-11-04T09:02:19Z [INFO] [/core/main.go:263]: Fix empty subiss for meta info data.
2024-11-04T09:02:19Z [INFO] [/pkg/oidc/fix.go:37]: Not found any records with empty subiss, good to go.
2024/11/04 09:02:19.900 [I] [server.go:281]  http server Running on http://:8080
2024-11-04T09:02:59Z [INFO] [/controller/systemartifact/execution.go:146]: Scheduled scan data export cleanup job with ID : 1
[root@master1 harbor]#

@junlintianxiazhifulinzhongguo

@MinerYang

@JasonkayZK
Copy link
Author

Could you please try to clean the cache data/cookie of harbor site on the browser OR just open a new private window for test

Yes, and actually i've tried this several times, but it seemed not work at all.

But what i've posted did solve my problem!

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

3 participants