Azure 服务结构本地群集管理器:无法设置本地群集
我按照说明从以下位置构建基本Service fabric应用程序: 我使用VS2017创建了一个状态完整/无状态服务结构应用程序。我的计算机上安装了最新的Azure Service fabric SDK。当我运行我的应用程序时,即按下(F5),我得到以下错误:Azure 服务结构本地群集管理器:无法设置本地群集,azure,azure-service-fabric,Azure,Azure Service Fabric,我按照说明从以下位置构建基本Service fabric应用程序: 我使用VS2017创建了一个状态完整/无状态服务结构应用程序。我的计算机上安装了最新的Azure Service fabric SDK。当我运行我的应用程序时,即按下(F5),我得到以下错误: 1>------ Build started: Project: MySericeFab1, Configuration: Debug x64 ------ 2>------ Deploy started: Proj
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 ==========
1>----构建已启动:项目:myseriefab1,配置:Debug x64------
2> ----部署已启动:项目:myseriefab1,配置:Debug x64------
2> 已开始执行脚本“GetApplicationExistence”。
2> 已完成执行脚本“GetApplicationExistence”。
2> 时间流逝:00:00:00.3874969
2> 已开始执行脚本“Set-LocalClusterReady”。
2> powershell-非交互式-NoProfile-WindowStyle Hidden-ExecutionPolicy Bypass-命令“导入模块”C:\Program Files\Microsoft SDK\Service Fabric\Tools\Scripts\DefaultLocalClusterSetup.psm1';设置LocalClusterReady-createOneNodeCluster$true
2> 获取模块:找不到与参数名称“Refresh”匹配的参数。
2> 位于C:\Program Files\Microsoft SDK\Service Fabric\Tools\Scripts\DefaultLocalClu
2> sterSetup.psm1:16字符:39
2> +获取模块-列表可用-刷新ingException
2> +FullyQualifiedErrorId:NamedParameterNotFound,Microsoft.PowerShell.Comm
2> ands.GetModuleCommand
2>
2>--------------------------------------------
2> 未设置本地服务结构群集。。。
2> 正在安装本地服务结构群集,请稍候。这可能需要几分钟。。。
2> 警告:System.Management.Automation.CommandNotFoundException:术语
2> “Remove ServiceFabricNodeConfiguration”未被识别为服务器的名称
2> cmdlet、函数、脚本文件或可操作程序。检查单词的拼写
2> 名称,或者如果包含路径,请验证路径是否正确,然后重试
2> 再说一遍。
2>
2> 位于System.Management.Automation.CommandDiscovery.LookupCommandInfo(字符串
2> commandName,CommandOrigin(CommandOrigin)
2>
2> 在
2> System.Management.Automation.CommandDiscovery.LookupCommandProcessor(字符串)
2> commandName,CommandOrigin CommandOrigin,可为空的`1 useLocalScope)
2>
2> 位于System.Management.Automation.ExecutionContext.CreateCommand(字符串
2> 指挥部)
2>
2> 在System.Management.Automation.CommandNode.CreateCommandProcessor(Int32&
2> 索引,ExecutionContext)
2>
2> 在System.Management.Automation.CommandNode.AddToPipeline(PipelineProcessor
2> 管道,ExecutionContext)
2>
2> 在System.Management.Automation.PipelineNode.Execute(数组输入,管道
2> outputPipe、ArrayList和resultList、ExecutionContext)
2>
2> 在
2> System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode
2> 语句、数组输入、管道输出、ArrayList和resultList,
2> ExecutionContext(上下文)
2> 警告:Remove ServiceFabricNodeConfiguration引发异常
2> 方法调用失败,因为[System.String]不包含名为的方法
2> “IsNullOrWhiteSpace”。
2> 位于C:\Program Files\Microsoft SDK\Service Fabric\Tools\Scripts\ClusterSetupUti
2> 利提斯psm1:384字符:43
2> +if([System.String]::IsNullOrWhiteSpace+FullyQualifiedErrorId:MethodNotFound
2>
2> 方法调用失败,因为[System.String]不包含名为的方法
2> “IsNullOrWhiteSpace”。
2> 位于C:\Program Files\Microsoft SDK\Service Fabric\Tools\Scripts\ClusterSetupUti
2> 利提斯psm1:388字符:43
2> +if([System.String]::IsNullOrWhiteSpace+FullyQualifiedErrorId:MethodNotFound
2>
2> 方法调用失败,因为[System.String]不包含名为的方法
2> “IsNullOrWhiteSpace”。
2> 位于C:\Program Files\Microsoft SDK\Service Fabric\Tools\Scripts\ClusterSetupUti
2> 利提斯psm1:348字符:43
2> +if([System.String]::IsNullOrWhiteSpace+FullyQualifiedErrorId:MethodNotFound
2>
2> 方法调用失败,因为[System.String]不包含名为的方法
2> “IsNullOrWhiteSpace”。
2> 位于C:\Program Files\Microsoft SDK\Service Fabric\Tools\Scripts\ClusterSetupUti
2> 利提斯psm1:348字符:43
2> +if([System.String]::IsNullOrWhiteSpace+FullyQualifiedErrorId:MethodNotFound
2>
2>
2> 使用群集数据根目录:
2> 使用群集日志根目录:
2>
2> 测试路径:无法将参数绑定到参数“Path”,因为它是空str
2> 我很生气。
2> 位于C:\Program Files\Microsoft SDK\Service Fabric\Tools\Scripts\ClusterSetupUti
2> 利提斯psm1:41字符:41
2> +$isPathExists=(测试路径-路径lidationException
2> +FullyQualifiedErrorId:参数ArgumentValidationErrorRemptyStringNotal
2> lowed,Microsoft.PowerShell.Commands.TestPathCommand
2>
2> 测试路径:无法将参数绑定到参数“Path”,因为它是空str
2> 我很生气。
2> 位于C:\Program Files\Microsoft SDK\Service Fabric\Tools\Scripts\ClusterSetupUti
2> 利提斯psm1:41字符:41
2> +$isPathExists=(测试路径-路径lidationException
2> +FullyQualifiedErrorId:参数ArgumentValidationErrorRemptyStringNotal
2> lowed,Microsoft.PowerShell.Commands.TestPathCommand
2>
2> 术语“ConvertFrom Json”无法识别为cmdlet函数的名称
2> ,脚本文件或可操作程序。请检查名称的拼写,或检查
2> 已包含h,请验证路径是否正确,然后重试。
2> 位于C:\Program Files\Microsoft SDK\Service Fabric\Tools\Scripts\ClusterSetupUti
2> 利提斯psm1:218字符:69
2> +$configJson=Get Content$jsonFileTemplate-Raw | ConvertFrom Json+FullyQualifiedErrorId:CommandNotFoundException
2>
2> 在此对象上找不到属性“fabricSettings”;请确保该属性存在
2> nd是可设置的。
2> 位于C:\Program Files\Microsoft SDK\Service Fabric\Tools\Scripts\ClusterSetupUti
2> 利提斯psm1:225字符:32
2> +$configJson.properties.+FullyQualifiedErrorId:PropertyNotFound
2>
2> 术语“ConvertTo Json”未被识别为cmdlet、函数、,
2> 脚本文件或可操作程序。请检查名称的拼写,或检查路径是否正确
2> 已包括,请验证路径是否正确,然后重试。
2> A