Remote session disconnected because there are no remote desktop license servers

Remote session disconnected because there are no remote desktop license servers
Are you facing he error message 'remote session disconnected because there are no remote desktop license servers'?

This guide will help you.

Basically, Remote session disconnected because there are no remote desktop license servers issue applies to deployments that include an RDSH server and a Remote Desktop Licensing server.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve Windows related errors.

In this context, we shall look into causes for this error and ways to fix it.

Main causes the error 'remote session disconnected because there are no remote desktop license servers':

This licensing error when connecting RDP clients to an RDS host may appear if;

1. On the Remote Desktop Services settings, the RDS licensing server from which we want to get client licenses (RDS CALs) is not specified.

2. The RDS licensing server has run out of available CALs.

3. The RDP client tries to connect with an expired temporary RDS license.

How to fix resolve the error 'remote session disconnected because there are no remote desktop license servers' ?

Now let's take a look at the different common issues related to RDS licensing when RDP clients cannot connect to Windows Server with the Remote Desktop Services Host role installed. 

1. Remote session was disconnected because there are no Remote Desktop client access licenses available for this computer

Recently, one of our customers was getting RDS CALs from the license server. 

i. First, we connect to the RDSH server in administrative mode (mstsc.exe /admin) and run the RD Licensing Diagnoser tools. 

ii. Here, we see the name of the RDS licensing server, and the type of license (Per User/Per Device).

iii. Next, we connect to the RDS license server using the RD Licensing Manager console (licmgr.exe). 

iv. Then we check if we have available free licenses of the required type (Per User or Per Device). 

In case, if we run out of free RDS CALs, we may need to purchase a new CAL pack, we 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).

v. In this case, the client computer is trying to connect to the RDSH server with an expired temporary RDP license (if the RDS license server was unavailable when the client first connected, the client was issued a temporary RDP license for 180 days). 

vi. So, we need to reset this license in the registry on the client device.

To reset the license, follow the below steps:

a. First, we start the Registry Editor (regedit.exe);

b. Next, we remove the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing;

c. Then we close the registry editor and run the mstsc.exe (Remote Desktop Connection) as an administrator;

d. Finally, we connect to the RDS server. In this case, the MSLicensing reg key will be automatically re-created, and the computer will receive a new RDP license.

2. The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license

One of our customers has encountered a problem with the deployed farm of RDS servers on Windows Server 2012 R2. 

The RDS server had stopped issuing terminal licenses to users. 

However, the installation and configuration of the license server role were made, and RDP CALs had been activated.

i. In order to resolve this, we first, connect to the server console in administrative mode (mstsc /admin).

ii. Next, we open the Server Manager, and go to the RDS settings (Remote Desktop Services >> Deployment Overview >> Tasks >> Edit Deployment Properties).

iii. Also, we make sure that the correct Remote Desktop license server and RDS CAL type (Per Device or Per User) are specified in the RDSH configuration.

iv. We can also check the RDS licensing server settings via PowerShell:


v. Then we check if the below ports are not blocked by firewalls when accessing from the 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.

How to Reset 120 Days RDS Grace Period (L$RTMTIMEBOMB) ?

In the Event Viewer on the RDS host, we can see 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 the grace period for the RDSH server has expired. So we need to extend the grace mode or activate the host on an RDS license server.

We can find the number of days before the end of the RDS Grace Period from the elevated command prompt:

wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !="") CALL GetGracePeriodDays

In order to extend the grace period in RDS, we need to remove the registry parameter on the server. It determines the grace period licensing time. The date that determines the RDS grace period for the server is present in the reg_binary registry parameter L$RTMTIMEBOMB located in the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod

Now, we need to remove the 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, we open the parent key permissions and grant the account the privileges of the key owner. Then we set the Full Control permissions for the Administrators group.

Next, we right-click L$RTMTIMEBOMB parameter and delete it.

After that, we restart the RDSH server and connect to it using the RDP client. Also, we make sure that the RDS CAL has been issued successfully using the Remote Desktop Licensing Manager.

Then using this PowerShell command, we make sure if the RDS licensing server is set:

$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting

If the RDS licensing server is not set (SpecifiedLSList is empty), we force to set the RD licensing server with the following command:

$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting

The RDS host will now be able to obtain licenses from the RDS Licensing server and issue them to the RDP users.

[Need urgent assistance in fixing Windows errors? – We are here to help you. ]

Who We Are ?

Most prominent, efficient, and well-performing IT companies and software solutions.

Related Posts