在高可用性中与侦听器服务器连接时出现问题

时间:2019-04-09 15:58:43

标签: sql-server high-availability

最近我设置了AG,服务器X是主要服务器,服务器Y是次要服务器,Z是侦听器服务器。 Ag运行正常。如果我对主服务器进行RDP,则可以连接到侦听器,但不能通过辅助服务器和本地SSMS连接,我根本无法连接到侦听器。 我们有Azure环境,我设置了负载均衡器,前端ip和运行状况探针。

我检查所有配置是否正确。没有防火墙问题。 与其他听众相比。 有人可以帮我,我所缺少的..

1 个答案:

答案 0 :(得分:0)

我找到了解决方案。DNS无法与侦听器服务器通信。因此,需要运行此powershell脚本并且它起作用了。我附加了链接以供参考。

$ClusterNetworkName = "<MyClusterNetworkName>" # the cluster network name (Use Get-ClusterNetwork on Windows Server 2012 of higher to find the name)
$IPResourceName = "<IPResourceName>" # the IP Address resource name
$ListenerILBIP = "<n.n.n.n>" # the IP Address of the Internal Load Balancer (ILB). This is the static IP address for the load balancer you configured in the Azure portal.
[int]$ListenerProbePort = <nnnnn>

Import-Module FailoverClusters

Get-ClusterResource $IPResourceName | Set-ClusterParameter -Multiple @{"Address"="$ListenerILBIP";"ProbePort"=$ListenerProbePort;"SubnetMask"="255.255.255.255";"Network"="$ClusterNetworkName";"EnableDhcp"=0}

enter link description here