2017-09-05 61 views
2

试图安装一个集群中,我得到这个错误:NodeType.Certificates需要什么样的规范?

Cluster manifest validation failed with exception System.ArgumentException: NodeType.Certificates is req 
uired if section Security parameter ServerAuthCredentialType is set to X509 

我试图安装此配置:

.\CreateServiceFabricCluster.ps1 -ClusterConfigFilePath .\ClusterConfig.X509.DevCluster.json 

得到以下错误:

Running Best Practices Analyzer... Best Practices Analyzer completed successfully. Creating Service Fabric Cluster... Processing and validating cluster config. Configuring nodes. Default installation directory chosen based on system drive of machine 'localhost'. Copying installer to all machines. Configuring machine 'localhost'. System.Fabric.FabricDeployer.ClusterManifestValidationException: Cluster manifest validation failed with exception System.ArgumentException: NodeType.Certificates is req uired if section Security parameter ServerAuthCredentialType is set to X509
at System.Fabric.Management.WindowsFabricValidator.FabricSettingsValidator.VerifyCertificates(String[] source, String[] destination, ClusterManifestTypeNodeType nodeT ype)
at System.Fabric.Management.WindowsFabricValidator.FabricSettingsValidator.VerifyDependencies() at System.Fabric.Management.WindowsFabricValidator.FabricSettingsValidator.ValidateSettings() at System.Fabric.Management.WindowsFabricValidator.FabricValidator.Validate() at System.Fabric.FabricDeployer.FabricValidatorWrapper.ValidateAndEnsureDefaultImageStore() at System.Fabric.FabricDeployer.FabricValidatorWrapper.ValidateAndEnsureDefaultImageStore() at System.Fabric.FabricDeployer.ConfigureOperation.OnExecuteOperation(DeploymentParameters parameters, ClusterManifestType clusterManifest, Infrastructure infrastruct ure) at System.Fabric.FabricDeployer.DeploymentOperation.ExecuteOperationPrivate(DeploymentParameters parameters) at System.Fabric.FabricDeployer.DeploymentOperation.ExecuteOperation(DeploymentParameters parameters, Boolean disableFileTrace) at System.Fabric.FabricDeployer.ConfigurationDeployer.NewNodeConfigurationInner(String clusterManifestPath, String infrastructureManifestPath, String jsonClusterConfi gPath, String fabricDataRoot, String fabricLogRoot, String fabricHostCredentialUser, SecureString fabricHostCredentialPassword, Boolean runFabricHostServiceAsManual, Boo lean removeExistingConfiguration, FabricPackageType fabricPackageType, String fabricPackageRoot, String machineName, String bootstrapPackagePath) System.Fabric.FabricDeployer.ClusterManifestValidationException: Cluster manifest validation failed with exception System.ArgumentException: NodeType.Certificates is req uired if section Security parameter ServerAuthCredentialType is set to X509
at System.Fabric.Management.WindowsFabricValidator.FabricSettingsValidator.VerifyCertificates(String[] source, String[] destination, ClusterManifestTypeNodeType nodeT ype)
at System.Fabric.Management.WindowsFabricValidator.FabricSettingsValidator.VerifyDependencies() at System.Fabric.Management.WindowsFabricValidator.FabricSettingsValidator.ValidateSettings() at System.Fabric.Management.WindowsFabricValidator.FabricValidator.Validate() at System.Fabric.FabricDeployer.FabricValidatorWrapper.ValidateAndEnsureDefaultImageStore() at System.Fabric.FabricDeployer.FabricValidatorWrapper.ValidateAndEnsureDefaultImageStore() at System.Fabric.FabricDeployer.ConfigureOperation.OnExecuteOperation(DeploymentParameters parameters, ClusterManifestType clusterManifest, Infrastructure infrastruct ure) at System.Fabric.FabricDeployer.DeploymentOperation.ExecuteOperationPrivate(DeploymentParameters parameters) at System.Fabric.FabricDeployer.DeploymentOperation.ExecuteOperation(DeploymentParameters parameters, Boolean disableFileTrace) at System.Fabric.FabricDeployer.ConfigurationDeployer.NewNodeConfigurationInner(String clusterManifestPath, String infrastructureManifestPath, String jsonClusterConfi gPath, String fabricDataRoot, String fabricLogRoot, String fabricHostCredentialUser, SecureString fabricHostCredentialPassword, Boolean runFabricHostServiceAsManual, Boo lean removeExistingConfiguration, FabricPackageType fabricPackageType, String fabricPackageRoot, String machineName, String bootstrapPackagePath) at System.Fabric.FabricDeployer.ConfigurationDeployer.NewNodeConfiguration(String clusterManifestPath, String infrastructureManifestPath, String jsonClusterConfigPath , String fabricDataRoot, String fabricLogRoot, String fabricHostCredentialUser, SecureString fabricHostCredentialPassword, Boolean runFabricHostServiceAsManual, Boolean removeExistingConfiguration, FabricPackageType fabricPackageType, String fabricPackageRoot, String machineName, String bootstrapPackagePath) CreateCluster Error: System.AggregateException: One or more errors occurred. ---> System.Fabric.FabricDeployer.ClusterManifestValidationException: Cluster manifest valid ation failed with exception System.ArgumentException: NodeType.Certificates is required if section Security parameter ServerAuthCredentialType is set to X509 at System.Fabric.Management.WindowsFabricValidator.FabricSettingsValidator.VerifyCertificates(String[] source, String[] destination, ClusterManifestTypeNodeType nodeT ype)
at System.Fabric.Management.WindowsFabricValidator.FabricSettingsValidator.VerifyDependencies() at System.Fabric.Management.WindowsFabricValidator.FabricSettingsValidator.ValidateSettings() at System.Fabric.Management.WindowsFabricValidator.FabricValidator.Validate() at System.Fabric.FabricDeployer.FabricValidatorWrapper.ValidateAndEnsureDefaultImageStore() at System.Fabric.FabricDeployer.FabricValidatorWrapper.ValidateAndEnsureDefaultImageStore() at System.Fabric.FabricDeployer.ConfigureOperation.OnExecuteOperation(DeploymentParameters parameters, ClusterManifestType clusterManifest, Infrastructure infrastruct ure) at System.Fabric.FabricDeployer.DeploymentOperation.ExecuteOperationPrivate(DeploymentParameters parameters) at System.Fabric.FabricDeployer.DeploymentOperation.ExecuteOperation(DeploymentParameters parameters, Boolean disableFileTrace) at System.Fabric.FabricDeployer.ConfigurationDeployer.NewNodeConfigurationInner(String clusterManifestPath, String infrastructureManifestPath, String jsonClusterConfi gPath, String fabricDataRoot, String fabricLogRoot, String fabricHostCredentialUser, SecureString fabricHostCredentialPassword, Boolean runFabricHostServiceAsManual, Boo lean removeExistingConfiguration, FabricPackageType fabricPackageType, String fabricPackageRoot, String machineName, String bootstrapPackagePath) at System.Fabric.FabricDeployer.ConfigurationDeployer.NewNodeConfiguration(String clusterManifestPath, String infrastructureManifestPath, String jsonClusterConfigPath , String fabricDataRoot, String fabricLogRoot, String fabricHostCredentialUser, SecureString fabricHostCredentialPassword, Boolean runFabricHostServiceAsManual, Boolean removeExistingConfiguration, FabricPackageType fabricPackageType, String fabricPackageRoot, String machineName, String bootstrapPackagePath) at Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.<>c__DisplayClass14_0.b__1(String machineName) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0 1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object ) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action
1 body, Action 2 bodyWithState, F unc 4 bodyWithLocal, Func 1 localInit, Action 1 localFinally) at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable 1 source, ParallelOptions parallelOptions, Action 1 body, Action 2 bodyWithState, Action 3 bodyWithStateAndIndex, Func 4 bodyWithStateAndLocal, Func 5 bodyWithEverything, Func 1 localInit, Action 1 localFinally) at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable 1 source, Action 1 body) at Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.<>c__DisplayClass14_0.b__0() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.d__1.MoveNext() ---> (Inner Exception #0) System.Fabric.FabricDeployer.ClusterManifestValidationException: Cluster manifest validation failed with exception System.ArgumentException: No deType.Certificates is required if section Security parameter ServerAuthCredentialType is set to X509
at System.Fabric.Management.WindowsFabricValidator.FabricSettingsValidator.VerifyCertificates(String[] source, String[] destination, ClusterManifestTypeNodeType nodeT ype)
at System.Fabric.Management.WindowsFabricValidator.FabricSettingsValidator.VerifyDependencies() at System.Fabric.Management.WindowsFabricValidator.FabricSettingsValidator.ValidateSettings() at System.Fabric.Management.WindowsFabricValidator.FabricValidator.Validate() at System.Fabric.FabricDeployer.FabricValidatorWrapper.ValidateAndEnsureDefaultImageStore() at System.Fabric.FabricDeployer.FabricValidatorWrapper.ValidateAndEnsureDefaultImageStore() at System.Fabric.FabricDeployer.ConfigureOperation.OnExecuteOperation(DeploymentParameters parameters, ClusterManifestType clusterManifest, Infrastructure infrastruct ure) at System.Fabric.FabricDeployer.DeploymentOperation.ExecuteOperationPrivate(DeploymentParameters parameters) at System.Fabric.FabricDeployer.DeploymentOperation.ExecuteOperation(DeploymentParameters parameters, Boolean disableFileTrace) at System.Fabric.FabricDeployer.ConfigurationDeployer.NewNodeConfigurationInner(String clusterManifestPath, String infrastructureManifestPath, String jsonClusterConfi gPath, String fabricDataRoot, String fabricLogRoot, String fabricHostCredentialUser, SecureString fabricHostCredentialPassword, Boolean runFabricHostServiceAsManual, Boo lean removeExistingConfiguration, FabricPackageType fabricPackageType, String fabricPackageRoot, String machineName, String bootstrapPackagePath) at System.Fabric.FabricDeployer.ConfigurationDeployer.NewNodeConfiguration(String clusterManifestPath, String infrastructureManifestPath, String jsonClusterConfigPath , String fabricDataRoot, String fabricLogRoot, String fabricHostCredentialUser, SecureString fabricHostCredentialPassword, Boolean runFabricHostServiceAsManual, Boolean removeExistingConfiguration, FabricPackageType fabricPackageType, String fabricPackageRoot, String machineName, String bootstrapPackagePath) at Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.<>c__DisplayClass14_0.b__1(String machineName) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.b__1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )<---

