SQL Server 2019 – Availability Replica Disconnected in Always On Availability Group

availability-groupssql server

all.
(I have read through all the other topics related to this one, and I cannot find anything to is similar to this issue, unless there is one hidden that I have missed.)

OK.

SQL Server Always On High Availability

When going through the Wizard, it completes successfully, all the databases in the joined nodes are all set as Name (Restoring…)

Here is a picture of what the SSMS tree looks like for the Primary and Secondary Servers Group listings.
[enter image description here

When connecting to the Windows Core through [b]Computer Mansagement[/b]
To access the SQL Server Configuration Manager (SQL 2019).
SQL Server Services is BLANK.
enter image description here
As you can see, this is like this when connecting to ALL Windows Core with SQL Server instances installed.
So, I cannot access this part of SQL Server Services, to administer it on any on the VM's

Wanted to also show the DASHBOARD for SQLCore-01
Which, as you can see, shows all the other SQLCore-02 – SQLCore-05 as bad.
enter image description here

I have checked all the ports that are set for SQL Server and the group, and they are there are reachable.
I am at a complete loss. I have tried and searched and tried some more, but cannot find anything to resolve this issue. I need this working by the end of the weekend, or I am going to have to go back to using the SQL Cluster again, which is what I want to stay away from. I like this method better, as it had multiple SQL Servers with databases on each server—more failover than the SQL Cluster.

Ports (5022) are open on all machines
Error in SQL Log is:

Database Mirroring login attempt by user "Domain\sqlengine" failed with error:
Connection handshake failed. The login domain\sqlengine does not have
CONNECT permission on the endpoint. State 84.'.

The user domain\sqlengine
I ran this command on each instance

GRANT CONNECT ON ENDPOINT::hadr_endpoint TO [domain\sqlengine]

The output is: Commands completed successfully.
But it still shows that same error in the logs.

I read this blog post SQL Authority .com
However, I cannot access through Computer Management, the
SQL Server Services for SQL 2019, for whatever reason.
See Image.
Computer Management - SQL Server Services is BLANK for SQL 2019

Another note.
Going by this article here. Always On Replica Disconnected After Changing SQL Server Service Account

The user is domain.local\sqlengine
This user I added to the SQL Server Logins for each SQL Server.
This is the account that is used for logging all actions of which AG will be doing but still have the same error message.

I found this page. Availability replica is in disconnected
I used the script provided on the article and ran
I then restarted SQL Server on each Instance.

Restart-Service -Force 'MSSQL$SQL2019'

But to no avail. Still disconnected.

I also found this as well.
How to change SQL Server Service Account using PS
I tried running the script.
But I get an error.

You cannot call a method on a null-valued expression.
At D:\Files\SQL.ps1:23 char:1
$ChangeService.SetServiceAccount($Uname, $PWord)
Which is point at this section.

$UName="domain\sqlengine"
$PWord="**********"
$ChangeService.SetServiceAccount($UName, $PWord)

I was going to try and change the password, as maybe the password might have gotten corrupted or something. But, with this error, I am at a standstill.

Wayne

Best Answer

I just figured it out.

(You have to have the [Domain\sqlengine] added to the Logins for SSMS.)

In Management Studio
Click [Logins]

Perform the following (2) actions

Action #1
Double Click [Domain\sqlengine] Click on [Server Roles] (I have the following checked, I actually had them all checked for testing, and now these are the ones that are needed.)
dbcreator
public (default cannot uncheck this)
serveradmin
sysadmin

(This is what did the trick, this is what I was missing.)

Action #2
Click on [User Mapping]
Put a check on [Master]

Click [OK]
Then Re-run the Always On Wizard

This is all it took.
For the last few days. I have been banging my head against the wall to get this working.
And it was right here all along.

Hope this will help someone out.

Wayne