服务结构本地群集设置错误 [英] service fabric local cluster setup error

查看:54
本文介绍了服务结构本地群集设置错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的链接可以设置和运行本地集群.

Following link below to set-up and run local cluster.

当前,在运行应用程序时,它会错误地设置本地集群.

Currently when running the application, it errors out setting up local cluster.

开发环境:
Windows 10,Visual Studio 2017试用版,适用于Windows的Docker(尽管未使用)

Dev environment:
Windows 10, Visual Studio 2017 trial, Docker for Windows (Although not used)

已启用PowerShell脚本执行,并且以管理员身份运行Visual Studio.

PowerShell script execution has been enabled and visual studio was run as administrator.

错误消息:PowerShell脚本执行失败.有关详细信息,请参见输出"窗口.

Error message: The PowerShell script failed to execute. See the Output window for details.

输出窗口:

1>------ Build started: Project: MyApplication, Configuration: Debug x64 ------
2>------ Deploy started: Project: MyApplication, Configuration: Debug x64 ------
2>Started executing script 'GetApplicationExistence'.
2>Finished executing script 'GetApplicationExistence'.
2>Time elapsed: 00:00:02.1304224
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>--------------------------------------------
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>Stop-Service : Cannot find any service with service name 'FabricHostSvc'.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:144 char:5
2>+ Stop-Service FabricHostSvc -WarningAction SilentlyContinue
2>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> + CategoryInfo : ObjectNotFound: (FabricHostSvc:String) [Stop-Service], ServiceCommandException
2> + FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.StopServiceCommand
2>
2>WARNING: System.Management.Automation.CommandNotFoundException: The term 'Remove-ServiceFabricNodeConfiguration' is not
2> recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if
2>a path was included, verify that the path is correct and try again.
2>
2> at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception
2>exception)
2>
2> at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
2>
2> at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2>
2> at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2>WARNING: Remove-ServiceFabricNodeConfiguration throws exceptions
2>
2>Using Cluster Data Root: C:\SfDevCluster\Data
2>Using Cluster Log Root: C:\SfDevCluster\Log
2>
2>The generated json path is C:\Users[username]\AppData\Local\Temp\tmp5D74.tmp.json
2>Processing and validating cluster config.
2>Failed to open base key for machine ComputerFullName to check if machine is IOT Core.
2>Test-ServiceFabricClusterManifest : 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 name, or if a path was included, verify
2>that the path is correct and try again.
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:504 char:5
2>+ Test-ServiceFabricClusterManifest -ClusterManifestPath "$manifest ...
2>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> + CategoryInfo : ObjectNotFound: (Test-ServiceFabricClusterManifest:String) [], CommandNotFoundException
2> + FullyQualifiedErrorId : CommandNotFoundException
2>
2>PrepareClusterManifest : Could not validate cluster manifest
2>'C:\Users[username]\AppData\Local\Temp\LAP000338-Server-ScaleMin.xml'
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:530 char:21
2>+ ... ifestFile = PrepareClusterManifest $manifestFileTemplate $imageStoreC ...
2>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
2> + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,PrepareClusterManifest
2>
2>ScriptHalted
2>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:508 char:9
2>+ throw
2>+ ~~~~~
2> + CategoryInfo : OperationStopped: (:) [], RuntimeException
2> + FullyQualifiedErrorId : ScriptHalted
2>
2>Finished executing script 'Set-LocalClusterReady'.
2>Time elapsed: 00:00:10.9335415
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 ==========

推荐答案

首先要弄清楚这一点,这是安装程序的问题.当我安装Service Fabric SDK时,在安装过程中发生了一些事情,可以说是网络错误或安装未完成,但是我以某种方式错过了它,人为错误.

To get to the point first, it was the installer issue. When I was installing the Service Fabric SDK, something happened during the installation, let's say network error or installation was not complete however I somehow missed it, human error.

我不确定我是如何错过它的,但是重点是,我尝试卸载并重新安装SDK几次,以防万一以确保已完全安装SDK.问题是,最初的不正确安装会在整个过程中徘徊,因为有些目录和文件没有通过卸载完全删除,例如注册表项.

I am not sure how I missed it but the point is, I tried to uninstall and reinstall the SDK a few times just in case to make sure SDK was installed completely. And the problem was, the initial incorrect installation done was lingering throughout this whole process because there were directories and files not completely removed by uninstallation, such as registry keys.

在我手动删除注册表项和目录并重新安装SDK之后,一切似乎都很好.

After I manually delete registry keys and directories and reinstalled the SDK and now everything seems fine.

为帮助遇到类似问题的任何人,请编辑以下说明.( https://github.com/Azure/service中的说明的原始文章-fabric-issues/issues/566 )

To help anyone having similar issue, edited instruction below. Original article of the instruction in (https://github.com/Azure/service-fabric-issues/issues/566)

1. Uninstall Microsoft Service Fabric SDK.
2. Uninstall Service Fabric tools using the Visual Studio Installer.
3. Delete folder: C:\Program Files\Microsoft Service Fabric
4. Delete folder from registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Service Fabric
5. Reboot PC
6. Download Microsoft Web PI (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started) install the Microsoft Azure Service Fabric SDK. Btw. after I've deleted registry entries of SF, I've noticed that Web PI has finally installed three needed components (not only Azure Service Fabric SDK as it was for previous re-installations):
  Microsoft Visual C++ 2012 SP1 Redistributable Package (x64)
  Microsoft Azure Service Fabric Runtime - 6.3.162
  Microsoft Azure Service Fabric SDK - 3.2.162

7. Install Service Fabric tools using the Visual Studio Installer.
8. Create test project in Visual Studio 2017 and run it. Visual Studio created cluster automatically.

P.S.完成这些步骤之后,如果仍然无法安装Azure Service Fabric运行时,则它可能会保留在添加或删除程序"列表中,然后手动删除注册表项:Computer \ HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall \ServiceFabric(还是带空格的"Service Fabric" ??)

P.S. After following the steps and if you still can't install Azure Service Fabric Runtime, it could be remaining in "Add or Remove Programs" list, then delete registry key manually: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ServiceFabric (or is it "Service Fabric" with space..?)

这篇关于服务结构本地群集设置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