I have an Availability Group on server1 and (unreadable) server2 with AG listener sqllistener, and an SQL instance sqlinstance on port 1433. The SQL Server Browser service is running.
I have 2 identically configured clients in another subnet, client1 and client2.
On client1 I can connect to the SQL instance using:
Invoke-Sqlcmd -ServerInstance "sqllistener\sqlinstance" -Query "SELECT name FROM master.sys.databases"
On client2 the exact same command fails with error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
On client2 I can connect using:
Invoke-Sqlcmd -ServerInstance "sqllistener" -Query "SELECT name FROM master.sys.databases"
The same behaviour occurs when trying to connect in SSMS, using the same strings.
There are firewall rules allowing tcp:1433 and udp:1434 traffic from both clients. Firewall logging is on, no packets are dropped.
How can I get client2 to connect using the full sqllistener\sqlinstance connection string?