西西河

主题:【求助】Windows 远程桌面总是被断开连接 -- leqian

共:💬17 🌺9 新:
分页树展主题 · 全看 下页
  • 家园 【求助】Windows 远程桌面总是被断开连接

    我住在学校里, 本来一直用办公室的 windows xp 机器做客户端, remote desktop到家里的win server 2008, 从来都很好用. 但是最近发现, 这个以前一切正常的连接方式, 总是频断开, 错误信息是

    Because of a protocol error, this session will be disconnected. Please try connecting to the remote computer again.

    然后就被迫断开, 只能重连, 但连接很不稳定. 远程桌面是我习惯性的工作方式, 对我很重要, 希望大家不吝赐教. 无以为报, 必有花谢

    * 我google了一下这个问题, 没发现什么对我有用的解答.

    * 做客户端的win xp sp3一切正常, remote desktop的程序也是6.0版本, 连接别的机器并没有问题. 同样, 别的机器连接我家里的 win server 2008也总是连接被断开.

    * 远程桌面之后如果上网, 则必断无疑. 如果打开视频, 也很容易断. 不知道这两个症状会有所帮助, 还是误导.

    * 最近换过一个宿舍, 但还是在学校里面, 也许网络条件有所变化, 导致连接不稳定? 同样, 这一点也许能帮助诊断, 也许是误导.

    * 我也试过teamviewer, 很好用, 只是这个软件的速度还略逊于远程桌面, 不知道是否有调整提高的余地.

    * 我的 windows 知识有限, 用win 2008只是因为对学生免费而已. 不过之前这个系统也没有什么问题, 没有改动过设置, 都用的好好的.

    • 家园 有可能是MTU设置不对

      我曾经有一段时间也碰上了类似的问题,RDP连到公司的机子每十几二十分钟就断开一次,非常烦人。后来在网上找到下面这个链接,并按上面说的改了我本地机器(WinXP)的MTU设置。之后就正常了,再也没有掉过链子。

      http://www.howtonetworking.com/VPN/mtu1.htm

      • 家园 我去试试, 不过现在发现跟远程服务器的OS有关

        win 2008 就不行

        win vista 可以

        奇怪的很, 按说还是一个核心的. 我也无法回忆起Win 2008是搞过什么才变成这样.

    • 家园 目前进展

      频繁断开和远程桌面的压缩设置有关. 修改这个设置的地方有两个, 一是终端机器的组策略对应设置, 另一是客户端的default.rdp文件中的参数. 修改压缩设置的确有帮助, 但不能完全解决这个问题.

      很可能, 这是远程桌面程序的一个bug, 和它本身的版本有关, 和操作系统无关. 在一个微软相关论坛, 这个问题最后最近还被讨论过, 就在去年12月18日. 有人说用老版本的remote desktop程序就没问题, 反而是windows xp的更新让这个程序变得bug频. 可惜老版本一时之间弄不到.

      不过现在勉强能用了, 只能慢慢关注吧. 再次感谢下面提供建议的各位朋友

      • 家园 用sniffer抓包分析吧

        用sniffer抓包分析吧。

        微软的东西就不说什么了,一切皆有可能。

        • 家园 谢谢, sniff是不是和下面说的

          wireshark 一类? 用来记录 packet?

          微软倒是有自己的工具, network monitor, 直接包含 remote desktop parser, 但是没发现什么特别的. 头一次用这种工具, 也不太熟悉.

          • 家园 用wireshark

            用wireshark,点右键,选择跟踪TCP数据流(好像叫这个),看看在哪里请求或者响应时间久,然后重点分析这之前的的数据包,或许能有点眉目。

            也可以用VNC试验下,VNC个人觉得速度比remote destop快。

            • 家园 谢谢

              RDP我查到了, 是用tcp, 没有改过的话, 端口3389

              但是wireshark找不到这样的网络包

              VNC我去试试看

    • 家园 如果能连接上但是经常断掉多半不是配置的问题

      是否和网络情况有关系?试下连接的同时ping 服务器的地址看看延时情况。

    • 家园 这个似乎比较详细

      SYMPTOMS

      When a user remote controls another user's session using Remote Desktop Services Manager or Terminal Services Manager on a Windows Server 2008-based computer, and then stops remote controlling, one or both sessions are disconnected with the following error:

      Remote Desktop Disconnected

      Because of a protocol error, this session will be disconnected. Please try connecting to the remote computer again.

      CAUSE

      This problem occurs if Remote Desktop Connection Client version 6.0.6001 or 6.0.6002 is used with the highest RDP Compression setting. Windows Server 2008 SP1/SP2 defaults to a lower RDP Compression setting, and thus will only exhibit the above symptoms if the setting has been changed to "Optimized to use less network bandwidth", which is the maximum. Windows Server 2008 R2 defaults to the maximum RDP Compression setting.

      WORKAROUND

      Change the RDP Compression setting on the server to "Balances memory and network bandwidth" (recommended) or "Optimized to use less memory" using Group Policy. If using Windows Server 2008 R2 you may also choose "Do not use an RDP compression algorithm". An alternative workaround is to use a different Remote Desktop Connection Client version than those mentioned above, however, this may not be practical. Below are instructions for making the change to the local group policy; if preferred you can use a domain group policy instead.

      Windows Server 2008 R2

      1. Logon to the Remote Desktop Services Session Host computer as an administrator

      2. Start--Run gpedit.msc

      3. In the left pane, under Computer Configuration, navigate to following:

      Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Remote Session Environment

      4. In the right pane, double-click on Set compression algorithm for RDP data

      5. Select Enabled, and choose Balances memory and network bandwidth

      6. Click OK to save the change

      Windows Server 2008 (SP1 or SP2)

      1. Logon to the Terminal Services computer as an administrator

      2. Start--Run gpedit.msc, click Continue if prompted by UAC

      3. In the left pane, under Computer Configuration, navigate to following:

      Administrative Templates\Windows Components\Terminal Services\Terminal Server\Remote Session Environment

      4. In the right pane, double-click on Set compression algorithm for RDP data

      5. Select Enabled, and choose Balances memory and network bandwidth

      6. Click OK to save the change

      STEPS TO REPRODUCE

      Windows Server 2008 R2 x64

      1. Install 2008 R2 Standard (Full Installation) x64 from DVD using defaults

      2. Upon first logon, scroll down the initial configuration tasks window and click on Enable Remote Desktop

      3. Choose Allow connections from computers running any version of Remote Desktop (less secure), click OK

      4. Open up Computer Management and create a test user, make them a member of the Remote Desktop Users group, on the Remote Control tab, uncheck "Require user's permission"

      5. Connect from a PC using Remote Desktop Client version 6.0.6001 or 6.0.6002 to the server, logon as administrator

      6. Connect from a PC using Remote Desktop Client version 6.0.6001 or 6.0.6002 to the server, logon as the test user

      7. In the administrator's session, open up Remote Desktop Services Manager, right-click on the test user and choose Remote Control, click OK

      8. After you are viewing the test user's desktop, press Ctrl-Tab to end the Remote Control

      Windows Server 2008 x64

      1. Install 2008 Standard (Full Installation) x64 from DVD using defaults

      2. Upon first logon, scroll down the initial configuration tasks window and click on Enable Remote Desktop

      3. Choose Allow connections from computers running any version of Remote Desktop (less secure), click OK

      4. Open up Computer Management and create a test user, make them a member of the Remote Desktop Users group, on the Remote Control tab, uncheck "Require user's permission"

      5. Change RDP Compression algorithm to "Optimized to use less network bandwidth" using instructions above

      6. Connect from a PC using Remote Desktop Client version 6.0.6001 or 6.0.6002 to the server, logon as administrator

      7. Connect from a PC using Remote Desktop Client version 6.0.6001 or 6.0.6002 to the server, logon as the test user

      8. In the administrator's session, open up Terminal Services Manager, right-click on the test user and choose Remote Control, click OK

      9. After you are viewing the test user's desktop, press Ctrl-Tab to end the Remote Control

      NOTE: This problem may occur when connecting to a Windows Vista or Windows 7 host under similar conditions. I have not tested this theory, however.

      As always I welcome your comments/questions/corrections/suggestions/etc.

      Thank you for reading.

    • 家园 remote desktop已经有7版本
分页树展主题 · 全看 下页


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河