Accessing Harbor repository from TCA fails with error code 404
search cancel

Accessing Harbor repository from TCA fails with error code 404

book

Article ID: 383169

calendar_today

Updated On:

Products

VMware Telco Cloud Automation

Issue/Introduction

Unable to reach Harbor repositories from VMware Telco Cloud Automation

Environment

TCA 2.3

Harbor: 2.7.3

Cause

  • This issue occurs when Harbor is installed without "chartmuseum". While renewing the certificates and re-installing Harbor please ensure that "chartmuseum" is installed.

Logs from TCA-CP : common/logs/admin/web.log

{"level":"info","msg":"Created temp file /tmp/kube_adapter-493608127","time":"2024-11-12T11:53:49Z"} {"Operation":"Upgrade","level":"error","msg":"error downloading chart looks like \"https://harbor_xyz.com/chartrepo/test\" is not a valid chart repository or cannot be reached: failed to fetch https://harbor_xyz.com/chartrepo/test/index.yaml : 404 Not Found","time":"2024-11-12T11:53:49Z"} {"level":"info","msg":"Deleted temp file /tmp/kube_adapter-493608127","time":"2024-11-12T11:53:49Z"} {"Operation":"Upgrade","level":"error","msg":"error getting chart, CNF135007: looks like \"https://harbor_xyz..com/chartrepo/test\" is not a valid chart repository or cannot be reached: failed to fetch https://harbor_xyz.com/chartrepo/eric_eda2/index.yaml : 404 Not Found","time":"2024-11-12T11:53:49Z"} {"Operation":"Upgrade","level":"error","msg":"error getting chart CNF135007: looks like \"https://harbor_xyz.com/chartrepo/test\" is not a valid chart repository or cannot be reached: failed to fetch https://harbor_xyz.com/chartrepo/test/index.yaml : 404 Not Found","time":"2024-11-12T11:53:49Z"} {"level":"info","msg":"PUT /cnfs/test_cnf/test_cnf/test-62238-vtknv UpdateCnf 1.096244028s","time":"2024-11-12T11:53:49Z"} {"level":"info","msg":"Cluster test_cnf config found","time":"2024-11-12T11:53:50Z"}

Resolution

Steps to verify whether "chartmuseum" installed along with Harbor or not:

Method 1:

  • Open Harbor repository GUI
  • navigate to Projects -> click on any Project -> within that if you see 'Helm Charts' tab -> which means "chartmuseum" is present.

Method 2:

  • Connect to Harbor VM through SSH
  • run a command:
    • curl -k -X GET https://HARBOR-FQDN-IP/api/v2.0/systeminfo -u HARBOR-USER:HARBOR-PWD
    • HARBOR-USER - Harbor username
      HARBOR-PWD - Harbor Password
  • The output will be similar to below one:
    • {
        "auth_mode": "db_auth",
        "current_time": "2024-12-09T08:40:44.173Z",
        "external_url": "https://Harbor-FQDN.com",
        "harbor_version": "v2.6.3-1297af6c",
        "has_ca_root": false,
        "notification_enable": true,
        "project_creation_restriction": "everyone",
        "read_only": false,
        "registry_storage_provider_name": "filesystem",
        "registry_url": "Harbor-FQDN.com",
        "self_registration": false,
        "with_chartmuseum": true,
        "with_notary": false
      }
    • In the output if the ""with_chartmuseum": true" is true, then Chartmuseum is installed along with Harbor, if the value is "with_chartmuseum": false", then Chartmuseum is not installed along with Harbor.

If chartmuseum is not installed, Manually install by following below steps:

  • Goto Harbor Virtual Machine
  • navigate to /home/vmware/harbor-2.7.3/harbor/
  • run command:
    • ./prepare && ./install.sh --with-chartmuseum