现象描述
当您使用本地计算机远程连接 Windows 轻量应用服务器实例时,出现如下图所示报错信息:
![](https://qcloudimg.tencent-cloud.cn/image/document/87f30d4eee7ef63c8e75147eb3a52c67.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/87f30d4eee7ef63c8e75147eb3a52c67.png)
远程桌面由于以下原因之一无法连接到远程计算机:
未启用对服务器的远程访问
远程计算机已关闭
在网络上远程计算机不可用
确保打开远程计算机、连接到网络并且启用远程访问。
可能原因
导致出现以上提示的原因包括(不限于以下情况,请根据实际情况进行分析):
实例处于非正常运行状态
实例的防火墙未放通远程登录端口(默认为3389)
远程桌面服务未启动
远程桌面设置问题
Windows 防火墙设置问题
轻量应用服务器中安装的安全软件拦截
解决思路
处理步骤
检查实例是否处于运行状态
1. 登录 轻量应用服务器控制台。
2. 在服务器页面,查看实例是否处于运行中。如下图所示:
![](https://qcloudimg.tencent-cloud.cn/image/document/6dcff63c597a6c96b822f3e9e817ae78.png)
是,请进行下一步。
否,请启动该 Windows 实例。
检查实例远程登录端口(3389)是否放通
1. 在实例详情页面中,选择防火墙页签。
2. 检查实例的防火墙是否放通远程登录接口(默认远程桌面端口:3389)。如下图所示:
![](https://qcloudimg.tencent-cloud.cn/image/document/56994026fdd6d5e487c4db004f1be5b1.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/56994026fdd6d5e487c4db004f1be5b1.png)
是,请进行下一步。
否,请编辑对应的防火墙规则,进行放通。操作方法请参见 添加防火墙规则。
检查远程桌面服务
1. 使用 VNC 方式登录 Windows 实例,检查 Windows 实例远程桌面服务是否开启。
说明:
以下操作以 Windows Server 2016 操作系统的实例为例。
2. 右键单击![](https://qcloudimg.tencent-cloud.cn/image/document/de573e602b949cc4ba3fc44a49acfac7.png)
,在弹出的菜单中选择系统。
![](https://qcloudimg.tencent-cloud.cn/image/document/de573e602b949cc4ba3fc44a49acfac7.png)
3. 在打开的系统窗口中,选择高级系统设置。
4. 在打开的系统属性窗口中,选择远程页签,检查是否勾选允许远程连接到此计算机。如下图所示:
![](https://qcloudimg.tencent-cloud.cn/image/document/29c7257f2f6bde871d16301d13eeba7a.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/29c7257f2f6bde871d16301d13eeba7a.png)
是,请执行 步骤5。
否,请勾选并单击确定。
5. ![](https://qcloudimg.tencent-cloud.cn/image/document/10e6b8693da4f512cd9f9ebe62c4e5c2.png)
,在弹出的菜单中选择计算机管理。
右键单
击![](https://qcloudimg.tencent-cloud.cn/image/document/10e6b8693da4f512cd9f9ebe62c4e5c2.png)
6. 在打开的计算机管理窗口左侧菜单栏中,选择服务和应用程序 > 服务。
7. 在右侧的服务列表中,检查 Remote Desktop Services 是否启动。如下图所示:
![](https://qcloudimg.tencent-cloud.cn/image/document/bf447b7780ea8dea0e22ce2767e1d0d2.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/bf447b7780ea8dea0e22ce2767e1d0d2.png)
是,请执行 步骤8。
否,请启动服务。
8. ![](https://qcloudimg.tencent-cloud.cn/image/document/8fb4150922e00e67b1563f79d7b1a1e6.png)
,在弹出的菜单中选择运行。
右键单击
![](https://qcloudimg.tencent-cloud.cn/image/document/8fb4150922e00e67b1563f79d7b1a1e6.png)
9. 在弹出的运行窗口中,输入 msconfig 并单击确定。
10. 在打开的系统配置窗口中,检查是否勾选正常启动。如下图所示:
![](https://qcloudimg.tencent-cloud.cn/image/document/4ddcef660ddebc6595a49e3b95d15293.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/4ddcef660ddebc6595a49e3b95d15293.png)
是,请进行下一步。
否,请勾选并单击确定。
检查 Windows 实例的系统设置
1. 使用 VNC 登录实例,排查 Windows 实例的系统设置。
说明:
以下操作以 Windows Server 2016 操作系统的实例为例。
2. 右键单击![](https://qcloudimg.tencent-cloud.cn/image/document/80bce307fc960bd20772d1ff6d1fcc5e.png)
,在弹出的菜单中选择运行。
![](https://qcloudimg.tencent-cloud.cn/image/document/80bce307fc960bd20772d1ff6d1fcc5e.png)
3. 在弹出的运行中输入 services.msc,并按 Enter,打开服务窗口。
4. 双击打开 Remote Desktop Services 的属性,检查远程桌面服务是否已启动。如下图所示:
![](https://qcloudimg.tencent-cloud.cn/image/document/3821a34b459e8e9945d5921854acf31b.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/3821a34b459e8e9945d5921854acf31b.png)
是,请执行 步骤5。
否,请将启动类型设置为自动,服务状态设置为正在运行(即单击启动,启动服务)。
5. ![](https://qcloudimg.tencent-cloud.cn/image/document/14ac412abe72fda9c4d8c24150b606b7.png)
,在弹出的菜单中选择控制面板,打开控制面板。
右键单击
![](https://qcloudimg.tencent-cloud.cn/image/document/14ac412abe72fda9c4d8c24150b606b7.png)
6. 在控制面板中,选择系统与安全 > Windows 防火墙,打开 Windows 防火墙。
7. 在 Windows 防火墙 中,检查 Windows 防火墙状态。如下图所示:
![](https://qcloudimg.tencent-cloud.cn/image/document/ce0f1d08037a1242162af3f9696299cc.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/ce0f1d08037a1242162af3f9696299cc.png)
为启用状态,请执行 步骤8。
为关闭状态,请开启。若无法开启,则请通过 在线支持 反馈。
8.
在 Windows 防火墙中
,单击允许应用或能通过 Windows 防火墙,打开允许的应用窗口。9. 在允许的应用窗口中,检查允许的应用和功能(A)是否勾选远程桌面。如下图所示:
![](https://qcloudimg.tencent-cloud.cn/image/document/ddc0962493cb9e583325573f5203b5ea.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/ddc0962493cb9e583325573f5203b5ea.png)
是,请执行 步骤10。
否,请勾选远程桌面,放通远程桌面。
10.
在 Windows 防火墙中
,单击启用或关闭 Windows 防火墙,打开自定义设置窗口。11. 在自定义设置窗口中,将专用网络设置和公用网络设置设置为关闭 Windows 防火墙(不推荐)。如下图所示:
![](https://qcloudimg.tencent-cloud.cn/image/document/1a14277d47e88a1c5919b8e5e9d2019f.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/1a14277d47e88a1c5919b8e5e9d2019f.png)
检查轻量应用服务器中安装的安全软件
已安装的安全软件 ,在进行启动项优化时,可能关闭 Windows 远程管理服务。以 360 安全卫士为例:
在进行体检优化时,忽略关闭 Windows Remote Management(Windows远程管理服务)的优化建议。![](https://qcloudimg.tencent-cloud.cn/image/document/28e982896ab5019ff2ed688149677436.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/28e982896ab5019ff2ed688149677436.png)
1. 登录 Windows 实例,详细操作参见 使用 OrcaTerm 登录 Windows 实例。
2. 在您本地计算机的应用界面,单击![](https://qcloudimg.tencent-cloud.cn/image/document/e6ebffce43a6b72835e2f4dd05dfbc0f.png)
,打开 Windows PowerShell 窗口。
![](https://qcloudimg.tencent-cloud.cn/image/document/e6ebffce43a6b72835e2f4dd05dfbc0f.png)
3. 打开成功后运行以下命令,开启 Windows 远程管理服务:
Enable-PSRemoting
4. 运行完成之后检查 Windows 远程管理服务的启动情况:
Get-Service WinRM
如已正常开启,则运行效果如下图所示:
![](https://qcloudimg.tencent-cloud.cn/image/document/e8fc512a1fde6a0aee46567040c24c31.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/e8fc512a1fde6a0aee46567040c24c31.png)