繁体   English   中英

在本地部署 Service Fabric 项目:“FABRIC_E_IMAGEBUILDER_UNEXPECTED_ERROR”

[英]Deploying Service Fabric project locally: “FABRIC_E_IMAGEBUILDER_UNEXPECTED_ERROR”

我们公司从 Service Fabric 微服务开始。

正如 MS 文档所述,我们安装 Azure Service Fabric SDK ( https://docs.microsoft.com/en-us/azure/get-service-fabric ) 我们从 de WebPI 安装它,以管理员身份打开 powershell,然后运行“Set-ExecutionPolicy”命令。 稍后我们在 Visual Studio 中安装 Azure 工具,然后我们可以创建一个示例项目,一个无状态项目。

在项目加载所有依赖项之后,我们立即“启动”项目。 (VS 以管理员身份运行)VS 将本地集群设置为 1 个节点并部署微服务。 到此为止,一切都还好。

然后我们创建另一个无状态项目,我们做了同样的事情。 但是,这次我们在 VS 的 output 控制台和 Service Fabric Explorer 中遇到了错误。

    2>Started executing script 'Deploy-FabricApplication.ps1'.
    2>powershell -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command ". 'C:\Users\xxxxx\source\repos\Application2\Application2\Scripts\Deploy-FabricApplication.ps1' -ApplicationPackagePath 
    'C:\Users\xxxxx\source\repos\Application2\Application2\pkg\Debug' -PublishProfileFile 
    'C:\Users\xxxx\source\repos\Application2\Application2\PublishProfiles\Local.1Node.xml' -DeployOnly:$true -ApplicationParameter:@{_WFDebugParams_='[{"""CodePackageName""":"""Code""","""CodePackageLinkFolder""":"""C:\\Users\\xxxx\\source\\repos\\Application2\\Actor1\\bin\\Debug\\netcoreapp3.0\\win7-
    x64""","""ConfigPackageName""":"""Config""","""ConfigPackageLinkFolder""":"""C:\\Users\\xxx\\source\\repos\\Application2\\Actor1\\PackageRoot\\Config""","""DataPackageName""":null,"""DataPackageLinkFolder""":null,"""LockFile""":"""C:\\Users\\xxxx\\source\\repos\\Application2\\Actor1\\bin\\Debug\\netcoreapp3.0\\win7-x64\\_VS_ServiceFabric_lock.txt""","""WorkingFolder""":"""C:\\Users\\xxxx\\source\\repos\\Application2\\Actor1""","""ServiceManifestName""":"""Actor1Pkg""",
    """EntryPointType""":"""Main""","""DebugExePath""":null,"""DebugArguments""":null,"""DebugParametersFile""":"""C:\\Users\\xxx\\source\\repos\\Application2\\
    Actor1\\bin\\Debug\\netcoreapp3.0\\win7-x64\\_VS_ServiceFabric_debug.txt"""}]'} -
    UnregisterUnusedApplicationVersionsAfterUpgrade $false -
    OverrideUpgradeBehavior 'None' -OverwriteBehavior 'Always' -
    SkipPackageValidation:$true -ErrorAction Stop"
    2>Copying application to image store...
    2>Upload to Image Store succeeded
    2>Registering application type...
    2>Register application type started. Use Get-ServiceFabricApplicationType to query for status.
    2>Running Image Builder process ...
    2>Downloading application package from 'Application2Type' ...
    2>Validating package and computing checksums ...
    2>FABRIC_E_IMAGEBUILDER_UNEXPECTED_ERROR: Se han producido uno o varios errores. --> AggregateException: Se han producido uno o varios errores. --> FileLoadException: El proceso no tiene acceso al archivo porque est  siendo utilizado por otro proceso. (Excepci¢n de HRESULT: 0x80070020)
    2>Registration of application type failed.
    2>En C:\Program Files\Microsoft SDKs\Service 
    2>Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1: 308 Car cter: 17
    2>+                 throw "Registration of application type failed."
    2>+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2>    + CategoryInfo          : OperationStopped: (Registration of application type failed.:String) [], RuntimeException
    2>    + FullyQualifiedErrorId : Registration of application type failed.
    2> 
    2>Finished executing script 'Deploy-FabricApplication.ps1'.
    2>Time elapsed: 00:00:13.0719235
    2>The PowerShell script failed to execute.
    ========== Build: 1 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

我们重置了集群并尝试再次部署 2 个示例,但两个微服务出现了相同的错误。

我在 Google、MS Docs 和这里寻找解决方案,但没有人有解决方案。

根据您的日志,powershel 无法访问某些进程。 作为一个非常广泛的猜测,它可能是防病毒软件或您的第一次调试 session 的问题。

您是否尝试过不调试(启动 vs),而是在集群重置\重启后发布解决方案(部署项目->右键单击->发布)?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM