2017-03-27 60 views
0

前言:我在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密钥等)。当然,很高兴知道什么是缺少的。

对此感兴趣的任何建议。

提前许多感谢, 奥弗

+0

忘了提,按我的检查失败和通过nuspec文件看起来是一样的,除了在失败的一个额外的依赖,whicih我试图与DEV小组进行调查。 – Ofer

+0

难道是你想安装的软件包有问题吗?对于那些1-3项目,你是否测试过安装其他nuget软件包,可能是一个简单的软件包,能否成功安装?如果使用这个包的其他项目得到相同的错误? –

+0

请在出现此问题时使用[Fiddler](http://fiddler.en.lo4d.com/)等工具来监控网络。网络有问题吗? –

回答

0

可怜的答案,虽然,但还是一个可以帮助你们遇到:-)任何潜在的问题。

我意识到我的“问题”推送请求对新创建的NuGet服务器起作用。新的也是Windows Server 2012 R2。我刚刚提出它干净,并添加了必要的窗口功能,以支持对Nuget服务器的IIS/Web操作。

如果我没有弄错它只是ASP.NET 4.5。

最好的问候, 奥弗