Windows Server 2012 No Remote Desktop License Server can provide a license, and the remote session is disconnected

Windows Server 2012 No Remote Desktop License Server can provide a license, and the remote session is disconnected

Today, when I logged into the company's internal server, I was unable to access it remotely.

An error message pops up: No Remote Desktop license server can provide a license, and the remote session is disconnected

After searching online, I found out that Server 2012 remote login only provides a 120-day usage period.

1. Refer to the following article

Fundamental solution: The remote session was disconnected because no Remote Desktop licensing server could provide a license. This blog post contains pictures (2015-11-19 21:52:48) Repost ▼
Tags: server2012 Remote Desktop License Server License Remote Session Disconnected
When logging in to the Windows server 2012 server via remote desktop, an error message appears: "The remote session was interrupted because no remote desktop licensing server can provide a license. Please contact the server administrator." At this time, you can use "mstsc /admin /v:target ip" to force login to the server, but only as an administrator.
Fundamental solution: The remote session was disconnected because no Remote Desktop licensing server could provide a license.
According to a method mentioned on the Internet, delete the following registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing.
It does not solve the problem. A new error message appears, as shown in the second picture: "The remote session was disconnected because access was denied and the creation of the license store failed. Please run the Remote Desktop client with elevated permissions."
Fundamental solution: The remote session was disconnected because no Remote Desktop licensing server could provide a license.
Microsoft's official explanation is (from this link http://blog.163.com/smile_big/blog/static/35710579201311982024/):
Microsoft's official explanation:

reason:

This issue occurs because the Windows Store app does not have sufficient permissions to access the MSLicensing registry key or subkey store. Therefore, when the application connects to the remote server, the Remote Desktop ActiveX Interface in-process COM object cannot access the registry and stops the connection process.

Solution:

WARNING: Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require you to reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

Baidu basically couldn't find a feasible solution, so Google got the final solution:
The solution was to delete the REG_BINARY in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
Only leaving the default.
And reboot.
Source: http://anilgprabhu.blogspot.com/2014/05/reset-trial-terminal-license-on-windows.html

The root cause is that the default maximum number of remote login links for server 2012 or server 2008 is 2. If the number exceeds this, a license server must be used for authorization. This authorization is said to be charged, but the official has given a 120-day grace period to configure the license server. If there is still no available license server after 120 days, the first error will occur. The Grace period information is recorded in the registry mentioned above, so just delete the item in the registry (you need to change the permission owner of this registry item to Administrators and add modification permissions to Administrators) and restart the server. Some people also mentioned that you can modify the system time to the future, then delete the registry, and then change the system time back, so that you can get a longer Grace period. This method is applicable to server 2012 and should also be applicable to 2008, but it has not been tested on 2003.
Refer to the explanation in Microsoft's official documentation and it will be clear at a glance:
https://technet.microsoft.com/en-us/library/cc725933.aspx
Of course, in addition to the opportunistic method of modifying the registry, you can also deploy a license server (server 2008) or deploy a license server and remote desktop gateway (server2012). 2012 has relatively large changes compared to 2008, and it is more difficult to configure. Those who are interested can refer to the following link:
http://www.wackytechtips.com/installing-and-configuring-remote-desktop-services-rds-on-windows-server-2012/3/

2. When deleting the GracePeriod item, an error message was displayed. This error may be caused by a permission issue.

So perform the following steps:

1. Run gpedit.msc

2.

3.

4.

5.

6. Delete the binary item under GracePeriod and restart the machine

The following are the additions from other netizens

Step 1: regedit, the system exports the registry first. In case of errors, you can restore the registry.

Step 2: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TerminalServer\RCM\GracePeriod

Delete the above registry entry.

If "Deletion not allowed" appears, it means that the user does not have permission for this item yet. You can grant permission first.

Then, delete the specified registry key. Restart the computer, ok.

The root cause is that the default maximum number of remote login links for server 2012 or server 2008 is 2. If the number exceeds this, a license server must be used for authorization. This authorization is said to be charged, but the official has given a 120-day grace period to configure the license server. If there is still no available license server after 120 days, the first error will occur. The Grace period information is recorded in the registry above, so just delete the key in the registry (you need to modify the permission owner of this registry key to Administrators, and add modification permissions to Administrators), and restart the server.

You may also be interested in:
  • Detailed explanation of how to install and configure DNS server in Windows Server 2012
  • Windows Server 2012 Server Optimization Graphical Method
  • WINDOWS server 2008 r2, win2012 r2 server security hardening practice
  • Windows Server 2012 DHCP Server Installation Diagram
  • Detailed steps to build a file server in Windows Server 2012

<<:  JavaScript Objects (details)

>>:  MySQL cursor principle and usage example analysis

Recommend

A brief discussion on the role of Vue3 defineComponent

Table of contents defineComponent overload functi...

Linux file system operation implementation

This reading note mainly records the operations r...

What to do if you forget the initial password of MySQL on MAC

The solution to forgetting the initial password o...

HTML5+CSS3 header creation example and update

Last time, we came up with two header layouts, on...

Detailed explanation of MySQL transaction processing usage and example code

MySQL transaction support is not bound to the MyS...

MySQL high concurrency method to generate unique order number

Preface After this blog post was published, some ...

Modify the maximum number of mysql connections and configuration files in docker

1. Find the mysql image docker ps 2. Enter the mi...

Implementation code of Nginx anti-hotlink and optimization in Linux

Hide version number The version number is not hid...

Deploy grafana+prometheus configuration using docker

docker-compose-monitor.yml version: '2' n...

How to set up vscode remote connection to server docker container

Table of contents Pull the image Run the image (g...

How to install and configure GitLab on Ubuntu 20.04

introduce GitLab CE or Community Edition is an op...

How to use Nginx proxy to surf the Internet

I usually use nginx as a reverse proxy for tomcat...

Html+CSS floating advertisement strip implementation

1.html part Copy code The code is as follows: <...

Detailed explanation of the function and usage of keepAlive component in Vue

Preface During the interview, many interviewers m...

You really need to understand the use of CSS variables var()

When a web project gets bigger and bigger, its CS...