Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Nuget push 500 Internal Server Error



  • I'm trying to push packages to our internal proget server using a powershell script.
    ProGet Server v2.2.4

    I can get this to work fine from the command-line, but always get 500 Errors when run as a headless service on a (Bamboo) build slave.
    I get the same error if I directly invoke the nuget command from the build system.
    Similar error when listing the specified repo (nuget list -Source ...).

    The build service is run under the "Local System" account. This is the only obvious difference so I was wondering if this the cause of the error?

    Pushing DelphiOBU.OBUCore.OBUCommon 2.5.9965.30 to 'http://192.168.142.26:81/nuget/R35'...
    build 30-Dec-2013 15:48:50 PUT http://192.168.142.26:81/nuget/R35/
    error 30-Dec-2013 15:48:51 System.InvalidOperationException: Failed to process request. 'Internal Server Error'.
    error 30-Dec-2013 15:48:51 The remote server returned an error: (500) Internal Server Error.. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
    error 30-Dec-2013 15:48:51 at System.Net.HttpWebRequest.GetResponse()
    error 30-Dec-2013 15:48:51 at NuGet.RequestHelper.GetResponse(Func1 createRequest, Action1 prepareRequest, IProxyCache proxyCache, ICredentialCache credentialCache, ICredentialProvider credentialProvider)
    error 30-Dec-2013 15:48:51 at NuGet.HttpClient.GetResponse()
    error 30-Dec-2013 15:48:51 at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable1 expectedStatusCode) error 30-Dec-2013 15:48:51 --- End of inner exception stack trace --- error 30-Dec-2013 15:48:51 at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable1 expectedStatusCode)
    error 30-Dec-2013 15:48:51 at NuGet.PackageServer.PushPackageToServer(String apiKey, Func`1 packageStreamFactory, Int32 timeout)
    error 30-Dec-2013 15:48:51 at NuGet.PackageServer.PushPackage(String apiKey, IPackage package, Int32 timeout)
    error 30-Dec-2013 15:48:51 at NuGet.Commands.PushCommand.PushPackageCore(String source, String apiKey, PackageServer packageServer, String packageToPush, TimeSpan timeout)
    error 30-Dec-2013 15:48:51 at NuGet.Commands.PushCommand.PushPackage(String packagePath, String source, String apiKey, TimeSpan timeout)
    error 30-Dec-2013 15:48:51 at NuGet.Commands.PushCommand.ExecuteCommand()
    error 30-Dec-2013 15:48:51 at NuGet.Commands.Command.Execute()
    error 30-Dec-2013 15:48:51 at NuGet.Program.Main(String[] args)



  • Could you try upgrading to 2.2.8 to see if that resolves the issue?

    Also, are you using any authentication mechanism at all, whether it be Windows or built-in?



  • I'll try to get it upgraded to v2.2.8 as soon as possible, and let you know if it makes a difference.
    We do have AD authentication set up, but for this repo I was trying to simplify it by pushing anonymously with an ApiKey.



  • I've had the server upgraded to ProGet 2.2.8 (build 4) and it is still not working.
    It looks like the same 500 Internal Server error.



  • Can you run a fiddler (or similar) trace to see the specific API/URL calls being made?

    This will help identify how to reproduce and where the specific problem is.



  • I've set up Fiddler and got some trace results. Can I email them to you?



  • Sure; you can send reports to support@inedo.com and we'll associate it with this conversation.



  • This issue is resolved now.
    The problem was that when ProGet is using LDAP (AD) for authentication so the requests always use NTLM (ignoring any user specified on the command-line or config).
    Changing the build-agent service to run as a domain user resolved the issue.
    Note: this was encountered with Bamboo build-agents, but I'd expect similar issues with Jenkins/Hudson build slaves, or other CI tools.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation