All of a sudden NuGet issues Name or service not known retrying FinePackagesByIdAsync

Could this be a problem with Nexus?

All of a sudden NuGet issues Name or service not known retrying FinePackagesByIdAsync

With no changes, what so ever, NuGet all of a sudden is failing in the pipeline in the following maner:

$ dotnet test

23 Determining projects to restore…

27/builds/7cjjzF-Y/1/enterprisebackendservices/project/callcomplianceapi/web.API.rules.Tests/web.API.rules.Tests.csproj : error NU1301: Unable to load the service index for source [/builds/7cjjzF-Y/1/enterprisebackendservices/apiservices/project/web.API.Rules.sln]

[28] Retrying ‘FindPackagesByIdAsync’ for source ‘’.

[29] Name or service not known (

[30]Name or service not known

[31]Retrying ‘FindPackagesByIdAsync’ for source ‘’.

[32]Name or service not known (

etc etc etc…

Here is the pipeline

  # Update this for new version builds. - TODO: This will be removed at some point once Jim figures out automatic versioning based on git tags.
  # NOTE: If you change your package name, you should also change this to match.
  PACKAGE_NAME: "Reporting.CitiHoldingQueueReport"

image: $CICD_IMAGE

  - test
  - deploy
  - deploy_runner

  stage: test
    - dotnet nuget add source $REPORTS_NUGET_SOURCE -n Nexus
    - "echo | dotnet --version" # must be v 2.2.300 or later for reporter tool to work
    - dotnet --info
    - dotnet restore --verbosity detailed
    - dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools
    - dotnet test --logger "junit" --collect:"XPlat Code Coverage"
    # each reporttype must be a separate line, doesn't work together ; separated
    - ./tools/reportgenerator "-reports:${CI_PROJECT_DIR}/**/TestResults/*/coverage.cobertura.xml" "-targetdir:Reports_Coverage" -reportTypes:TextSummary;
    - ./tools/reportgenerator "-reports:${CI_PROJECT_DIR}/**/TestResults/*/coverage.cobertura.xml" "-targetdir:Reports_Coverage" -reportTypes:Html;
    - cat ./Reports_Coverage/Summary.txt
    - echo 'End Summary'
  coverage: /Line coverage[\s\S].+%/
      - Reports_Coverage/
        - "*.Test/TestResults/TestResults.xml"
        - "*.Tests/TestResults/TestResults.xml"

NuGet Publish:
  stage: deploy
    # Add our custom NuGet repository group so nuget restore works
    - dotnet nuget add source $REPORTS_NUGET_SOURCE -n Nexus
    # Pack the project into a NuGet package
    - dotnet pack -c Release -p:PackageVersion=${VERSION} -o ./build/packages --version-suffix "$VERSION_SUFFIX" --include-symbols

    - dotnet nuget push ./build/packages/**/*.symbols.nupkg -k ${NEXUS_NUGET_KEY} -s $REPORTS_DEPLOY_NUGET_SOURCE
    - master

So yes we use nexus Sonatype, but everyone seems fine. Whats odd is that allowing v3 nuget to pass, now it works, but then will fail, but then work again, and then fail again. Also when i say work, i still get the above error messages, but the pipeline will be fine.

Its very odd, that nothing was touched and nuget packages cannot be restored. Is there any other way this can be done?

This suggests Nexus is not being used.

well it is, to an extent, we do have a proxy to nuget, but its says this…

[Check Status] *UNKNOWN - Repository status for NuGetProxy continued as AUTO_BLOCKED_UNAVAILABLE until 2023-02-22T17:25:27.366Z - reason Name or service not known for (previous reason was Name or service not known for

The earlier logs seemed to be client side errors.

For this Nexus error the key part is UnknownHostException, for whatever reason your Nexus instance cannot resolve the DNS entry for