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.
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/220.127.116.11] failed: connect timed out
You will also see from the nuget client:
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.
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.