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

Nuget.org response times out causing a 404 instead of pulling artifact from the cache

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 6.13.1, 6.14.0
    • Fix Version/s: None
    • Component/s: NuGet, Remote Repository
    • Labels:
      None

      Description

      If an artifact is cached within the remote repository and user tries to pull artifact from the virtual or remote.  If there is a timeout to the remote site, the request does not fall back to the cache, but instead returns an error in the logs and states it cannot find the package within the client.

       

      REPRODUCE

      1) Create the default virtual for nuget repo

      2) Configure nuget client and pull a package

      3) Set the remote repo socket timeout to 5 MS (something very small)

      4) Try the same pull request.  You will see a connection timeout error:

      2019-11-07 19:03:32,762 [http-nio-8081-exec-4] [ERROR] (o.a.a.n.NuGetServiceImpl:697) - Error occurred while performing a remote NuGet query on 'https://www.nuget.org/api/v2/FindPackagesById()?includePrerelease=false&$top=80&id='FluentValidation'&includeAllVersions=false': Connect to www.nuget.org:443 [www.nuget.org/13.66.39.44] failed: connect timed out

      You will also see from the nuget client:

        *http://localhost:8081/artifactory/api/nuget/nuget*

       **   *GET http://localhost:8081/artifactory/api/nuget/nuget/FindPackagesById()?id='FluentValidation'*

        OK http://localhost:8081/artifactory/api/nuget/nuget/FindPackagesById()?id='FluentValidation' 24ms

      Unable to find package 'FluentValidation'

      5) You can also pull the artifact with same setting if pointing directly to the cache repository or if you set the remote to offline.

       

      EXPECTED

      This is a simple way to reproduce the behavior but is not the issue being seen.  The issue where this comes to play is a read time out from nuget.org.  Could be slow network or rate limiting from nuget.org?  Artifactory should treat this as if the endpoint is unreachable and offline.  It should fall back to the remote cache instead of failing the request.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                scottm Scott Mosher
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: