This is a similar setup to another question asked here: SQL 2016 replication within Availability Groups, but the problem is different (hence the new question....)
Setup: Two node Windows cluster (MYSQL01, MYSQL02), each node running SQL Server 2016 SP2 CU12 Enterprise, with a default instance and a named instance (REPL01, REPL02).
I have an AG across the default instances containing published databases. The listener is defined as PUBLISTENER on port 1433.
I have another AG across the named instances, containing the distribution database (Transactional Replication). The listener is defined as DISTLISTENER_01\REPL01,1435.
Both AGs failover correctly, and appear to be working as planned.
However, when I create a publication, with a subscriber, the Log Reader fails with the following message:
Connecting to Distributor 'DISTLISTENER_01' Agent message code 14114. The server 'MYSQL01' is not configured as a Distributor.
If I failover the distributor, the Log Reader (on Node 2 now) fails with
Connecting to Distributor 'DISTLISTENER_01' Agent message code 14114. The server 'MYSQL02' is not configured as a Distributor.
Any ideas why the distributor is being misdirected to the default instance, rather than the named instance?