Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-24063

Infinite error loop in Artifactory when using v2/_catalog endpoint against 'https://k8s.gcr.io'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: 3 - High
    • Resolution: Done
    • Affects Version/s: 7.10.7
    • Fix Version/s: 6.23.13, 7.15.3
    • Component/s: None
    • Labels:
      None
    • Severity:
      High
    • Team:
      dev-artifactory-packages
    • Release Notes:
      Yes

      Description

      When running ListDockerRepositories API against a docker remote repository pointing to https://k8s.gcr.io, the command will hang and Artifactory will produce inifinte errors of the following:

      "'java.lang.IllegalStateException: Can't fetch token for repo: docker-test-catalog-remote realm: https://k8s.gcr.io/v2/token scope:repository:_catalog?:pull'"

      Even when the command is aborted, the errors won't stop until Artifactory is restarted.

       

      Steps to reproduce:

      1. Create a docker remote repository pointing to "https://k8s.gcr.io".  

      2. Add the repository to a virtual docker repository.

      3. Run the ListDockerRepositories API against the virtual repository. 
      4. The command will hang and in artifactory-service.log we can see the below errors repeatedly:

      2020-11-29T09:56:00.595Z [jfrt ] [ERROR] [32892991b4d10e4c] [.DockerV2RemoteRepoHandler:387] [http-nio-8081-exec-3] - Unable to fetch catalog for 'docker-test-catalog-remote': 'java.lang.IllegalStateException: Can't fetch token for repo: docker-test-catalog-remote realm: https://k8s.gcr.io/v2/token scope:repository:_catalog?:pull'
      2020-11-29T09:56:00.620Z [jfrt ] [ERROR] [32892991b4d10e4c] [.DockerV2RemoteRepoHandler:387] [http-nio-8081-exec-3] - Unable to fetch catalog for 'docker-test-catalog-remote': 'java.lang.IllegalStateException: Can't fetch token for repo: docker-test-catalog-remote realm: https://k8s.gcr.io/v2/token scope:repository:_catalog?:pull'
      2020-11-29T09:56:00.645Z [jfrt ] [ERROR] [32892991b4d10e4c] [.DockerV2RemoteRepoHandler:387] [http-nio-8081-exec-3] - Unable to fetch catalog for 'docker-test-catalog-remote': 'java.lang.IllegalStateException: Can't fetch token for repo: docker-test-catalog-remote realm: https://k8s.gcr.io/v2/token scope:repository:_catalog?:pull'

       

      The errors will not stop until Artifactory is restarted.

       

      Expected behaviour:

      If the endpoint is not supported with the remote upstream, an error should be written in the log once, ignored, and the API call should continue and fetch results from the other remote repositories cache/ local repositories.

      For other remote repositories, we see the expected behaviour:

      curl -uadmin:password1 http://localhost:8081/artifactory/api/docker/docker/v2/_catalog
      {
      "repositories" : [ "bitnami/mariadb", "centos/nodejs-10-centos7", "docker-local/mysql", "jfrog/artifactory-oss", "library/mysql", "library/nginx", "mysql", "rhscl/s2i-core-rhel7", "ubi7/nodejs-10" ]

       

      artifactory-service.log:

       2020-11-29T10:18:44.659Z [jfrt ] [ERROR] [771203959c204f94] [.DockerV2RemoteRepoHandler:379] [http-nio-8081-exec-1] - Unable to fetch catalog from 'https://docker.bintray.io/v2/_catalog?': HTTP/1.1 401 Unauthorized
      2020-11-29T10:18:45.812Z [jfrt ] [ERROR] [771203959c204f94] [.DockerV2RemoteRepoHandler:379] [http-nio-8081-exec-1] - Unable to fetch catalog from 'https://registry-1.docker.io/v2/_catalog?': HTTP/1.1 401 Unauthorized
      2020-11-29T10:18:46.228Z [jfrt ] [ERROR] [771203959c204f94] [.DockerV2RemoteRepoHandler:379] [http-nio-8081-exec-1] - Unable to fetch catalog from 'https://registry.access.redhat.com/v2/_catalog?': HTTP/1.1 404 Not Found

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shahafg Shahaf Golan
              Reporter:
              oronc Oron Chalaf
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-24063 -
                  SYNCHRONIZED
                  • Last Sync Date: