2017-02-13 70 views
1

我已經使用Visual Studio Team Services(託管代理程序)將部署配置到Service Fabric應用程序。直到最近,一切都按預期工作。現在,部署失敗,並顯示以下錯誤消息:部署Service Fabric應用程序時出錯 - 無法索引到空陣列

無法索引到空數組中。

任務配置如下:

enter image description here

這是一個完整的日誌部署任務:

2017-02-13T13:23:25.4033826Z ##[section]Starting: Deploy Service Fabric Application 
2017-02-13T13:23:25.4113825Z ============================================================================== 
2017-02-13T13:23:25.4113825Z Task   : Service Fabric Application Deployment 
2017-02-13T13:23:25.4113825Z Description : Deploy a Service Fabric application to a cluster. 
2017-02-13T13:23:25.4113825Z Version  : 1.3.3 
2017-02-13T13:23:25.4113825Z Author  : Microsoft Corporation 
2017-02-13T13:23:25.4113825Z Help   : [More Information](https://go.microsoft.com/fwlink/?LinkId=820528) 
2017-02-13T13:23:25.4123824Z ============================================================================== 
2017-02-13T13:23:28.3707902Z ##[debug]VstsTaskSdk 0.7.1 commit f990f8d8df6197b1cfcec01031ba014ad4905681 
2017-02-13T13:23:28.7247919Z ##[debug]Entering D:\a\_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c64\1.3.3\deploy.ps1. 
2017-02-13T13:23:28.7397904Z ##[debug]Loading resource strings from: D:\a\_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c64\1.3.3\task.json 
2017-02-13T13:23:28.8877911Z ##[debug]Loaded 49 strings. 
2017-02-13T13:23:28.8977907Z ##[debug]SYSTEM_CULTURE: 'en-US' 
2017-02-13T13:23:28.8987909Z ##[debug]Loading resource strings from: D:\a\_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c64\1.3.3\Strings\resources.resjson\en-US\resources.resjson 
2017-02-13T13:23:29.0617895Z ##[debug]Loaded 49 strings. 
2017-02-13T13:23:29.1177896Z ##[debug]INPUT_PUBLISHPROFILEPATH: 'D:\a\r1\a\artifacts\ServiceFabric\Config\PublishProfiles\Cloud.qa.xml' 
2017-02-13T13:23:29.1805007Z Searching for path: D:\a\r1\a\artifacts\ServiceFabric\Config\PublishProfiles\Cloud.qa.xml 
2017-02-13T13:23:29.2145006Z ##[debug]Entering Find-VstsFiles. 
2017-02-13T13:23:29.2305008Z ##[debug] LegacyPattern: 'D:\a\r1\a\artifacts\ServiceFabric\Config\PublishProfiles\Cloud.qa.xml' 
2017-02-13T13:23:29.2895008Z ##[debug]Entering Get-MatchingItems. 
2017-02-13T13:23:29.2944996Z ##[debug] IncludePatterns: 'D:\a\r1\a\artifacts\ServiceFabric\Config\PublishProfiles\Cloud.qa.xml' 
2017-02-13T13:23:29.3034992Z ##[debug] ExcludePatterns: '' 
2017-02-13T13:23:29.3104997Z ##[debug] IncludeFiles: 'True' 
2017-02-13T13:23:29.3135007Z ##[debug] IncludeDirectories: 'False' 
2017-02-13T13:23:29.3405018Z ##[debug] Force: 'False' 
2017-02-13T13:23:29.5979986Z ##[debug]Path: D:\a\r1\a\artifacts\ServiceFabric\Config\PublishProfiles\Cloud.qa.xml 
2017-02-13T13:23:29.6040007Z ##[debug]Leaving Get-MatchingItems. 
2017-02-13T13:23:29.6079982Z ##[debug]Total found: 1 
2017-02-13T13:23:29.6109978Z ##[debug]Leaving Find-VstsFiles. 
2017-02-13T13:23:29.6329988Z ##[debug]Asserting leaf path exists: 'D:\a\r1\a\artifacts\ServiceFabric\Config\PublishProfiles\Cloud.qa.xml' 
2017-02-13T13:23:29.6350041Z Found path: D:\a\r1\a\artifacts\ServiceFabric\Config\PublishProfiles\Cloud.qa.xml 
2017-02-13T13:23:29.7000090Z ##[debug]INPUT_APPLICATIONPACKAGEPATH: 'D:\a\r1\a\publish\Release' 
2017-02-13T13:23:29.7010019Z Searching for path: D:\a\r1\a\publish\Release 
2017-02-13T13:23:29.7049996Z ##[debug]Entering Find-VstsFiles. 
2017-02-13T13:23:29.7079987Z ##[debug] LegacyPattern: 'D:\a\r1\a\publish\Release' 
2017-02-13T13:23:29.7100038Z ##[debug] IncludeDirectories: 'True' 
2017-02-13T13:23:29.7140043Z ##[debug]Entering Get-MatchingItems. 
2017-02-13T13:23:29.7169997Z ##[debug] IncludePatterns: 'D:\a\r1\a\publish\Release' 
2017-02-13T13:23:29.7200023Z ##[debug] ExcludePatterns: '' 
2017-02-13T13:23:29.7230026Z ##[debug] IncludeFiles: 'False' 
2017-02-13T13:23:29.7250041Z ##[debug] IncludeDirectories: 'True' 
2017-02-13T13:23:29.7720050Z ##[debug] Force: 'False' 
2017-02-13T13:23:29.9969997Z ##[debug]Path: D:\a\r1\a\publish\Release 
2017-02-13T13:23:29.9969997Z ##[debug]Leaving Get-MatchingItems. 
2017-02-13T13:23:29.9969997Z ##[debug]Total found: 1 
2017-02-13T13:23:29.9969997Z ##[debug]Leaving Find-VstsFiles. 
2017-02-13T13:23:29.9969997Z ##[debug]Asserting container path exists: 'D:\a\r1\a\publish\Release' 
2017-02-13T13:23:29.9969997Z Found path: D:\a\r1\a\publish\Release 
2017-02-13T13:23:29.9979996Z ##[debug]INPUT_SERVICECONNECTIONNAME: '307f16ba-c7b0-44be-9998-050e6075a9b6' 
2017-02-13T13:23:29.9979996Z ##[debug]ENDPOINT_URL_307f16ba-c7b0-44be-9998-050e6075a9b6: 'https://xxxxxxxxxxxx.cloudapp.azure.com:19000/' 
2017-02-13T13:23:29.9979996Z ##[debug]ENDPOINT_AUTH_xxxxxxxxxxxx: '********' 
2017-02-13T13:23:30.0010004Z ##[debug]ENDPOINT_DATA_xxxxxxxxxxxx: '{}' 
2017-02-13T13:23:30.0079998Z ##[debug]INPUT_COPYPACKAGETIMEOUTSEC (empty) 
2017-02-13T13:23:30.0169999Z ##[debug]INPUT_REGISTERPACKAGETIMEOUTSEC (empty) 
2017-02-13T13:23:30.0209986Z ##[debug]INPUT_COMPRESSPACKAGE: 'true' 
2017-02-13T13:23:30.1139975Z ##[warning]Your deploy task has been upgraded to a new version with possible breaking changes. The Cluster Endpoint defined in your service endpoint was previously ignored, but will now override the value in the publish profile. Verify the endpoint is correct and prefixed with 'https://'. In addition, a Server Certificate Thumbprint field has been added to the service endpoint and will also override the publish profile value. Your service endpoint may not have been updated to allow specifying the Server Certificate Thumbprint, in which case we will still use the value from the publish profile and you should try again soon. 
2017-02-13T13:23:30.1139975Z ##[debug]Processed: ##vso[task.logissue type=warning]Your deploy task has been upgraded to a new version with possible breaking changes. The Cluster Endpoint defined in your service endpoint was previously ignored, but will now override the value in the publish profile. Verify the endpoint is correct and prefixed with 'https://'. In addition, a Server Certificate Thumbprint field has been added to the service endpoint and will also override the publish profile value. Your service endpoint may not have been updated to allow specifying the Server Certificate Thumbprint, in which case we will still use the value from the publish profile and you should try again soon. 
2017-02-13T13:23:30.2456671Z ##[debug]Leaving D:\a\_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c64\1.3.3\deploy.ps1. 
2017-02-13T13:23:30.2646567Z ##[debug]Caught exception from task script. 
2017-02-13T13:23:30.2696555Z ##[debug]Error record: 
2017-02-13T13:23:30.3756887Z ##[debug]D:\a\_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c64\1.3.3\deploy.ps1 : Cannot index into a null array. 
2017-02-13T13:23:30.3766890Z ##[debug]At line:1 char:1 
2017-02-13T13:23:30.3786885Z ##[debug]+ . 'D:\a\_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c ... 
2017-02-13T13:23:30.3806878Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
2017-02-13T13:23:30.3816887Z ##[debug] + CategoryInfo   : InvalidOperation: (:) [deploy.ps1], RuntimeException 
2017-02-13T13:23:30.3836876Z ##[debug] + FullyQualifiedErrorId : NullArray,deploy.ps1 
2017-02-13T13:23:30.3846887Z ##[debug] 
2017-02-13T13:23:30.3876887Z ##[debug]Script stack trace: 
2017-02-13T13:23:30.3926870Z ##[debug]at <ScriptBlock>, D:\a\_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c64\1.3.3\deploy.ps1: line 57 
2017-02-13T13:23:30.3946887Z ##[debug]at <ScriptBlock>, <No file>: line 1 
2017-02-13T13:23:30.3966873Z ##[debug]at <ScriptBlock>, <No file>: line 22 
2017-02-13T13:23:30.3976888Z ##[debug]at <ScriptBlock>, <No file>: line 18 
2017-02-13T13:23:30.3996872Z ##[debug]at <ScriptBlock>, <No file>: line 1 
2017-02-13T13:23:30.4026873Z ##[debug]Exception: 
2017-02-13T13:23:30.4166884Z ##[debug]System.Management.Automation.RuntimeException: Cannot index into a null array. 
2017-02-13T13:23:30.4186886Z ##[debug] at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) 
2017-02-13T13:23:30.4206873Z ##[debug] at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) 
2017-02-13T13:23:30.4216885Z ##[debug] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 
2017-02-13T13:23:30.4236885Z ##[debug] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 
2017-02-13T13:23:30.4256882Z ##[debug] at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) 
2017-02-13T13:23:30.4266885Z ##[debug] at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) 
2017-02-13T13:23:30.4286885Z ##[debug] at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess) 
2017-02-13T13:23:30.4306872Z ##[debug] at System.Management.Automation.PSScriptCmdlet.DoEndProcessing() 
2017-02-13T13:23:30.4316888Z ##[debug] at System.Management.Automation.CommandProcessorBase.Complete() 
2017-02-13T13:23:30.4639786Z ##[error]Cannot index into a null array. 
2017-02-13T13:23:30.4639786Z ##[debug]Processed: ##vso[task.logissue type=error]Cannot index into a null array. 
2017-02-13T13:23:30.4666547Z ##[debug]Processed: ##vso[task.complete result=Failed] 
2017-02-13T13:23:30.4886539Z ##[section]Finishing: Deploy Service Fabric Application 

BTW我已經注意到,託管代理最近更新(2/7/2017),我想知道這是否可能與此問題有關?

+0

版本(託管代理)與Azure上的新Service Fabric羣集(無身份驗證)配合使用時,它可以正常工作。如果您在本地計算機上將其部署到Azure,結果如何?另一方面,有一個警告,你有什麼改變嗎? –

+0

我問了一個正在使用應用程序的開發人員 - 從本地機器部署工作正常。 –

回答

1

不知道發生了什麼,但我能解決這個問題。

我刪除了Azure的服務端點面料,創造基於我的測試部署通過VSTS服務織物應用一個新的(基於證書的),用正確的指紋,客戶端證書,密碼等

+0

遇到同樣的問題,這對我有效。 – AspiringTFSGuru

相關問題