Error :
The server network address “TCP://SQL Server:5022” cannot be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational. (Microsoft SQL Server, Error: 1418)
To over come the issue follow the below steps.
Drop the Mirroring Endpoints from Principal and Secondary.
select * from sys.database_mirroring_endpoints GO DROP ENDPOINT EndpointName
Create Mirroring Endpoint Principal and Secondary.
CREATE ENDPOINT [Hadr_endpoint] STATE=STARTED AS TCP (LISTENER_PORT = 5022, LISTENER_IP = ALL) FOR DATA_MIRRORING (ROLE = ALL, AUTHENTICATION = WINDOWS NEGOTIATE , ENCRYPTION = REQUIRED ALGORITHM AES) GO
GRANT Connect Permission no Endpoint to SQL Server Service Account
GO GRANT CONNECT on ENDPOINT::Hadr_endpoint TO [Domain\AccountName]; GO