简体   繁体   English

使用PowerShell连接到azure服务结构集群

[英]Connect to azure service fabric cluster with powershell

I'm unable to connect to my azure service fabric cluster using powershell. 我无法使用PowerShell连接到我的Azure服务结构集群。

I have created a certificate "Admin" on my computer using https://support.jetglobal.com/hc/en-us/articles/235636308-How-To-Create-a-SHA-256-Self-Signed-Certificate 我使用https://support.jetglobal.com/hc/en-us/articles/235636308-How-To-Create-a-SHA-256-Self-Signed-Certificate在我的计算机上创建了一个“Admin”证书

I have imported this certificate in my Key Vault, and added an "Admin client" authentication using "Certificate Thumbprint" authentication mode in the cluster (with the thumbprint of the created certificate) 我已在密钥保管库中导入此证书,并在群集中使用“证书指纹”身份验证模式添加了“管理客户端”身份验证(使用创建的证书的指纹)

I am using the below powershell command : 我使用下面的powershell命令:

$ClusterName= "***.francecentral.cloudapp.azure.com:19000"
$ThumbPrint= "e8*****"

Connect-serviceFabricCluster -ConnectionEndpoint $ClusterName -KeepAliveIntervalInSec 10 `
    -X509Credential `
    -ServerCommonName "Admin" `
    -FindType FindBySubjectName `
    -FindValue "Admin" `
    -StoreLocation CurrentUser `
    -StoreName My 

As described in https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-connect-to-secure-cluster https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-connect-to-secure-cluster中所述

(I have also tried with -FindByThumPrint) (我也试过-FindByThumPrint)

I get FARBRIC_E_SERVER_AUTHENTICATION_FAILED: CertficateNotMatched. 我得到FARBRIC_E_SERVER_AUTHENTICATION_FAILED:CertficateNotMatched。

What did I miss ? 我错过了什么 ?

SSL certificate and SF Cluster endpoint URI must match SSL证书和SF Cluster端点URI必须匹配

There are few ways to solve this: 有几种方法可以解决这个问题:

  1. If the Cluster Certificate was issued to a custom domain (lets say mysite.mydomain.com ) you need to use that custom domain URL into $ClusterName . 如果群集证书已发布到自定义域(例如mysite.mydomain.com ),则需要将该自定义域URL用于$ClusterName Also both mysite.mydomain.com and ***.francecentral.cloudapp.azure.com must resolve to the same IP address. mysite.mydomain.com***.francecentral.cloudapp.azure.com必须解析为相同的IP地址。

  2. You can also fix it by creating new certificate and pointing it to ***.francecentral.cloudapp.azure.com . 您也可以通过创建新证书并将其指向***.francecentral.cloudapp.azure.com来修复它。 After doing this, replace it with the old one in your cluster and connect by using ***.francecentral.cloudapp.azure.com endpoint. 执行此操作后,将其替换为群集中的旧版本,并使用***.francecentral.cloudapp.azure.com端点进行连接。

  3. This is not a fix but workaround. 这不是修复,而是解决方法。 You can disable certificate name check by modifying C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe.config and setting checkCertificateName to false . 您可以通过修改C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe.config并将checkCertificateName设置为false来禁用证书名称检查。 Like this ( click here ): 像这样( 点击这里 ):

    <configuration><system.net><settings><servicePointManager checkCertificateName="false" /></settings><system.net></configuration>

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

相关问题 无法通过Powershell或Visual Studio连接到受保护的Azure Service Fabric群集 - Cannot connect to secured Azure Service Fabric Cluster via Powershell or Visual Studio 如何使用PowerShell或CLI启动本地Azure Service Fabric Cluster - How to start local Azure Service Fabric Cluster with PowerShell or CLI 无法从MAC连接到Azure Service Fabric群集 - Unable to connect to Azure Service fabric cluster from MAC 我们如何将Azure服务矩阵群集连接到本地服务/数据库? - How can we connect our Azure service fabric cluster to on-premises service/ database? 如何从 Service Fabric 群集上运行的服务连接到 Azure 存储帐户? - How to connect to an Azure Storage account from a service running on service fabric cluster? 使用New-AzureRmServiceFabricCluster与PowerShell创建服务矩阵群集时,Azure KeyVault访问策略异常 - Azure KeyVault Access Policy exception when creating service fabric cluster with PowerShell using New-AzureRmServiceFabricCluster Azure Service Fabric:无法运行本地 Service Fabric 群集 - Azure Service Fabric: cannot run local Service Fabric Cluster 无法连接到本地 Service Fabric 群集 - Unable to Connect to Local Service Fabric Cluster 发布到Azure Service Fabric群集时出错 - Error while publishing to Azure service fabric cluster Azure Service Fabric:群集的端口在哪里? - Azure Service Fabric: Where is the port for my cluster?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM