You are troubleshooting an Always On Availability Group named AG1. The exhibit shows the current state. The primary replica shows PENDING_FAILOVER. The secondary replica is DISCONNECTED with error 35202. What is the most likely cause of this issue?
Exhibit
Refer to the exhibit.
```
-- Current state of the availability group
SELECT ag.name AS ag_name,
replica_server_name,
role_desc,
operational_state_desc,
connected_state_desc,
synchronization_health_desc,
last_connect_error_number,
last_connect_error_time
FROM sys.dm_hadr_availability_replica_states rs
JOIN sys.availability_groups ag ON rs.group_id = ag.group_id
WHERE ag.name = 'AG1';
```
Output:
ag_name | replica_server_name | role_desc | operational_state_desc | connected_state_desc | synchronization_health_desc | last_connect_error_number | last_connect_error_time
AG1 | SQLVM-Primary | PRIMARY | PENDING_FAILOVER | CONNECTED | HEALTHY | 0 | NULL
AG1 | SQLVM-Secondary | SECONDARY | ONLINE | DISCONNECTED | NOT_HEALTHY | 35202 | 2024-03-15 10:30:00.000Trap 1: The availability group listener is not configured correctly
Listener issues do not cause replica disconnection.
Trap 2: The primary instance encountered a critical error and failed over…
PENDING_FAILOVER indicates a manual or forced failover, not automatic.
Trap 3: The cluster has lost quorum
Quorum loss would show different symptoms; both replicas would be affected.
- A
Network connectivity between the replicas is blocked on port 5022
Error 35202 often relates to connectivity issues on the mirroring endpoint port.
- B
The availability group listener is not configured correctly
Why wrong: Listener issues do not cause replica disconnection.
- C
The primary instance encountered a critical error and failed over automatically
Why wrong: PENDING_FAILOVER indicates a manual or forced failover, not automatic.
- D
The cluster has lost quorum
Why wrong: Quorum loss would show different symptoms; both replicas would be affected.