409 Error pushing to Nuget from Octopack

Hi folks

I’m moving Octopus to a new server and have set everything up and moved the existing packages over. When I push a package to Octopus’ feed, I get a 409 Conflict. It’s worth noting that the package does get pushed to the feed.

I’ve tried making sure the package does not exist (deleted using Octopus’ UI then restarted the Octopus service). But the error still occurs. Details as follows:

PowerShell

& "C:\CI_AWS\Ws\21110\Source\shine-cloud2\packages\OctoPack.3.6.1\build\nuget.exe" push "C:\CI_AWS\Ws\21110\Source\shine-cloud2\spa.api\obj\octopacked\Shine.SPA.API.4.1.417.nupkg" API-1234556 -Source http://localhost:8118/nuget/packages

Result

NuGet Version: 3.5.0.38733 (Custom build for OctoPack. See http://g.octopushq.com/VersioningInOctopusDeploy)
Pushing Shine.SPA.API.4.1.417.nupkg to 'http://localhost:8118/nuget/packages'...
  PUT http://localhost:8118/nuget/packages/
  InternalServerError http://localhost:8118/nuget/packages/ 46289ms
  PUT http://localhost:8118/nuget/packages/
  Conflict http://localhost:8118/nuget/packages/ 11821ms
Response status code does not indicate success: 409 (Conflict).

I’ve tried adding ?replace=true to the URL, but that fails with a 500.

Any ideas what could be causing this?

Hi Sean,

Thanks for reaching out! The fact that you are getting a 409 when you push a package makes me think you are trying to push a duplicate package. Now that should be solved if you add ?replace to your URL.

Which version of Octopus are you running? I’m thinking that perhaps you have an old version prior to the release of that ?replace feature.

Regards,
Dalmiro

Hi Dalmiro

I’m using the latest version of Octopus: 3.15.7.

When I use ?replace=true I get a 500 error, as below:

NuGet Version: 3.5.0.38733 (Custom build for OctoPack. See http://g.octopushq.com/VersioningInOctopusDeploy)
Pushing Shine.SPA.API.4.1.417.nupkg to 'http://localhost:8118/nuget/packages?replace=true'...
  PUT http://localhost:8118/nuget/packages?replace=true/
  InternalServerError http://localhost:8118/nuget/packages?replace=true/ 9250ms
  PUT http://localhost:8118/nuget/packages?replace=true/
  InternalServerError http://localhost:8118/nuget/packages?replace=true/ 31142ms
  PUT http://localhost:8118/nuget/packages?replace=true/
  InternalServerError http://localhost:8118/nuget/packages?replace=true/ 44711ms
Response status code does not indicate success: 500 (Internal Server Error).

Any ideas as to what could be happening?

Thanks

Sean

Hi Sean,

Not entirely sure what’s going on, but have a few more troubleshooting questions:

  • Are you effectively pushing a duplicate package? Does this happen if you push a brand new package?

  • Can you setup Fiddler on the machine where you are doing the push? Sometimes that reveals a bit more about the underlying error. https://www.telerik.com/download/fiddler

Thanks,
Dalmiro