服务结构本地群集管理器:无法设置本地群集

时间:2018-09-03 13:55:48

标签: azure azure-service-fabric

我按照说明从以下位置构建基本的Service Fabric应用程序:     https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started

我使用VS 2017创建了一个Statefull / Stateless Service Fabric应用程序。我在计算机上安装了最新的Azure Service Fabric SDK。当我运行我的应用程序时,即按[F5),出现以下错误:

    1>------ Build started: Project: MySericeFab1, Configuration: Debug x64 ------
2>------ Deploy started: Project: MySericeFab1, Configuration: Debug x64 ------
2>Started executing script 'GetApplicationExistence'.
2>Finished executing script 'GetApplicationExistence'.
2>Time elapsed: 00:00:00.3874969
2>Started executing script 'Set-LocalClusterReady'.
2>powershell -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "Import-Module 'C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\DefaultLocalClusterSetup.psm1'; Set-LocalClusterReady -createOneNodeCluster $true"
2>Get-Module : A parameter cannot be found that matches parameter name 'Refresh'.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\DefaultLocalClu
2>sterSetup.psm1:16 char:39
2>+     Get-Module -ListAvailable -Refresh <<<<  --quiet *>$null
2>    + CategoryInfo          : InvalidArgument: (:) [Get-Module], ParameterBind 
2>   ingException
2>    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Comm 
2>   ands.GetModuleCommand
2> 
2>--------------------------------------------
2>Local Service Fabric Cluster is not setup...
2>Please wait while we setup the Local Service Fabric Cluster. This may take few minutes...
2>WARNING: System.Management.Automation.CommandNotFoundException: The term 
2>'Remove-ServiceFabricNodeConfiguration' is not recognized as the name of a 
2>cmdlet, function, script file, or operable program. Check the spelling of the 
2>name, or if a path was included, verify that the path is correct and try 
2>again.
2>
2>   at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String 
2>commandName, CommandOrigin commandOrigin)
2>
2>   at 
2>System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String 
2>commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope)
2>
2>   at System.Management.Automation.ExecutionContext.CreateCommand(String 
2>command)
2>
2>   at System.Management.Automation.CommandNode.CreateCommandProcessor(Int32& 
2>index, ExecutionContext context)
2>
2>   at System.Management.Automation.CommandNode.AddToPipeline(PipelineProcessor 
2>pipeline, ExecutionContext context)
2>
2>   at System.Management.Automation.PipelineNode.Execute(Array input, Pipe 
2>outputPipe, ArrayList& resultList, ExecutionContext context)
2>
2>   at 
2>System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode 
2>statement, Array input, Pipe outputPipe, ArrayList& resultList, 
2>ExecutionContext context)
2>WARNING: Remove-ServiceFabricNodeConfiguration throws exceptions
2>Method invocation failed because [System.String] doesn't contain a method named
2> 'IsNullOrWhiteSpace'.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:384 char:43
2>+     if([System.String]::IsNullOrWhiteSpace <<<< ($clusterDataRoot)){
2>    + CategoryInfo          : InvalidOperation: (IsNullOrWhiteSpace:String) [] 
2>   , RuntimeException
2>    + FullyQualifiedErrorId : MethodNotFound
2> 
2>Method invocation failed because [System.String] doesn't contain a method named
2> 'IsNullOrWhiteSpace'.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:388 char:43
2>+     if([System.String]::IsNullOrWhiteSpace <<<< ($clusterLogRoot)){
2>    + CategoryInfo          : InvalidOperation: (IsNullOrWhiteSpace:String) [] 
2>   , RuntimeException
2>    + FullyQualifiedErrorId : MethodNotFound
2> 
2>Method invocation failed because [System.String] doesn't contain a method named
2> 'IsNullOrWhiteSpace'.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:348 char:43
2>+     if([System.String]::IsNullOrWhiteSpace <<<< ($clusterRoot))
2>    + CategoryInfo          : InvalidOperation: (IsNullOrWhiteSpace:String) [] 
2>   , RuntimeException
2>    + FullyQualifiedErrorId : MethodNotFound
2> 
2>Method invocation failed because [System.String] doesn't contain a method named
2> 'IsNullOrWhiteSpace'.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:348 char:43
2>+     if([System.String]::IsNullOrWhiteSpace <<<< ($clusterRoot))
2>    + CategoryInfo          : InvalidOperation: (IsNullOrWhiteSpace:String) [] 
2>   , RuntimeException
2>    + FullyQualifiedErrorId : MethodNotFound
2> 
2>
2>Using Cluster Data Root: 
2>Using Cluster Log Root: 
2>
2>Test-Path : Cannot bind argument to parameter 'Path' because it is an empty str
2>ing.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:41 char:41
2>+         $isPathExists = (Test-Path -Path <<<<  $pathToTest -ErrorAction Silen
2>tlyContinue -ErrorVariable testErrors)
2>    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingVa 
2>   lidationException
2>    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAl 
2>   lowed,Microsoft.PowerShell.Commands.TestPathCommand
2> 
2>Test-Path : Cannot bind argument to parameter 'Path' because it is an empty str
2>ing.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:41 char:41
2>+         $isPathExists = (Test-Path -Path <<<<  $pathToTest -ErrorAction Silen
2>tlyContinue -ErrorVariable testErrors)
2>    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingVa 
2>   lidationException
2>    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAl 
2>   lowed,Microsoft.PowerShell.Commands.TestPathCommand
2> 
2>The term 'ConvertFrom-Json' is not recognized as the name of a cmdlet, function
2>, script file, or operable program. Check the spelling of the name, or if a pat
2>h was included, verify that the path is correct and try again.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:218 char:69
2>+     $configJson = Get-Content $jsonFileTemplate -Raw | ConvertFrom-Json <<<< 
2>    + CategoryInfo          : ObjectNotFound: (ConvertFrom-Json:String) [], Co 
2>   mmandNotFoundException
2>    + FullyQualifiedErrorId : CommandNotFoundException
2> 
2>Property 'fabricSettings' cannot be found on this object; make sure it exists a
2>nd is settable.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:225 char:32
2>+         $configJson.properties. <<<< fabricSettings += $setupSetting
2>    + CategoryInfo          : InvalidOperation: (fabricSettings:String) [], Ru 
2>   ntimeException
2>    + FullyQualifiedErrorId : PropertyNotFound
2> 
2>The term 'ConvertTo-Json' is not recognized as the name of a cmdlet, function, 
2>script file, or operable program. Check the spelling of the name, or if a path 
2>was included, verify that the path is correct and try again.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:274 char:30
2>+     $jsonObject = ConvertTo-Json <<<<  $configJson -Depth 10
2>    + CategoryInfo          : ObjectNotFound: (ConvertTo-Json:String) [], Comm 
2>   andNotFoundException
2>    + FullyQualifiedErrorId : CommandNotFoundException
2> 
2>The generated json path is C:\Users\kmayank\AppData\Local\Temp\tmp5B12.tmp.json
2>Exception calling "LoadFrom" with "1" argument(s): "Could not load file or asse
2>mbly 'file:///C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\
2>Microsoft.ServiceFabric.DeploymentManager.dll' or one of its dependencies. This
2> assembly is built by a runtime newer than the currently loaded runtime and can
2>not be loaded."
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:171 char:33
2>+     [Reflection.Assembly]::LoadFrom <<<< ($deploymentmangager) > $null
2>    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
2>    + FullyQualifiedErrorId : DotNetMethodException
2> 
2>Unable to find type [Microsoft.ServiceFabric.DeploymentManager.Common.Standalon
2>eUtility]: make sure that the assembly containing this type is loaded.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:172 char:94
2>+     $manifestFileTemplate = [Microsoft.ServiceFabric.DeploymentManager.Common
2>.StandaloneUtility] <<<< ::GetClusterManifestFromJsonConfig($jsonTemplate, "", 
2>"")
2>    + CategoryInfo          : InvalidOperation: (Microsoft.Servi...andaloneUti 
2>   lity:String) [], RuntimeException
2>    + FullyQualifiedErrorId : TypeNotFound
2> 
2>Join-Path : Cannot bind argument to parameter 'Path' because it is an empty str
2>ing.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:431 char:43
2>+         $ImageStoreShare = Join-Path -Path <<<<  $clusterDataRoot -ChildPath 
2>"ImageStoreShare"
2>    + CategoryInfo          : InvalidData: (:) [Join-Path], ParameterBindingVa 
2>   lidationException
2>    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAl 
2>   lowed,Microsoft.PowerShell.Commands.JoinPathCommand
2> 
2>New-Item : Cannot bind argument to parameter 'Path' because it is an empty stri
2>ng.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:433 char:17
2>+         New-Item <<<<  "$ImageStoreShare" -type directory -force > $null
2>    + CategoryInfo          : InvalidData: (:) [New-Item], ParameterBindingVal 
2>   idationException
2>    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAl 
2>   lowed,Microsoft.PowerShell.Commands.NewItemCommand
2> 
2>Get-Acl : Cannot validate argument on parameter 'Path'. The argument is null or
2> empty. Supply an argument that is not null or empty and then try the command a
2>gain.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:25 char:23
2>+     $currAcl = Get-Acl <<<<  "$folderPath"
2>    + CategoryInfo          : InvalidData: (:) [Get-Acl], ParameterBindingVali 
2>   dationException
2>    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Power 
2>   Shell.Commands.GetAclCommand
2> 
2>You cannot call a method on a null-valued expression.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:29 char:27
2>+     $currAcl.SetAccessRule <<<< ($accessRuleWinFabAdmin)
2>    + CategoryInfo          : InvalidOperation: (SetAccessRule:String) [], Run 
2>   timeException
2>    + FullyQualifiedErrorId : InvokeMethodOnNull
2> 
2>Set-Acl : Cannot bind argument to parameter 'Path' because it is an empty strin
2>g.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:31 char:12
2>+     Set-Acl <<<<  "$folderPath" $currAcl
2>    + CategoryInfo          : InvalidData: (:) [Set-Acl], ParameterBindingVali 
2>   dationException
2>    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAl 
2>   lowed,Microsoft.PowerShell.Commands.SetAclCommand
2> 
2>Copy-Item : Cannot bind argument to parameter 'Path' because it is an empty str
2>ing.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:486 char:14
2>+     Copy-Item <<<<  $manifestFileTemplate $manifestFile -Force
2>    + CategoryInfo          : InvalidData: (:) [Copy-Item], ParameterBindingVa 
2>   lidationException
2>    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAl 
2>   lowed,Microsoft.PowerShell.Commands.CopyItemCommand
2> 
2>Get-Content : Cannot find path 'C:\Users\kmayank\AppData\Local\Temp\VBS-CHD-FLT
2>-T02-Server-ScaleMin.xml' because it does not exist.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:456 char:17
2>+     (Get-Content <<<<  $filePath) | ForEach-Object {$_ -replace $toReplace, $
2>newString } | Set-Content $filePath
2>    + CategoryInfo          : ObjectNotFound: (C:\Users\kmayan...er-ScaleMin.x 
2>   ml:String) [Get-Content], ItemNotFoundException
2>    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetCo 
2>   ntentCommand
2> 
2>Get-Content : Cannot find path 'C:\Users\kmayank\AppData\Local\Temp\VBS-CHD-FLT
2>-T02-Server-ScaleMin.xml' because it does not exist.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:456 char:17
2>+     (Get-Content <<<<  $filePath) | ForEach-Object {$_ -replace $toReplace, $
2>newString } | Set-Content $filePath
2>    + CategoryInfo          : ObjectNotFound: (C:\Users\kmayan...er-ScaleMin.x 
2>   ml:String) [Get-Content], ItemNotFoundException
2>    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetCo 
2>   ntentCommand
2> 
2>The term 'Test-ServiceFabricClusterManifest' is not recognized as the name of a
2> cmdlet, function, script file, or operable program. Check the spelling of the 
2>name, or if a path was included, verify that the path is correct and try again.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:504 char:38
2>+     Test-ServiceFabricClusterManifest <<<<  -ClusterManifestPath "$manifestFi
2>le" > $null
2>    + CategoryInfo          : ObjectNotFound: (Test-ServiceFabricClusterManife 
2>   st:String) [], CommandNotFoundException
2>    + FullyQualifiedErrorId : CommandNotFoundException
2> 
2>PrepareClusterManifest : Could not validate cluster manifest 'C:\Users\kmayank\
2>AppData\Local\Temp\VBS-CHD-FLT-T02-Server-ScaleMin.xml'
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:530 char:43
2>+     $manifestFile = PrepareClusterManifest <<<<  $manifestFileTemplate $image
2>StoreConnectionString $machineName $isSecure
2>    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorExcep 
2>   tion
2>    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio 
2>   n,PrepareClusterManifest
2> 
2>ScriptHalted
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
2>lities.psm1:508 char:14
2>+         throw <<<< 
2>    + CategoryInfo          : OperationStopped: (:) [], RuntimeException
2>    + FullyQualifiedErrorId : ScriptHalted
2> 
2>Finished executing script 'Set-LocalClusterReady'.
2>Time elapsed: 00:00:01.0454352
2>The PowerShell script failed to execute.
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
  • 电源外壳执行失败消息显示在错误列表中。
  • 我已经在管理员模式下打开了VS和Power Shell。
  • 我跟踪了一些链接,这些链接指出可以运行CleanCluster.ps1,,运行DevClusterSetup或卸载并重新安装SDK,但是没有用。 RemoveServicefabricnodeConfigutation is not recognized
  • 我尝试单击托盘Icon Fabric Manager>设置本地群集>节点1,但是它再次失败。Fabric Service Manager tray

当我被困在这里时,请协助。

0 个答案:

没有答案