我在 Ubuntu 22.04.2 LTS (Jammy Jellyfish) 中使用内置的 Gnome 远程桌面和 Wayland,并使用 Windows 11 的远程桌面连接进行远程操作。出于某种原因,退出后第一次尝试连接到 Gnome 远程桌面时,我收到一条错误消息:“远程桌面找不到计算机 [服务器]。这可能意味着 [服务器] 不属于指定的网络。请验证您尝试连接的计算机名称和域。”
奇怪的是,当我“确定”错误并再次单击“连接”时,它总是立即起作用并且不会发生任何错误。
下面是每次发生的问题的视觉 gif 表示,您可以通过单击远程桌面连接中的“x”来重新创建它,重新连接并收到错误,单击确定,并立即能够重新连接到服务器: https://imgur.com/OyW66kK
我尝试journalctl --user-unit gnome-remote-desktop.service --no-pager
提取一些错误日志并得出了一些结论。
- 当我点击远程桌面中的关闭按钮时,发生了一系列错误,导致连接传输失败。
Jun 30 18:01:23 server gnome-remote-desktop-daemon[4089]: [18:01:23:090] [4089:8877] [ERROR][com.freerdp.core.peer] - peer_recv_callback: CONNECTION_STATE_ACTIVE - peer_recv_pdu() fail
Jun 30 18:01:23 server gnome-remote-desktop-daemon[4089]: [18:01:23:090] [4089:8877] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
Jun 30 18:01:23 server gnome-remote-de[4089]: Unable to check file descriptor, closing connection
Jun 30 18:01:23 server gnome-remote-desktop-daemon[4089]: [18:01:23:096] [4089:4089] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 104: Connection reset by peer
Jun 30 18:01:23 server gnome-remote-desktop-daemon[4089]: [18:01:23:096] [4089:4089] [ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
- 当我退出后第一次尝试重新连接时发生了一系列错误,导致连接关闭,尽管在我之前最初点击关闭时它也被关闭了。
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: ore.gcc] - Selected rdp encryption method: NONE
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:40:365] [4089:8769] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:40:365] [4089:8769] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:40:365] [4089:8769] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:45:893] [4089:8787] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:45:893] [4089:8787] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:45:893] [4089:8787] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:46:990] [4089:8787] [INFO][com.freerdp.core.connection] - Accepted client: client
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:46:990] [4089:8787] [INFO][com.freerdp.core.connection] - Accepted channels:
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:46:990] [4089:8787] [INFO][com.freerdp.core.connection] - rdpdr
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:46:990] [4089:8787] [INFO][com.freerdp.core.connection] - rdpsnd
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:46:990] [4089:8787] [INFO][com.freerdp.core.connection] - cliprdr
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:46:990] [4089:8787] [INFO][com.freerdp.core.connection] - drdynvc
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:46:990] [4089:8787] [INFO][com.freerdp.core.gcc] - Active rdp encryption level: NONE
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:46:990] [4089:8787] [INFO][com.freerdp.core.gcc] - Selected rdp encryption method: NONE
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:55:416] [4089:8815] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:55:416] [4089:8815] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:51:55:416] [4089:8815] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:00:641] [4089:8833] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:00:641] [4089:8833] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:00:641] [4089:8833] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:00:741] [4089:8833] [INFO][com.freerdp.core.connection] - Accepted client: client
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:00:741] [4089:8833] [INFO][com.freerdp.core.connection] - Accepted channels:
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:00:741] [4089:8833] [INFO][com.freerdp.core.connection] - rdpdr
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:00:741] [4089:8833] [INFO][com.freerdp.core.connection] - rdpsnd
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:00:741] [4089:8833] [INFO][com.freerdp.core.connection] - cliprdr
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:00:741] [4089:8833] [INFO][com.freerdp.core.connection] - drdynvc
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:00:741] [4089:8833] [INFO][com.freerdp.core.gcc] - Active rdp encryption level: NONE
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:00:741] [4089:8833] [INFO][com.freerdp.core.gcc] - Selected rdp encryption method: NONE
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:04:023] [4089:8859] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:04:023] [4089:8859] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:04:023] [4089:8859] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:11:801] [4089:8877] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:11:801] [4089:8877] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:11:801] [4089:8877] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:11:824] [4089:8877] [INFO][com.freerdp.core.connection] - Accepted client: client
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:11:824] [4089:8877] [INFO][com.freerdp.core.connection] - Accepted channels:
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:11:824] [4089:8877] [INFO][com.freerdp.core.connection] - rdpdr
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:11:824] [4089:8877] [INFO][com.freerdp.core.connection] - rdpsnd
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:11:824] [4089:8877] [INFO][com.freerdp.core.connection] - cliprdr
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:11:824] [4089:8877] [INFO][com.freerdp.core.connection] - drdynvc
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:11:824] [4089:8877] [INFO][com.freerdp.core.gcc] - Active rdp encryption level: NONE
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [17:52:11:824] [4089:8877] [INFO][com.freerdp.core.gcc] - Selected rdp encryption method: NONE
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [18:02:03:958] [4089:9204] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [18:02:03:958] [4089:9204] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [18:02:03:958] [4089:9204] [INFO][com.freerdp.core.conne[18:02:03:053] [4089:9204] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_CONTINUE_NEEDED [0x00090312]
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [18:02:03:060] [4089:9204] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_COMPLETE_NEEDED [0x00090313]
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [18:02:03:062] [4089:9204] [ERROR][com.freerdp.core.transport] - BIO_read returned a system error 104: Connection reset by peer
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [18:02:03:062] [4089:9204] [ERROR][com.freerdp.core] - transport_read_layer:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [18:02:03:062] [4089:9204] [ERROR][com.freerdp.core.nla] - [nla_recv] error: -1
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [18:02:03:062] [4089:9204] [ERROR][com.freerdp.core.transport] - client authentication failure
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [18:02:03:062] [4089:9204] [ERROR][com.freerdp.core.peer] - peer_recv_callback: CONNECTION_STATE_INITIAL - rdp_server_accept_nego() fail
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [18:02:03:062] [4089:9204] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
Jun 30 18:02:03 server gnome-remote-desktop-daemon[4089]: [18:02:03:062] [4089:4089] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
Jun 30 18:02:03 server gnome-remote-de[4089]: Unable to check file descriptor, closing connection
- 然后在第二次单击“连接”时,在成功连接之前会出现两个成功时的警告(可能与问题无关)。
Jun 30 18:32:27 server gnome-remote-desktop-daemon[1232]: [18:32:27:220] [1232:3756] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_CONTINUE_NEEDED [0x00090312]
Jun 30 18:32:27 server gnome-remote-desktop-daemon[1232]: [18:32:27:278] [1232:3756] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_COMPLETE_NEEDED [0x00090313]
Jun 30 18:32:27 server gnome-remote-de[1232]: [RDP.RDPGFX] CapsAdvertise: Accepting capability set with version RDPGFX_CAPVERSION_106, Client cap flags: H264 (AVC444): true, H264 (AVC420): true
Jun 30 18:32:27 server gnome-remote-de[1232]: [RDP.CLIPRDR] Client capabilities: long format names, stream file clip, file clip no file paths, can lock clip data, huge file support
我假设在最初关闭连接时,通过单击 Windows 远程桌面连接中的“x”,它要么发送一个某处的 tpkt 标头不正确或者是由于某种原因无法关闭连接,导致 3389 端口保持占用状态,直到另一个连接请求(失败)刷新/断开有问题的连接,从而允许第二次连接尝试通过?
是否有其他人知道此问题、知道解决方法,或者对从哪里开始排除故障以进行修复有任何想法?
答案1
好吧,找到了解决方案,但不是确切的原因。在 wifi 连接上运行 Linux 计算机似乎是问题所在,通过以太网插入它完全解决了这个问题。这似乎与 wifi 驱动程序/设置/配置有关,要么重置,要么每次连接后都需要唤醒。在以太网连接上,这个问题已经修复。