Skip to main content
Delphix

Resolving "Failed to get the fully qualified domain name for Availability Group Listener(s)" when Discovering and Refreshing Availability Group (AG) Windows Cluster Environments (KBA10801)

 

 

KBA

KBA#
10801

 

Issue

Availability Group (AG) Windows Cluster source environment discoveries and refreshes can fail during the SQL Server instance and database discovery phase and display the following error.  The job will complete, but for the AG associated to the listener, no databases are discovered as the workflow stops at the point of the error for the specific AG.

The warning message appears with the job actions in the GUI:

Discover information and objects for environment "ordo-ag-cluster".
Error

Failed to get the fully qualified domain name for Availability Group Listener(s) "[ordo-agl]" in SQL Server Availability Group "ordo-ag" using proxy host "10-99-99-99.domain.com".

Prerequisites

  • Windows Source Cluster discovery or refresh

Applicable Delphix Versions

Click here to view the versions of the Delphix engine to which this article applies
Date Release
Jan 25, 2024 19.0.0.0
Dec 20, 2023 | Jan 10, 2024 18.0.0.0 | 18.0.0.1
Nov 21, 2023 17.0.0.0
Oct 18, 2023 16.0.0.0
Sep 21, 2023 15.0.0.0
Aug 24, 2023 14.0.0.0
Jul 24, 2023 13.0.0.0
Jun 21, 2023 12.0.0.0
May 25, 2023 11.0.0.0
Apr 13, 2023 10.0.0.0 | 10.0.0.1
Mar 13, 2023 | Mar 20, 2023 9.0.0.0 | 9.0.0.1
Feb 13, 2023 8.0.0.0
Jan 12, 2023 7.0.0.0
Releases Prior to 2023
Major Release All Sub Releases
6.0

6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0, 6.0.10.0, 6.0.10.1, 6.0.11.0, 6.0.12.0, 6.0.12.1, 6.0.13.0, 6.0.13.1, 6.0.14.0, 6.0.15.0, 6.0.16.0, 6.0.17.0, 6.0.17.1, 6.0.17.2

5.3

5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0, 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0

5.2

5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1

5.1

5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0

5.0

5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1, 5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4

Root Cause

A common reason this occurs is the use of a Windows hosts file on the AG Cluster environment's connector/proxy host for the purpose of host name resolution.

If a non-FQDN (Fully Qualified Domain Name) for the AG listener exists in the Windows hosts file, located in the C:\Windows\System32\drivers\etc directory (assuming Windows is installed on volume C:), the name will be used to resolve the hostname to IP Address:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#    127.0.0.1       localhost
#    ::1             localhost
10.99.99.99    ordo-agl.domain.com

10.99.99.99    ordo-agl

  • Even if the FQDN appears above the non-FQDN (ordo-agl.domain.com versus ordo-agl), the non-FQDN overrides the FQDN.
  • In Delphix code, the AG listener, which is required for discovery, is returned from a SQL call as non-FQDN.
  • Delphix calls GetHostEntry(non-FQDN).hostname in Powershell to determine the FQDN.
  • When the call returns a Non-FQDN, the warning occurs and no AG or databases in that clustered instance are retrieved.

Resolution

  • Resolve this by commenting out or removing the non-FQDN from the hosts file.
    • Do this as a Windows Administrator or equivalent user.
  • Alternatively, do not put the listener address in the proxy's local hosts file and configure it on the DNS server as a FQDN.

Troubleshooting

You can use the simple commands to test the host entry on the system from the proxy/connector host.

The following two tests are provided, along with instructions. Replace AG_Name with your own and follow the steps:

Test 1

Login to the AG cluster from SQL Server Mgmt Studio (SSMS) as the Delphix source user that runs the discovery.

  • For example, the source environment user is src_user@domain.com.
  • After logging in, replace AG_Name with the name of your Availability Group, and then run this query:
 SET nocount on; Use master;SELECT t1.ip_configuration_string_from_cluster, t1.dns_name, t1.port 
      FROM sys.availability_group_listeners AS t1, sys.availability_groups AS t2 
      WHERE t1.group_id = t2.group_id AND t2.name = N'AG_Name'
  • As an example, using the AG name of ordo-ag returns:
ip_configuration_string_from_cluster	dns_name	port
('IP Address: 10.99.99.99')	ordo-agl	1433
  • In this case, the AG listener is ordo-agl.
  • Use name ordo-agl for Test 2.
  • The result of Test 2 should return as ordo-agl.domain.com.
    This is a fictional account, and the FQDN should be well known beforehand when testing and expected as a result from these tests.

Test 2 

The following test answers whether the listener name is fully qualified.

  1. Login to proxy/staging host as the proxy/staging host environment user.
  2. Run the following command from the powershell console as an Administrator using the resulting AG listener name from Test 1:
[system.net.dns]::GetHostEntry('ordo-agl').hostname
  1. The following result will cause the warning:
PS C:\Windows\system32\drivers\etc> [system.net.dns]::GetHostEntry('ordo-agl').hostname
ordo-agl
  • Inspect the Windows hosts file and correct it if this is the cause.
  • If there are no entries in the hosts file discuss this issue with your DNS administrator.
  1. Once corrected, the following result is returned, and the AG cluster environment discovery/refresh will pass this portion of the workflow, continuing with the database discovery.
PS C:\Windows\system32\drivers\etc> [system.net.dns]::GetHostEntry('ordo-agl').hostname
ordo-agl.qa-ad.delphix.com

 

 

 


Related Articles

The following articles may provide more information or related information to this article:

  • N/A