Hi JiongAN-1498,
Does your primary replica listen on the default port?
If so, the listener can use default 1433 and 12345 when the alwayson is hosted on primary node.
But if your alwayson fails over to another node, and that node is not listening on port 1433, then the AG listener connection via port 1433 will fail.
So please specify the port in the connection string in the format of listenername,port if the port is not 1433.
Best Regards,
Amelia
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.