Failed to create, join or add replica to availability group in SQL Server 2014
Msg 19405, Level 16, State 17, Line 3 Failed to create, join or add
  replica to availability group 'AGName', because node 'Node3' is a
  possible owner for both replica 'Node3\ReadOnly' and
  'Primary/Primary'. If one replica is failover cluster instance, remove
  the overlapped node from its possible owners and try again.


This happens for two main reasons that I've witnessed.

Reason #1 - The resource/group is set to have ownership on the node in error

Sometimes (for a multitude of reasons) resources and resource groups in windows clustering won't always have the same ownership. The best way to diagnose this error is to first check to see what SQL Server (which calls windows clustering APIs) thinks the cluster nodes are:

SELECT * FROM sys.dm_os_cluster_nodes


Once we know what is in the cluster, check via Powershell to see what the cluster thinks the ownership is for the FCI:

Get-ClusterOwnerNode -Resource "SQLFCIInstanceName"


This will return the nodes that could own the cluster resource. Chances are it'll include the node name of a node that we know shouldn't really be there.

To fix this, run the following powershell command:

Get-ClusterResource -Name "SQLFCIInstanceName" | Set-ClusterOwnerNode -Owners NodeName1,NodeName2


Double check by running the first powershell command to check ownership, then try to add the replica to the AG again.

Reason #2 - Node Names + Language != Node Names

If the language used wasn't US_English there would be a good chance that the node names (when compared to each other) wouldn't necessarily compare properly. This would cause a whole bunch of other issues (and it does) with the cluster outside of the AG.

This can be tested by taking the node names, converting them to upper or lower and the comparing them against themselves. Sounds like it should always work... but some languages have special characters that don't do the UPPER and LOWER conversions well.