远程桌面会话主机(Remote Desktop Session Host)( RDSH ) 是远程桌面服务(Remote Desktop Services)( RDS ) 中托管Windows应用程序或桌面的角色。这些可以使用远程桌面(Remote Desktop)连接进行访问。远程桌面服务(Remote Desktop Services)许可证服务器在用户和设备访问RD 会话主机(RD Session Host)时向他们颁发客户端访问许可证。当用户尝试连接时清除可能会面临两个问题。由于安全问题,没有可用的远程桌面许可服务器并且第二次访问被拒绝。(Remote Desktop License Servers)您看到的错误是:
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license
虽然我们正在查看缺少的远程桌面许可证服务器(Remote Desktop License Servers),但我们也分享了如果这是一个安全问题的原因需要做些什么。因此,让我们找出导致问题的原因。为此,我们必须以域管理员身份登录 RD 会话并打开RD License Diagnoser。
缺少远程桌面许可服务器的原因(Remote Desktop License Servers)
- 缺少远程桌面许可服务器的迹象:(Signs of missing Remote Desktop License Servers:) 如果记录器有消息说RDSH 的宽限期已过期(grace period of the RDSH has expired),并且服务器尚未配置任何许可服务器。它还可能会在显示许可证(License)服务器的位置发送消息不可用并指出网络连接问题;服务(network connectivity problems; service) 停止(stopped,)等。在这种情况下,您需要配置 RD 许可服务。
- Network / Certificate Issues: 如果您看到任何其他有关网络协议、断开连接的客户端以及其安全错误的问题。在这种情况下,您需要刷新X509 证书(X509 Certificate)注册表项。
远程会话已断开连接,因为没有可用于提供许可证的远程桌面许可证服务器(Remote Desktop License Servers)
根据您发现的问题,按照方法解决问题。
- 配置 RD 许可服务
- 刷新X509 证书(X509 Certificate)注册表项
- 启用与许可服务器和策略相关的组策略(Group Policy)
1]配置(Configure)RD(RD Licensing)授权服务
RD 许可(RD Licensing)服务确保每个许可证都经过验证,并且可以提供许可证。按照步骤通过服务器管理器(Server Manager)修复它。
- 打开 服务器管理器(Server Manager) 并导航到 远程桌面(Remote Desktop) 服务(Services)。
- 在 部署概览(Deployment Overview)中,选择 任务(Tasks),然后选择 编辑部署属性(Edit Deployment Properties)。
- 选择 Remote Desktop Licensing,然后为您的部署选择适当的许可模式(每设备(Per Device) 或 每用户(Per User))。
- 输入(Enter)RD 许可证(RD License)服务器的完全限定域名 ( FQDN ) ,然后选择 添加(Add)。
- 如果您有多个RD 许可证(RD License)服务器,请为每台服务器重复步骤 4。
2]刷新(Refresh)X509证书(X509 Certificate)注册表项
请(Make)务必仔细按照说明进行操作,因为我们将不得不修改注册表。因此,请务必备份注册表,以便在出现问题时可以恢复它。完成后,我们将远程 X509 证书(X509 Certificate)注册表项,重新启动计算机,然后重新激活RD 许可(RD Licensing)服务器。在每个RDSH(RDSH)服务器上执行以下步骤以重新激活RD 许可(RD Licensing)服务器:
打开注册表编辑器并导航到以下路径
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM
在注册表菜单上,选择 导出注册表文件(Export Registry File)。 在 文件名(File name)框中输入导出的证书(exported- Certificate) ,然后选择 保存(Save)。右键单击以下每个值,选择Delete,然后选择 Yes 以验证删除:
- 证书
- X509证书
- X509 证书 ID
- X509 证书2
删除后,退出注册表编辑器(Registry Editor)并重新启动RDSH服务器。服务器重新启动后,它将自动刷新密钥。
3]启用组策略
它适用于Standalone服务器。然后您需要启用两个策略设置,通过服务器上的gpedit.msc访问时,可以在以下路径中使用。
Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Licensing
- 使用指定的远程桌面(Remote Desktop)许可 server- Enabled。
- 设置(Set)远程桌面(Remote Desktop)许可模式 -已启用(Enabled)。
您可能还需要检查许可(Licensing)模式并添加您的RD 许可服务器的(RD Licensing)FQDN ,并检查您是否已创建会话集合并使您的RDSH服务器成为组的一部分。
所有这些都应该可以帮助您解决没有可用于提供许可的远程桌面许可服务器的问题。(Remote Desktop License Servers)
相关文章:(Related posts:)
- Windows 远程桌面经常断开连接
- 远程会话已断开。没有可用的远程桌面客户端访问许可证。
No Remote Desktop License Servers; Remote session disconnected
Remote Desktop Session Host (RDSH) is a role in Remote Desktop Services (RDS) that host Windows applications or desktops. These can be accessed using the Remote Desktop connection. The Remote Desktop Services license server issues client access licenses to users and devices when they access the RD Session Host. That cleared when a user tries to connect can face two issues. One where no Remote Desktop License Servers available and second access denied because of security issues. The error you see would be:
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license
While we are looking at the missing Remote Desktop License Servers, but we also share what needs to be done if the cause of this is a security issue. So let’s find out what caused the problem. To do that, we will have to sign-in to the RD session as the domain administrator and open the RD License Diagnoser.
Causes of missing Remote Desktop License Servers
- Signs of missing Remote Desktop License Servers: If the logger has messages which talk about the grace period of the RDSH has expired, and the server hasn’t been configured with any license server. It may also message where it says License server <computer name> is not available and points out to network connectivity problems; service stopped, etc. In this case, you need to configure the RD licensing service.
- Network / Certificate Issues: If you see any other issue which talks about network protocols, disconnected client, and then its security error. In this case, you need to refresh the X509 Certificate registry keys.
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license
Depending on the issue you discovered, follow the methods to resolve the problem.
- Configure the RD Licensing service
- Refresh the X509 Certificate registry keys
- Enable Group Policy related to licensing server and policy
1] Configure the RD Licensing service
RD Licensing service makes sure every license is validated, and it is available to provide a license. Follow the steps to fix it through the Server Manager.
- Open Server Manager and navigate to Remote Desktop Services.
- On Deployment Overview, select Tasks, and then select Edit Deployment Properties.
- Select Remote Desktop Licensing, then select the appropriate licensing mode for your deployment (Per Device or Per User).
- Enter the fully qualified domain name (FQDN) of your RD License server, and then select Add.
- If you have more than one RD License server, repeat step 4 for each server.
2] Refresh the X509 Certificate registry keys
Make sure to follow the instructions carefully as we will have to modify the registry. So make sure you back up the registry so you can restore it in case something goes wrong. Once done, we will have remote the X509 Certificate registry keys, restart the computer, and then reactivate the RD Licensing server. Follow these steps on each of the RDSH servers to reactivate the RD Licensing server:
Open the Registry Editor and navigate to the following path
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
Once deleted, exit the Registry Editor and restart the RDSH server. Once the server reboots, it will refresh the keys automatically.
3] Enable Group Policy
It is applicable for the Standalone servers., then you need to enable two policy settings, which is available at the following path when accessed through gpedit.msc on the server.
Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Licensing
- Use the specified Remote Desktop license server- Enabled.
- Set the Remote Desktop licensing mode- Enabled.
You may also want to check if the Licensing mode and add the FQDN of your RD Licensing server and check if you have created a session collection and make your RDSH server part of the group.
All these should help you fix the no Remote Desktop License Servers available to provide a license problem.
Related posts:
- Windows Remote Desktop disconnects frequently
- Remote session was disconnected. No Remote Desktop client access licenses available.