![Debian Bookworm 最新升级后不再有 xrdp 访问](https://linux22.com/image/776341/Debian%20Bookworm%20%E6%9C%80%E6%96%B0%E5%8D%87%E7%BA%A7%E5%90%8E%E4%B8%8D%E5%86%8D%E6%9C%89%20xrdp%20%E8%AE%BF%E9%97%AE.png)
在我的服务器上,我运行了最近安装的 Debian 测试版(Bookworm,5.16.0-6-amd64),今天对其进行了升级。升级所有软件包后,我无法再通过 Win-RDP 进入该框。Sesman 连接正常,但 UNIX 套接字几分钟后超时。升级前 Xrdp 运行正常,防火墙不会成为问题,我一直使用单一登录。
以下是 /var/log/xrdp.log 中的两个相关部分:
[20220408-15:13:05] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20220408-15:13:05] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20220408-15:13:05] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20220408-15:13:05] [ERROR] libxrdp_force_read: header read error
[20220408-15:13:05] [ERROR] Processing [ITU-T T.125] Connect-Initial failed
[20220408-15:13:05] [ERROR] [MCS Connection Sequence] receive connection request failed
[20220408-15:13:05] [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed
[20220408-15:13:05] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
[20220408-15:13:05] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
[20220408-15:13:05] [ERROR] xrdp_iso_send: trans_write_copy_s failed
[20220408-15:13:05] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
[20220408-15:30:39] [INFO ] connecting to sesman ip 127.0.0.1 port 3350
[20220408-15:30:39] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20220408-15:30:39] [INFO ] sesman connect ok
[20220408-15:30:39] [INFO ] sending login info to session manager, please wait...
[20220408-15:30:39] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20220408-15:30:39] [INFO ] login successful for display 10
[20220408-15:30:39] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
[20220408-15:30:39] [INFO ] started connecting
[20220408-15:30:39] [INFO ] lib_mod_connect: connecting via UNIX socket
[20220408-15:34:09] [INFO ] connection problem, giving up
[20220408-15:34:09] [INFO ] some problem
我在Raspberry Pi 论坛但是切换到 VNC 并不能解决问题,而且其他建议在我看来并不专业。
有没有办法深入研究 UNIX 套接字“某些问题”?知道“权限被拒绝”错误是什么吗?在 xrdp 正常工作的旧服务器上,文件权限是相同的。所以我猜是缺少了其他东西。
任何想法?
我还添加了 systemctl 状态:
# systemctl status xrdp
● xrdp.service - xrdp daemon
Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2022-04-08 15:42:18 CEST; 1h 13min ago
Docs: man:xrdp(8)
man:xrdp.ini(5)
Process: 774 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)
Process: 789 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 805 (xrdp)
Tasks: 3 (limit: 76942)
Memory: 13.0M
CPU: 59ms
CGroup: /system.slice/xrdp.service
├─ 805 /usr/sbin/xrdp
└─67212 /usr/sbin/xrdp
Apr 08 16:55:30 server2 xrdp[67211]: [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
Apr 08 16:55:30 server2 xrdp[67211]: [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
Apr 08 16:55:30 server2 xrdp[67211]: [ERROR] xrdp_iso_send: trans_write_copy_s failed
Apr 08 16:55:30 server2 xrdp[67211]: [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
Apr 08 16:55:30 server2 xrdp[67212]: [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
Apr 08 16:55:30 server2 xrdp[67212]: [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
Apr 08 16:55:30 server2 xrdp[67212]: [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
Apr 08 16:55:30 server2 xrdp[67212]: [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc008 is unknown (ignored)
Apr 08 16:55:31 server2 xrdp[67212]: [WARN ] xrdp_caps_process_codecs: unknown codec id 5
Apr 08 16:55:31 server2 xrdp[67212]: [WARN ] local keymap file for 0x00000807 found and doesn't match built in keymap, using local keymap file
# systemctl status xrdp-sesman
● xrdp-sesman.service - xrdp session manager
Loaded: loaded (/lib/systemd/system/xrdp-sesman.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2022-04-08 15:42:17 CEST; 1h 13min ago
Docs: man:xrdp-sesman(8)
man:sesman.ini(5)
Process: 766 ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 771 (xrdp-sesman)
Tasks: 1 (limit: 76942)
Memory: 1.8M
CPU: 72ms
CGroup: /system.slice/xrdp-sesman.service
└─771 /usr/sbin/xrdp-sesman
Apr 08 16:55:41 server2 xrdp-sesman[771]: [ERROR] sesman_data_in: scp_process_msg failed
Apr 08 16:55:41 server2 xrdp-sesman[771]: [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
更新:
我尝试清除并重新安装 xrdp,但我无法再安装 xrdp:
# apt install xrdp
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package xrdp is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'xrdp' has no installation candidate
有人有什么建议吗?
更新二:
我不确定根本原因是什么,我留给对 Linux 有更多了解的人来回答。
这是我所做的。由于 xrdp 不再可用(现在仍然如此...),Debian:testing
我将其添加Debian:unstable
到我的软件包列表中并将 apt 固定到 Debian:testing。这样我就可以重新安装 xrdp。但令我失望的是,我仍然无法将 Win-RDP 插入盒子。那是一周前的事了。
今天我运行apt update && apt upgrade
并重启了盒子,现在 RDP 又正常工作了!不确定到底是什么解决了这个问题。我想我之前也试过重启。所以从我这边来看一切都很好。