前言:我在Windows 2012 R2/IIS 8.5上運行NuGet Server(2.11.3)。 NuGet服務器管理它在獨立文件服務器(共享文件夾)中的軟件包文件夾。 此外,我正在運行使用此nuget服務器進行還原和推送活動的TFS構建機器(來自TFS 2015的代理)。自然,每個版本最初都會讀取目標解決方案>>> projects >>> packages.config文件,並從nuget服務器恢復配置的軟件包。在後面的步驟中,代理將生成所需的* .nupkg文件並將其推送到同一個nuget服務器的nuget端點。這些是其他解決方案的依賴關係。TFS版本中的NuGet推送失敗
問題:大多數解決方案運行正常,沒有任何特殊問題。有幾個解決方案,只有1-3內他們的項目,失敗TFS建立以下消息:
Response status code does not indicate success: 500 (Internal Server Error).
Unexpected exit code 1 returned from tool NuGet.exe
的NuGet服務器上的IIS日誌如下所示:
2017-03-27 16:47:26 192.168.2.116 PUT /MainRepository/nuget/ - 80 - 192.168.1.30 NuGet+Command+Line/3.5.0+(Microsoft+Windows+NT+6.2.9200.0) - 500 0 0 15
2017-03-27 16:47:26 192.168.2.116 PUT /MainRepository/nuget/ - 80 - 192.168.1.30 NuGet+Command+Line/3.5.0+(Microsoft+Windows+NT+6.2.9200.0) - 500 0 0 15
2017-03-27 16:47:26 192.168.2.116 PUT /MainRepository/nuget/ - 80 - 192.168.1.30 NuGet+Command+Line/3.5.0+(Microsoft+Windows+NT+6.2.9200.0) - 500 0 0 31
以下事件記錄(在事件查看器中顯示)中的NuGet服務器:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 27/03/2017 10:40:17
Event time (UTC): 27/03/2017 07:40:17
Event ID: cb897ce6dc2f4e40a07c71a9160718f2
Event sequence: 2073
Event occurrence: 4
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/MainRepository-1-131350724531418170
Trust level: Full
Application Virtual Path: /MainRepository
Application Path: C:\inetpub\wwwroot\NugetServerInternal\
Machine name: NUGET-SRV
Process information:
Process ID: 2512
Process name: w3wp.exe
Account name: some.domain/some.user
Exception information:
Exception type: IndexOutOfRangeException
Exception message: Index was outside the bounds of the array.
at System.Web.HttpRawUploadedContent.get_Item(Int32 index)
at System.Web.HttpMultipartContentTemplateParser.GetNextLine()
at System.Web.HttpMultipartContentTemplateParser.ParseIntoElementList()
at System.Web.HttpMultipartContentTemplateParser.Parse(HttpRawUploadedContent data, Int32 length, Byte[] boundary, Encoding encoding)
at System.Web.HttpRequest.GetMultipartContent()
at System.Web.HttpRequest.FillInFilesCollection()
at System.Web.HttpRequest.EnsureFiles()
at System.Web.HttpRequest.get_Files()
at System.Web.HttpRequestWrapper.get_Files()
at NuGet.Server.Publishing.PackageService.CreatePackage(HttpContextBase context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Request information:
Request URL: http://nuget-srv/MainRepository/nuget/
Request path: /MainRepository/nuget/
User host address: 192.168.1.30
User:
Is authenticated: False
Authentication Type:
Thread account name: some.domain/some.user
Thread information:
Thread ID: 19
Thread account name: some.domain/some.user
Is impersonating: False
Stack trace: at System.Web.HttpRawUploadedContent.get_Item(Int32 index)
at System.Web.HttpMultipartContentTemplateParser.GetNextLine()
at System.Web.HttpMultipartContentTemplateParser.ParseIntoElementList()
at System.Web.HttpMultipartContentTemplateParser.Parse(HttpRawUploadedContent data, Int32 length, Byte[] boundary, Encoding encoding)
at System.Web.HttpRequest.GetMultipartContent()
at System.Web.HttpRequest.FillInFilesCollection()
at System.Web.HttpRequest.EnsureFiles()
at System.Web.HttpRequest.get_Files()
at System.Web.HttpRequestWrapper.get_Files()
at NuGet.Server.Publishing.PackageService.CreatePackage(HttpContextBase context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
注:按我的某個時候檢查是在包文件夾和SOM創建的包etime不是。 注意:我很確定所有配置都已到位(包括API密鑰等)。當然,很高興知道什麼是缺少的。
對此感興趣的任何建議。
提前許多感謝, 奧弗
忘了提,按我的檢查失敗和通過nuspec文件看起來是一樣的,除了在失敗的一個額外的依賴,whicih我試圖與DEV小組進行調查。 – Ofer
難道是你想安裝的軟件包有問題嗎?對於那些1-3項目,你是否測試過安裝其他nuget軟件包,可能是一個簡單的軟件包,能否成功安裝?如果使用這個包的其他項目得到相同的錯誤? –
請在出現此問題時使用[Fiddler](http://fiddler.en.lo4d.com/)等工具來監控網絡。網絡有問題嗎? –