Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-32042

Docker Repo Import fails when Base URL Capability not set

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.38.0, 3.38.1
    • Fix Version/s: None
    • Component/s: Docker, import-export
    • Labels:
    • Story Points:
      3
    • Notability:
      2

      Description

      Without the Base URL Capability being set, a Docker Repo import will fail after flooding the log with exceptions like the following:

      2022-05-04 03:29:09,819+0000 ERROR [quartz-32-thread-9]  *SYSTEM com.sonatype.nexus.exportimport.datastore.internal.importtask.RepositoryImportServiceImpl - Import of file /mnt/caesars-import/whc-docker/v2/-/blobs/sha256ᚩe2e8db093cce02c4438e322989ea16fd8de637c10777cd9078cbb4c3ee0d51 into repository whc_docker failed
      java.lang.IllegalStateException: Base URL not set
       at com.google.common.base.Preconditions.checkState(Preconditions.java:510)
       at org.sonatype.nexus.common.app.BaseUrlHolder.get(BaseUrlHolder.java:72)
       at org.sonatype.nexus.repository.docker.internal.datastore.recipe.DockerHostedFacetImpl.createUploadCompletion(DockerHostedFacetImpl.java:506)
       at org.sonatype.nexus.repository.docker.internal.datastore.recipe.DockerHostedFacetSupport.completeBlobUpload(DockerHostedFacetSupport.java:112)
       at org.sonatype.nexus.repository.docker.DockerUploadHandler.handleV2Blob(DockerUploadHandler.java:264)
       at org.sonatype.nexus.repository.docker.DockerUploadHandler.handle(DockerUploadHandler.java:181)
       at org.sonatype.nexus.repository.docker.DockerUploadHandler.handle(DockerUploadHandler.java:150)
       at org.sonatype.nexus.repository.upload.internal.UploadManagerImpl.handle(UploadManagerImpl.java:161)
       at com.sonatype.nexus.exportimport.datastore.internal.importtask.RepositoryImportServiceImpl.lambda$0(RepositoryImportServiceImpl.java:165)
       at com.sonatype.nexus.exportimport.internal.importtask.RepositoryImportSource$RepositoryImportFileVisitor.visitFile(RepositoryImportSource.java:82)
       at com.sonatype.nexus.exportimport.internal.importtask.RepositoryImportSource$RepositoryImportFileVisitor.visitFile(RepositoryImportSource.java:1)
       ...
      

       

      Workaround:

      Assigning any value (even a dummy value like "http://blah.com") to the Base URL will allow the import to complete without exceptions.

       

      Expectation:

      No Base URL should be required for this import

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            dkane Daniel Kane
            Last Updated By:
            Grace Lee Grace Lee
            Team:
            NXRM - Mad Max
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                tigCommentSecurity.panel-title