Trace folder already exists. Traces will be written to existing trace folder: C:\ooo360\5.7.220\DeploymentTraces Cleaning up faulted installation. FabricRoot not found in registry of target machine localhost. Create Cluster failed. For more information please look at traces in FabricLogRoot. Create Cluster failed with exception: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. at Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.ServiceFabric.DeploymentManager.DeploymentManager.d__2.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at Microsoft.ServiceFabric.Powershell.ClusterCmdletBase.NewCluster(String clusterConfigurationFilePath, String fabricPackageSourcePath, Boolean noCleanupOnFailure, Bo olean force) ---> (Inner Exception #0) System.AggregateException: One or more errors occurred. at Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.ServiceFabric.DeploymentManager.DeploymentManager.d__2.MoveNext()<---

Create Cluster failed with exception: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. at Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.ServiceFabric.DeploymentManager.DeploymentManager.d__2.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at Microsoft.ServiceFabric.Powershell.ClusterCmdletBase.NewCluster(String clusterConfigurationFilePath, String fabricPackageSourcePath, Boolean noCleanupOnFailure, Boo lean force) ---> (Inner Exception #0) System.AggregateException: One or more errors occurred. at Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.ServiceFabric.DeploymentManager.DeploymentManager.d__2.MoveNext()<---

这里的我的配置文件:

{ 
"name": "SampleCluster", 
"clusterConfigurationVersion": "1.0.0", 
"apiVersion": "04-2017", 
"nodes": [ 
    { 
     "nodeName": "vm0", 
     "iPAddress": "localhost", 
     "nodeTypeRef": "NodeType0", 
     "faultDomain": "fd:/dc1/r0", 
     "upgradeDomain": "UD0" 
    }, 
    { 
     "nodeName": "vm1", 
     "iPAddress": "localhost", 
     "nodeTypeRef": "NodeType1", 
     "faultDomain": "fd:/dc1/r1", 
     "upgradeDomain": "UD1" 
    }, 
    { 
     "nodeName": "vm2", 
     "iPAddress": "localhost", 
     "nodeTypeRef": "NodeType2", 
     "faultDomain": "fd:/dc1/r2", 
     "upgradeDomain": "UD2" 
    } 
], 
"properties": { 
    "diagnosticsStore": 
    { 
     "metadata": "Please replace the diagnostics file share with an actual file share accessible from all cluster machines.", 
     "dataDeletionAgeInDays": "7", 
     "storeType": "FileShare", 
     "connectionstring": "c:\\ProgramData\\SF\\DiagnosticsStore" 
    }, 
    "security": { 
     "metadata": "The Credential type X509 indicates this is cluster is secured using X509 Certificates. The thumbprint format is - d5 ec 42 3b 79 cb e5 07 fd 83 59 3c 56 b9 d5 31 24 25 42 64.", 
     "ClusterCredentialType": "X509", 
     "ServerCredentialType": "X509", 
     "CertificateInformation": { 
      "ClusterCertificateCommonNames": { 
      "CommonNames": [ 
       { 
       "CertificateCommonName": "ooo-WS-Ashort.ccc.int" 
       } 
      ], 
      "X509StoreName": "My" 
      }, 
      "ServerCertificate": { 
       "Thumbprint": "719ECFD3F5xxxxxxxxx21C69CC36514126", 
       "X509StoreName": "My" 
      }, 
      "ServerCertificateCommonNames": { 
      "CommonNames": [ 
       { 
       "CertificateCommonName": "ooo-WS-Ashort.ccc.int" 
       } 
      ], 
      "X509StoreName": "My" 
      }, 
      "ClientCertificateThumbprints": [{ 
       "CertificateThumbprint": "719ECFD3F55xxxxxxx69CC36514126", 
       "IsAdmin": false 
      }, { 
       "CertificateThumbprint": "39C52B527B6xxxxxxxxxxDD115274CBE9A", 
       "IsAdmin": true 
      }] 
     } 
    }, 
    "nodeTypes": [ 
     { 
      "name": "NodeType0", 
      "clientConnectionEndpointPort": "19000", 
      "clusterConnectionEndpointPort": "19001", 
      "leaseDriverEndpointPort": "19002", 
      "serviceConnectionEndpointPort": "19003", 
      "httpGatewayEndpointPort": "19080", 
      "reverseProxyEndpointPort": "19081", 
      "applicationPorts": { 
       "startPort": "20001", 
       "endPort": "20031" 
      }, 
      "isPrimary": true 
     }, 
     { 
      "name": "NodeType1", 
      "clientConnectionEndpointPort": "19004", 
      "clusterConnectionEndpointPort": "19005", 
      "leaseDriverEndpointPort": "19006", 
      "serviceConnectionEndpointPort": "19007", 
      "httpGatewayEndpointPort": "19082", 
      "reverseProxyEndpointPort": "19083", 
      "applicationPorts": { 
       "startPort": "20288", 
       "endPort": "20318" 
      }, 
      "isPrimary": true 
     }, 
     { 
      "name": "NodeType2", 
      "clientConnectionEndpointPort": "19008", 
      "clusterConnectionEndpointPort": "19009", 
      "leaseDriverEndpointPort": "19010", 
      "serviceConnectionEndpointPort": "19011", 
      "httpGatewayEndpointPort": "19084", 
      "reverseProxyEndpointPort": "19085", 
      "applicationPorts": { 
       "startPort": "20575", 
       "endPort": "20605" 
      }, 
      "isPrimary": false 
     } 
    ], 
    "fabricSettings": [ 
     { 
      "name": "Setup", 
      "parameters": [ 
       { 
        "name": "FabricDataRoot", 
        "value": "C:\\ProgramData\\SF" 
       }, 
       { 
        "name": "FabricLogRoot", 
        "value": "C:\\ProgramData\\SF\\Log" 
       } 
      ] 
     } 
    ] 
} 

}

我在做什么错?我如何指定NodeTypes.Certificates值?

+0

也许你的指纹具有以THW结束多余的字符(假设你从MMC复制他们)也可以用这个模式尝试,这是一个新的一个月 - https://github.com/Azure-Samples/service-织物的dotnet-独立群集配置/斑点/主/样品/ ClusterConfig.X509.DevCluster.json – Mardoxx

回答

1
  • 我打赌你的clusterManifest.xml在NodeTypes定义中缺少Certificates属性。由于该文件是自动生成的,您是否手动更改了清单?如果是这样,您需要返回证书部分以及所有必需的证书(群集,服务器,客户端)。

  • 接下来,您应该验证您在配置中拥有的证书已正确安装,并且您有正确的指纹(不要忘记指纹开头的特殊隐藏字符)。

  • 最后,您的SF安装可能会损坏或某些东西,所以您可以重新安装所有的SF工件。