Search code examples
nugetnuget-server

The V2 feed at ‘…’ returned an unexpected status code '503 Service Unavailable'


I know there are similar questions, but none with this exact error, so I'm hoping there is a different answer.

I'm getting the error:

[feedname] The V2 feed at 'http://domain.tld/NuGetServer/nuget/Search()?$filter=IsLatestVersion&searchTerm=''&targetFramework='net46'&includePrerelease=false&$skip=0&$top=26&semVerLevel=2.0.0' returned an unexpected status code '503 Service Unavailable'.

I recieve this failure in the Package Manager UI in Visual Studio (2017 Professional), as well as the Console in VS. I have tried clearing the NuGet caches, TFS caches, checking (and modifying, as appropriate) proxy settings for NuGet (AppData\Local), proxy settings for TFS, Internet Options proxy settings, with apparently no change in results. I also tried accessing the feed in VS 2010, and it doesn't work there as well.

Why could this be happening? It seems like a proxy-related issue, but I've tried everything that other questions mention, and to no avail.

One clue might be the following: When I access the feed URL via a browser, I get the following back:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xml:base="http://domain.tld/NuGetServer/nuget/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Search</title>
  <id>http://domain.tld/NuGetServer/nuget/Search</id>
  <updated>2018-06-25T21:31:57Z</updated>
  <author>
    <name />
  </author>
  <link rel="self" title="Search" href="Search" />
</feed>

This is what I get when excluding the Search parameters:

<service xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app" xml:base="http://domain.tld/NuGetServer/nuget/">
  <workspace>
    <atom:title>Default</atom:title>
      <collection href="Packages">
        <atom:title>Packages</atom:title>
      </collection>
  </workspace>
</service>

Solution

  • The NuGet server was configured incorrectly. I'm not exactly sure what the issue was, but once the server was re-configured to be have the default settings, and the URL in Visual Studio matched the server-configured URL, the issue was resolved.