Fout (De opgegeven sleutel was niet aanwezig in de woordenlijst) en SQL Server FCI-installatie mislukt op een Azure VM in Server 2019
In dit artikel kunt u het probleem oplossen dat optreedt wanneer u een Microsoft SQL Server Failover Clustered Instance (FCI) in Windows Server 2019 op een virtuele Microsoft Azure-computer (VM) probeert te installeren.
Van toepassing op: SQL Server in VM - Windows, Windows Server 2019
Oorspronkelijk KB-getal: 4525647
Symptomen
Wanneer u een Microsoft SQL Server Failover Clustered Instance (FCI) in Windows Server 2019 op een virtuele Microsoft Azure-computer (VM) probeert te installeren, mislukt de installatie en ontvangt u het volgende foutbericht:
De opgegeven sleutel was niet aanwezig in de woordenlijst.
In deze situatie ziet u de volgende aanvullende informatie in het Details.txt logbestand in de SQL Server installatiemap:
Actiegegevens: Functie = SQL_Engine_Core_Inst_sql_engine_core_inst_Cpu64 Scenario = timing installeren = ConfigNonRC ConfigObjectType = Microsoft.SqlServer.Configuration.ClusterConfiguration.FailoverClusterNamePrivateConfigObject FeatureName = SQL_Engine_Core_Inst FeatureCpuType = Cpu64 FeaturePackageId = sql_engine_core_inst FeatureClusterState = CompleteFailoverCluster Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigNonRC and scenario ConfigNonRC. De opgegeven sleutel was niet aanwezig in de woordenlijst. De categorie configuratiefout van de huidige uitzondering is configuratiefailure Configuratieactie is mislukt voor functie-SQL_Engine_Core_Inst tijdens tijdsinstellingen ConfigNonRC en scenario ConfigNonRC. System.Collections.Generic.KeyNotFoundException: De opgegeven sleutel was niet aanwezig in de woordenlijst. bij System.ThrowHelper.ThrowKeyNotFoundException() bij System.Collections.Generic.Dictionary2
2.get_Item(TKey key) at Microsoft.SqlServer.Configuration.ClusterConfiguration.FailoverClusterNamePrivateConfigObject.CreateFailoverClusterNameResource(FailoverClusterNamePublicConfigObject pubConfig) at Microsoft.SqlServer.Configuration.ClusterConfiguration.FailoverClusterNamePrivateConfigObject.Install(ConfigActionTiming timing, Dictionary
actionData, PublicConfigurationBase spcb) bij Microsoft.SqlServer.Configuration.SqlConfigBase.PrivateConfigurationBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, ConfigBaseAction action, Dictionary22 actionData, PublicConfigurationBase spcbCurrent) at Microsoft.SqlServer.Configuration.SqlConfigBase.SqlFeatureConfigBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, ConfigBaseAction action, Dictionary
actionData, PublicConfigurationBase spcbCurrent) bij Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId) at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream) Het volgende is een uitzonderingsstack met de uitzonderingen in outermost to innermost order Inner exception are being indented Exception type: System.Collections.Generic.KeyNotFoundException Message: The given key was not present in the dictionary. HResult : 0x80131577 Gegevens: SQL. Setup.FailureCategory = ConfigurationFailure WatsonConfigActionData = INSTALL@CONFIGNONRC@SQL_ENGINE_CORE_INST WatsonExceptionFeatureIdsActionData = System.String[] Stack: at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary22.get_Item(TKey key) at Microsoft.SqlServer.Configuration.ClusterConfiguration.FailoverClusterNamePrivateConfigObject.CreateFailoverClusterNameResource(FailoverClusterNamePublicConfigObject pubConfig) at Microsoft.SqlServer.Configuration.ClusterConfiguration.FailoverClusterNamePrivateConfigObject.Install(ConfigActionTiming timing, Dictionary
actionData, PublicConfigurationBase spcb) bij Microsoft.SqlServer.Configuration.SqlConfigBase.PrivateConfigurationBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, ConfigBaseAction action, Dictionary2 actionData, PublicConfigurationBase spcbCurrent) at Microsoft.SqlServer.Configuration.SqlConfigBase.SqlFeatureConfigBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, ConfigBaseAction action, Dictionary
2 actionData, PublicConfigurationBase spcbCurrent) bij Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId) bij Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
Oorzaak
Een nieuwe schakelknop, ManagementPointNetworkType, die kan worden genoemd door PowerShell-cmdlets voor FailoverClusters, wordt geïntroduceerd in Windows Server 2019. U kunt de volgende opties gebruiken voor de nieuwe schakelknop.
Schakelparameter | Gebruik |
---|---|
Singleton | Gebruikt de traditionele methode van DHCP of statisch IP-adres. |
Gedistribueerd | Gebruik een gedistribueerde netwerknaam met behulp van IP-adressen van knooppunt. |
Automatisch | Hiermee wordt detectie gebruikt om de juiste instelling te bepalen. Als SQL Server wordt uitgevoerd in Azure, gebruikt u Gedistribueerd. Als SQL Server on-premises wordt uitgevoerd, gebruikt u Singleton (standaardinstelling). |
Als u het Windows maakt met behulp van Windows clusterbeheerprogramma, stelt het hulpprogramma de schakelparameter in op Automatisch. Omdat u aan een Azure VM werkt, wordt voor de schakelaar in plaats daarvan een gedistribueerde netwerknaam gebruikt.
U kunt dit controleren door de volgende PowerShell-opdracht uit te voeren:
C:\windows\system32> Get-clusterresource
De uitvoer die door deze opdracht wordt geretourneerd, lijkt op de volgende:
Name State OwnerGroup ResourceType
Cloud Witness Online Cluster Group Cloud Witness
Cluster Name Online Cluster Group Distributed Network Name
Cluster Pool 1 Online 45d8f3c2-e8df-4a01-87b8-f3c383801f3f
Storage Pool
Cluster Virtual Disk
(ClusterPerformanceHistory) Online Cluster Group Physical Disk
Health Online Cluster Group Health Service
SDDC Management Online Cluster Group SDDC Management
Storage QoS Resource Online Cluster Group Storage QoS Policy Manager
De CreateFailoverClusterNameResource(FailoverClusterNamePublicConfigObject pubConfig)
functie controleert de resourcenaam waarvan het typeNetworkName is. Dit is om te controleren of de virtuele servernaam die u hebt ingevoerd al bestaat.
Het installeren van de SQL Server FCI op een Windows cluster met alleen een gedistribueerde netwerknaam wordt echter niet ondersteund. Het foutbericht dat wordt vermeld in de sectie Symptomen geeft aan dat er geen resource beschikbaar is in Windows Server 2019 waarvan het typeNetworkName is.
Oplossing
Als u dit probleem wilt oplossen, kunt u het huidige cluster verwijderen en vervolgens opnieuw maken met een PowerShell-opdracht met de volgende parameter:
managementpointnetworktype singleton