When configuring always on in an a few environments I have come across a this error a few time:
Checking whether the endpoint is encrypted using a compatible algorithm:
The configuration of endpoint data encryption is incompatible between replicas and the endpoint connection will fail. The current configuration is listed below with following order: the name of replica, role of replica, encryption and algorithm
This isn’t as big of an issue as it looks like. The portion in red above is the part you need to pay attention to. The error is stating that the server you are trying to add to the availability group has default Mirroring endpoint that is using a different encryption then the type that the servers in the availability group are using. A simple fix is to modify the new server’s endpoint encryption to match the existing replicas setup. In this case the first two servers were using AES and the new server is using RC4. Here are the steps:
- In SSMS expand Server Objects, then Endpoints, then Database Mirroring.
- There should be an endpoint named Mirroring here, right click on this endpoint and Script Endpoint as->Create to->New Query Editor Window:
- Modify the script from Create to Alter and modify the Required Algorithm to match the existing replicas:
123456789USE [master]GOALTER ENDPOINT [Mirroring]STATE=STARTEDAS TCP (LISTENER_PORT = 5022, LISTENER_IP = ALL)FOR DATA_MIRRORING (ROLE = PARTNER, AUTHENTICATION = WINDOWS NEGOTIATE, ENCRYPTION = REQUIRED ALGORITHM AES)GO