In this article, we’ll look at several common issues related to RDS licensing, when RDP clients cannot connect to Windows Server with the Remote Desktop Services Host role installed.
Licensing errors when connecting RDP clients to an RDS host may appear if:
- The RDS licensing server from which you want to get client licenses (RDS CALs) is not specified on the Remote Desktop Services settings;
- The RDS licensing server has run out of available CALs;
- The RDP client tries to connect with an expired temporary RDS license;
Remote session was disconnected because there are no Remote Desktop client access licenses available for this computer
First, let’s look at an error related to clients getting RDS CALs from the license server.
Remote session was disconnected because there are no Remote Desktop client access licenses available for this computer. Please contact the server administrator.
Connect to the RDSH server in administrative mode (mstsc.exe /admin
) and run the RD Licensing Diagnoser tools. If you have everything configured correctly, you should see the name of the RDS licensing server, and the type of license (Per User/Per Device).
Connect to the RDS license server using the RD Licensing Manager console (licmgr.exe
) and check that you have available free licenses of the required type (Per User or Per Device). If you run out of free RDS CALs, you need to purchase a new CAL pack, wait for someone to release the license, or revoke unused licenses directly from the console (right click on the computer/user and select Revoke License).
In this example, you can see that there are free RDS CALs, and they are issued to users (Issued = 44).
Most likely, in this case the client computer is trying to connect to your RDSH server with an expired temporary RDP license (if your RDS license server was unavailable when the client first connected, the client was issued a temporary RDP license for 180 days). In this case, you need to reset this expired license in the registry on the client device.
Do the following on the client computer (Windows 10 in this example):
- Start the Registry Editor (
regedit.exe
); - Remove the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing;
- Close the registry editor and run the
mstsc.exe
(Remote Desktop Connection) as as administrator; - Connect to your RDS server. In this case, the MSLicensing reg key will be automatically re-created, and the computer will receive a new RDP license.
The remote computer disconnected the session because of an error in the licensing protocol. Please try connecting to the remote computer again or contact your server administrator.
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license
One of the customer has encountered a problem with the deployed farm of RDS servers on Windows Server 2012 R2. For some reason, the RDS server has stopped issuing terminal licenses to users, though the license server role had been installed and configured, and RDP CALs had been activated.
When a user tries to connect to the terminal server via RDP, the following error appears:
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license. Please contact the server administrator.
Connect to the server console in administrative mode (mstsc /admin
). Open the Server Manager, and go to the RDS settings (Remote Desktop Services -> Deployment Overview -> Tasks -> Edit Deployment Properties). Make sure that the correct Remote Desktop license server and RDS CAL type (Per Device or Per User) are specified in the RDSH configuration.
You can also check the RDS licensing server settings via PowerShell:
Get-RDLicenseConfiguration
As you can see, LicenseServer is specified in the configuration, and the PerUser licensing type is used.
Check that the following ports are not blocked by firewalls when accessing from RDSH host to RDS LicenseingServer: TCP 135, UDP 137, UDP 138, TCP 139, TCP 445, TCP 49152–65535 (RPC range)
. If the RDS License server is not available, the License Diagnoser will display an error:
License server rdslic_hostname 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.
Reset 120 Days RDS Grace Period (L$RTMTIMEBOMB)
Take a close look at the events in the Event Viewer on the RDS host. Perhaps there is an error like this:
EventID: 1128 Source: TerminalServices-RemoteConnectionManagerThe RD Licensing grace period has expired and the service has not registered with a license server with installed licenses. A RD Licensing server is required for continuous operation. A Remote Desktop Session Host server can operate without a license server for 120 days after initial start up.
The RD License Diagnoser will most likely also display an error:
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.
This means that your grace period for the RDSH server has expired, and you need to extend the grace mode, or activate the host on a RDS license server.
Licensing mode for the Remote Desktop Session Host is not configured. Remote Desktop Service will stop working in 86 days.
The number of days before the end of the RDS Grace Period can be found from the elevated command prompt:
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !="") CALL GetGracePeriodDays
Note that DaysLeft = 0
. This means that the Grace Period has expired on this RDSH host.
To extend the grace period in RDS, you need to remove the registry parameter on the server, which determines the grace period licensing time. The date that determines the RDS grace period for the server is stored in the reg_binary registry parameter L$RTMTIMEBOMB (quite a funny name –TIME BOMB….) located in the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
You have to remove the L$RTMTIMEBOMB parameter from the registry. However, the administrator does not have enough permissions to do this.
Unable to delete all specified values.
To remove this registry parameter, you need to open the parent key permissions and grant your account the privileges of the key owner. Then set the Full Control permissions for Administrators group (I won’t describe the process in detail).
Now, right-click L$RTMTIMEBOMB parameter and delete it.
Restart your RDSH server, and connect to it using RDP client. Make sure that the RDS CAL has been issued successfully using the Remote Desktop Licensing Manager.
If the RDS CAL is not received, check if there is an event in the Event Viewer:
Event ID: 1130 Source: TerminalServices-RemoteConnectionManager The Remote Desktop Session Host server does not have a Remote Desktop license server specified. To specify a license server for the Remote Desktop Session Host server, use the Remote Desktop Session Host Configuration tool.
Using this PowerShell command, make sure if the RDS licensing server is set:
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.GetSpecifiedLicenseServerList()
As you can see, the RDS licensing server is not set (SpecifiedLSList is empty). Force set the RD licensing server with the following command:
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.SetSpecifiedLicenseServerList("lon-rdslic.woshub.com")
- Use the specified Remote Desktop license servers
- Set the Remote licensing mode
The RDS host will now be able to obtain licenses from the RDS Licensing server and issue them to your RDP users.
13 comments
Hi, Great run through.
I had this issue and this worked for me, however I am in the process of moving to a new licensing server and although this works when initially defining a licensing server when I try and update the
SetSpecifiedLicenseServerList parameter with the new server details
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.SetSpecifiedLicenseServerList("My-New-Server.Name ")
I get the following error. Do you need to run a different command to update?
Exception calling "SetSpecifiedLicenseServerList" : "Invalid operation "
At line:1 char:1
+ $obj.SetSpecifiedLicenseServerList("My-New-Server.Name")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WMIMethodException
Any help would be appreciated.
Tony
Hi,
Are you running this command in elevated mode on the server with RDSH role?
I tried the allow full permissions of grace period that is detailed above but got access denied. I went into same security > advanced option for grace period, changed owner to admin account and then was able to delete the timebomb entry, rebooted and now have 120 days to figure out why the license won’t load (but that’s another story).
Great detail that helped me out.
THANK-YOU! This worked for me also.
Where did you set the license server?
On the RDS Server for shure.
…but did you also set it on the license server itself?
I´m asking beacause my RDS Server has the license Server set but nevertheless is in grace period. Also after i deleted the timebomb;) key and rebooted.
$obj = gwmi -namespace “Root/CIMV2/TerminalServices” Win32_TerminalServiceSetting
$obj.SetSpecifiedLicenseServerList(“lon-rdslic.woshub.com”)
Extremely helpful! Thank you very much for this detailed explanation of this issue and the resolution. Helped me with a W2012R2 server that had this sudden issue out of the blue.
I am locked out of the server by this
As it is a remote vps I can’t get in to licence it at all
What do I do
Try to connect Windows VPS console using the “Mstsc.exe /Console” switch.
If i run the powershell or CMD command (elavated) then I get daysleft = 0.
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !=””) CALL GetGracePeriodDays
If i run above CMD command then I get daysleft = 0.
I would ike to fix the problem, as i dont to come in one day, to find that the expiry starts to ‘work’ and my users cant open their apps.please help
I followed through everything and it worked for me, thank you very much for this , i realized some viewers didn’t finished the last part
Thank you once more
Hi followed closely, but my error is a bit different : “Broker Service is unable to validate informations in RDP file” or something like that
any suggestions…
all my licences where purchased long time ago, but mos likely badly installed at first.
can the time bomb can provoque this error, cause iniitially the message was no server to deliver license is available
Thanks
This worked! Removed the grace period reg key and reboot now License manager is showing clients using my CALS.