Cannot connect to RDS because no RD Licensing servers are available
Article
This article help you troubleshoot the "No licenses available" error in a deployment that includes an Remote Desktop Session Host (RDSH) server and a Remote Desktop Licensing server.
Symptoms
Clients cannot connect to Remote Desktop Services, and they display messages that resemble the following:
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license.
Access was denied because of a security error.
Sign in to the RD Session Host as a domain administrator and open the RD License Diagnoser. Look for messages like the following:
The grace period for the Remote Desktop Session Host server has expired, but the RD Session Host server hasn't been configured with any license servers. Connections to the RD Session Host server will be denied unless a license server is configured for the RD Session Host server.
License server <computer name> is not available. This could be caused by network connectivity problems, the Remote Desktop Licensing service is stopped on the license server, or RD Licensing isn't available.
Cause
These issue could be caused by the following user messages:
The remote session was disconnected because there are no Remote Desktop client access licenses available for this computer.
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license.
If the RD License Diagnoser lists other problems, such as "The RDP protocol component X.224 detected an error in the protocol stream and has disconnected the client", there may be a problem that affects the license certificates. Such problems tend to be associated with user messages, such as the following:
Because of a security error, the client could not connect to the Terminal server. After making sure that you are signed in to the network, try connecting to the server again.
The configuration of the licenses should resemble the following screenshot. There should be a green check mark beside the license server name, and the numbers in the columns should reflect the numbers of total and available licenses.
The RDS deployment uses the correct license server, licensing mode, and policy settings. The details of the configuration depend on the type of deployment that you have:
Configure licensing for an RDS deployment that includes the RD Connection Broker role
On the RD Connection Broker computer, open Server Manager.
In Server Manager, select Remote Desktop Services > Overview > Edit Deployment Properties > RD Licensing.
Select the Remote Desktop licensing mode (either Per User or Per Device, as appropriate for your deployment).
Note
If you use domain-joined servers for your RDS deployment, you can use both Per User and Per Device CALs. If you use workgroup servers for your RDS deployment, you have to use Per Device CALs In that case, Per User CALs are not permitted.
Specify a license server, and then select Add.
Configure licensing for an RDS deployment that includes only the RD Session Host role and the RD Licensing role
On the RD Session Host computer, select Start, and then enter gpedit.msc to open Local Group Policy Editor.
Go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Licensing.
In the policy list, right-click Use the specified Remote Desktop license servers, and then select Properties.
Select Enabled, and then enter the name of the license server under License servers to use. If you have more than one license server, use commas to separate their names.
Select OK.
In the policy list, right-click Set the Remote Desktop licensing mode, and then select Properties.
Select Enabled.
Under Specify the licensing mode for the Remote Desktop Session Host server, select Per Device or Per User, as appropriate for your deployment.
Refresh the X509 Certificate registry keys
Important
Follow this section's instructions carefully. Serious problems can occur if the registry is modified incorrectly. Before you starty modifying the registry, back up the registry so you can restore it in case something goes wrong.
To resolve this problem, back up and then remove the X509 Certificate registry keys, restart the computer, and then reactivate the RD Licensing server. Follow these steps.
Note
Perform the following procedure on each of the RDSH servers.
Here's how to reactivate the RD Licensing server:
Open the Registry Editory and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM.
On the Registry menu, select Export Registry File.
Enter exported- Certificate into the File name box, then select Save.
Right-click each of the following values, select Delete, and then select Yes to verify the deletion:
Certificate
X509 Certificate
X509 Certificate ID
X509 Certificate2
Additional troubleshooting methods
If you verify that the licensing configuration is correct, but the system still isn't correctly issuing CALs, follow these steps:
Step 1: Use RD Licensing Diagnoser to check for issues
To open RD Licensing Diagnoser, open Server Manager, and select Tools > Terminal Services > RD Licensing Diagnoser.
The top window of the RD Licensing Diagnoser lists problems that the diagnoser has detected. For example, you might see a message that resembles the following:
Licenses are not available for this Remote Desktop Session Host server, and RD Licensing Diagnoser has identified licensing problems for the RD Session Host Server
The RD Licensing Diagnoser Information section shows more information about the problem, including its possible causes and the steps to follow to remediate it.
Step 2: Make sure that the versions of your RDS CALs, RD Session Hosts, and RD License Servers are compatible
The following table shows which RDS CAL and RD Session Host versions are compatible with one another.
RDS 2008 R2 and earlier CAL
RDS 2012 CAL
RDS 2016 CAL
RDS 2019 CAL
2008, 2008 R2 session host
Yes
Yes
Yes
Yes
2012 session host
No
Yes
Yes
Yes
2012 R2 session host
No
Yes
Yes
Yes
2016 session host
No
No
Yes
Yes
2019 session host
No
No
No
Yes
The following table shows which RDS CAL and license server versions are compatible with one another.
Step 3: Make sure that you're using the appropriate type of RDS CAL for your RDS environment
If you use domain-joined servers for your RDS deployment, you can use both Per User and Per Device CALs. If you use workgroup servers for your RDS deployment, you have to use Per Device CALs In that case, Per User CALs aren't permitted.