Listener Connection Issue to SQL Server Always On AG CLuster

Are you facing connectivity issues while trying to connect your application to a SQL Server Always On Availability Group (AG) using the listener details? In this blog post, we'll explore a real-world scenario where an application was unable to connect to the AG via its app connection string with listener details. We'll walk you through the issue, observations, and the steps taken to resolve it.
Error Screenhot:
*********************
- Error Screenshot of SQL instance connection
- Error Screenshot of Listener being accessible via IP Address & same is not accessible via name.
The Issue:
The application was encountering an SQLException with the error message: "The TCP/IP connection to the host <Server_FQDN>, port 1433 has failed." The error suggested verifying the connection properties, ensuring that SQL Server was running, and checking for firewall restrictions.
Observations:
The database services were online, remote connections were enabled, the database was accessible to the DBA team, and the AG was in sync. However, the DBA team couldn't connect via the listener name, even though they could access the database instance via the listener's IP address.
Clustered Event Errors:
Upon logging in to the primary node, an error was observed in the clustered event logs. The error message indicated an issue with updating the computer object associated with the cluster network name resource. The error pointed to a possible domain issue and permissions related to the cluster identity.
Steps Taken:
Engaging Server Team: The server team was involved to investigate the domain-related error in the clustered event logs. They ran DNS automatic fix tools to address the error, which resolved the issue reported in the event logs. however, DB connection via Listener still occurred.
Ping Results: To diagnose further, a screenshot of the ping results for the listener was provided, showing both the name and the IP address. This information was crucial for identifying potential DNS-related problems.
DNS Commands: The server team executed an additional Cluster DNS tool and waited for automation to fix the.DNS Record This step revealed that the DNS issues were more complex than initially thought.
Resolution: After running the DNS command via the Automatic fix tool, the issues were finally resolved. The AG listener became fully accessible via both its name and IP address.
Subscribe to my newsletter
Read articles from Pradeep Prakash directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Pradeep Prakash
Pradeep Prakash
SQL Server DBA | Powershell |TSQL | Azure