如何修复由于docker错误导致Service Fabric Mesh失败的问题

问题描述 投票:0回答:1

我一直在使用Service Fabric Mesh Preview来测试服务。一切都工作正常,我甚至能够发布到Azure,然后在我尝试向解决方案添加额外的服务网格应用程序后,一切都失败了,由于docker生成的错误,我的本地群集不再切换到网格节点。日志在下面,从我看到它尝试创建网络失败,并说对象已经存在,但是,当我从命令行列出docker ntworks时,它只显示默认值,但不显示日志中的那个:“ servicefabric_nat“我已经尝试卸载所有内容(Docker,SDK,VS Tools,删除注册表项)并重新安装,仍然是同样的问题。我该怎么做才能解决这个错误?

谢谢

**********************
Windows PowerShell transcript start
Start time: 20190331163515
Username: AzureAD\EduardoFonseca
RunAs User: AzureAD\EduardoFonseca
Configuration Name: 
Machine: DESKTOP-CAP3E26 (Microsoft Windows NT 10.0.17134.0)
Host Application: PowerShell.exe -WindowStyle Hidden -NonInteractive -ExecutionPolicy RemoteSigned -Command & 'C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1' -Auto -PathToClusterLogRoot C:\SFDevCluster\Log -SetupLogFileName DevClusterSetup.log -CreateOneNodeCluster -CreateMeshCluster
Process ID: 12248
PSVersion: 5.1.17134.407
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.17134.407
BuildVersion: 10.0.17134.407
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\SFDevCluster\Log\DevClusterSetup.log
Installing certificates for secure cluster setup...
Cleaning existing certificates...
Certificates removed.
Installing new certificates...
WARNING: This will install certificate with 'CN=ServiceFabricDevClusterCert' in following stores:

    # LocalMachine\My
    # LocalMachine\root &
    # CurrentUser\My

The CleanCluster.ps1 will clean these certificates or you can clean them up using script 'CertSetup.ps1 -Clean -CertSubjectName CN=ServiceFabricDevClusterCert'.
FabricSetup.exe invoked with arguments (C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\FabricSetup.exe
 /operation:installsfvolumedriver). Current Exe version 6.4.644.9590
Environment information Data Root C:\ProgramData\Microsoft Service Fabric, Log Root C:\ProgramData\Microsoft Service Fab
ric\log
Starting service eventlog
Starting service pla
Starting DriverInstallManager::Install
SFBDMiniport driver install path : C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\SFBDMiniport.inf for
 uninstalling device.
SFBDMiniport driver uninstalled sucessfully.
Sign Location is empty ''
Installing SFBDMiniport Driver
SFBDMiniport driver path : C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\SFBDMiniport.inf for install
ing device.
SFBDMiniport installed from path : C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\SFBDMiniport.inf.
DriverInstallManager::Install successful
Operation successful
Creating Docker network and adding firewall rule...

Status   Name               DisplayName
------   ----               -----------
Running  docker             Docker Engine
docker : Error: No such network: servicefabric_nat
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:590 char:35
+ ... onContent = docker $dockercommandParameters.Split(" ") 2> $tempErrorF ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error: No such ...rvicefabric_nat:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
docker : Error response from daemon: HNS failed with error : The object already exists.
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:590 char:35
+ ... onContent = docker $dockercommandParameters.Split(" ") 2> $tempErrorF ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error response ...already exists.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
docker : Error response from daemon: HNS failed with error : The object already exists.
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:590 char:35
+ ... onContent = docker $dockercommandParameters.Split(" ") 2> $tempErrorF ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error response ...already exists.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
docker : Error response from daemon: HNS failed with error : The object already exists.
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:590 char:35
+ ... onContent = docker $dockercommandParameters.Split(" ") 2> $tempErrorF ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error response ...already exists.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
docker : Error response from daemon: HNS failed with error : The object already exists.
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:590 char:35
+ ... onContent = docker $dockercommandParameters.Split(" ") 2> $tempErrorF ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error response ...already exists.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
docker : Error response from daemon: HNS failed with error : The object already exists.
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:590 char:35
+ ... onContent = docker $dockercommandParameters.Split(" ") 2> $tempErrorF ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error response ...already exists.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
docker : Error response from daemon: HNS failed with error : The object already exists.
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:590 char:35
+ ... onContent = docker $dockercommandParameters.Split(" ") 2> $tempErrorF ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error response ...already exists.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
docker : Error response from daemon: HNS failed with error : The object already exists.
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:590 char:35
+ ... onContent = docker $dockercommandParameters.Split(" ") 2> $tempErrorF ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error response ...already exists.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
docker : Error response from daemon: HNS failed with error : The object already exists.
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:590 char:35
+ ... onContent = docker $dockercommandParameters.Split(" ") 2> $tempErrorF ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error response ...already exists.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
docker : Error response from daemon: HNS failed with error : The object already exists.
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:590 char:35
+ ... onContent = docker $dockercommandParameters.Split(" ") 2> $tempErrorF ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error response ...already exists.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
docker : Error response from daemon: HNS failed with error : The object already exists.
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:590 char:35
+ ... onContent = docker $dockercommandParameters.Split(" ") 2> $tempErrorF ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error response ...already exists.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
WARNING: Unable to communicate with Docker. Validate the following
WARNING:     Docker is installed on the machine
WARNING:     Docker service is running
WARNING:     Docker is configured to run Windows containers
WARNING:     Open a command prompt and make sure the following command succeeds
WARNING:         docker network create -d=nat --subnet="10.128.0.0/24" --gateway="10.128.0.1" servicefabric_nat
DockerNetworkCommandFailed : Unable to communicate with Docker. Visit FAQ at https://aka.ms/sfmesh for details
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:617 char:9
+         DockerNetworkCommandFailed $warningOnFail
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DockerNetworkCommandFailed
DockerNetworkCommandFailed : Unable to communicate with Docker. Visit FAQ at https://aka.ms/sfmesh for details
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:617 char:9
+         DockerNetworkCommandFailed $warningOnFail
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DockerNetworkCommandFailed

PS>TerminatingError(): "ScriptHalted"
>> TerminatingError(): "ScriptHalted"
>> TerminatingError(): "ScriptHalted"
>> TerminatingError(): "ScriptHalted"
>> TerminatingError(): "ScriptHalted"
ScriptHalted
**********************
Windows PowerShell transcript end
End time: 20190331163742
**********************
azure azure-service-fabric azure-service-fabric-mesh
1个回答
0
投票

已经找到了问题的原因,显然docker无法创建网络,因为网络适配器已经存在,它们在Windows中被列为网络适配器,以下是我如何解决问题:*卸载Hyper-V *卸载Hyper-V使用设备管理器的网络*重新安装Hyper-V

随着Service Fabric Local集群再次开始按预期工作。

© www.soinside.com 2019 - 2024. All rights reserved.