canonical / multipass

Multipass orchestrates virtual Ubuntu instances
https://multipass.run
GNU General Public License v3.0
7.95k stars 651 forks source link

enabling xrdp on Multipass unable to connect #3422

Open craftzneko opened 9 months ago

craftzneko commented 9 months ago

Describe the bug followed this guide https://multipass.run/docs/set-up-a-graphical-interface#heading--using-x11-forwarding on Mac apple silicon when connecting from Mac via MS Remote Desktop app or screensharing app on Mac both fail. Logs on ubuntu show this

Mar 03 22:03:09 proven-troll xrdp[29696]: [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied Mar 03 22:03:09 proven-troll xrdp[29696]: [ERROR] libxrdp_force_read: header read error Mar 03 22:03:09 proven-troll xrdp[29696]: [ERROR] [ITU-T X.224] Connection Sequence: CR-TPDU (Connection Request) failed Mar 03 22:03:09 proven-troll xrdp[29696]: [ERROR] xrdp_sec_incoming: xrdp_iso_incoming failed Mar 03 22:03:09 proven-troll xrdp[29696]: [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed Mar 03 22:03:09 proven-troll xrdp[29696]: [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed Mar 03 22:03:09 proven-troll xrdp[29696]: [ERROR] xrdp_iso_send: trans_write_copy_s failed Mar 03 22:03:09 proven-troll xrdp[29696]: [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed

looked through guide see no mention of configuring anything else, have I missed something

To Reproduce How, and what happened?

  1. follow this guide https://multipass.run/docs/set-up-a-graphical-interface#heading--using-x11-forwarding on apple silicon Mac
  2. try to connect via rdp on same device

Expected behavior connect to rep

Logs Please provide logs from the daemon, see accessing logs on where to find them on your platform.

Additional info

andrei-toterman commented 9 months ago

Hi, @craftzneko! I'm sorry you're having trouble. I see that you linked the tutorial for X11 forwarding, but you're talking about connecting through RDP. Just to make sure, you followed this tutorial https://multipass.run/docs/set-up-a-graphical-interface#heading--using-rdp for setting up an RDP server inside your VM, right?

andrei-toterman commented 9 months ago

Anyway, I can replicate the issue and I get the same errors as you, so I will investigate some more and get back to you when I find something!

craftzneko commented 9 months ago

Hi @andrei-toterman, yes sorry I did mean to link the main article not an anchor. Thanks for looking!

mickym2 commented 8 months ago

So I have the same problem to get an RDP session from my Windows RDP. I have the error:

[20240319-00:20:44] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied [20240319-00:20:44] [INFO ] Security protocol: configured [RDP], requested [SSL|HYBRID|HYBRID_EX|RDP], selected [RDP] [20240319-00:20:44] [ERROR] libxrdp_force_read: header read error [20240319-00:20:44] [ERROR] libxrdp_force_read: header read error [20240319-00:20:44] [ERROR] [ITU-T X.224] Connection Sequence: CR-TPDU (Connection Request) failed [20240319-00:20:44] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.178.40 port 63717 [20240319-00:20:44] [ERROR] Processing [ITU-T T.125] Connect-Initial failed [20240319-00:20:44] [ERROR] xrdp_sec_incoming: xrdp_iso_incoming failed [20240319-00:20:44] [INFO ] Socket 12: AF_INET6 connection received from 2001:9e8:a5e6:8500:64ea:4874:9db:cb4f port 63716 [20240319-00:20:44] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem [20240319-00:20:44] [ERROR] [MCS Connection Sequence] receive connection request failed [20240319-00:20:44] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed [20240319-00:20:44] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem [20240319-00:20:44] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem [20240319-00:20:44] [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed [20240319-00:20:44] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed [20240319-00:20:44] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed [20240319-00:20:44] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem [20240319-00:20:44] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied [20240319-00:20:44] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed [20240319-00:20:44] [ERROR] xrdp_iso_send: trans_write_copy_s failed [20240319-00:20:44] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied [20240319-00:20:44] [WARN ] Cannot accept TLS connections because certificate or private key file is not readable. certificate file: [/etc/xrdp/cert.pem], private key file: [/etc/xrdp/key.pem] [20240319-00:20:44] [ERROR] xrdp_iso_send: trans_write_copy_s failed [20240319-00:20:44] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed [20240319-00:20:44] [ERROR] libxrdp_force_read: header read error [20240319-00:20:44] [INFO ] Security protocol: configured [RDP], requested [RDP], selected [RDP] [20240319-00:20:44] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed [20240319-00:20:44] [ERROR] [ITU-T X.224] Connection Sequence: CR-TPDU (Connection Request) failed [20240319-00:20:44] [INFO ] Connected client computer name: MSI [20240319-00:20:44] [ERROR] xrdp_sec_incoming: xrdp_iso_incoming failed [20240319-00:20:44] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored) [20240319-00:20:44] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed [20240319-00:20:44] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored) [20240319-00:20:44] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed [20240319-00:20:44] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x07], keyboard_subtype:[0x00], keylayout:[0x00000407] [20240319-00:20:44] [ERROR] xrdp_iso_send: trans_write_copy_s failed [20240319-00:20:44] [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [de] options [] [20240319-00:20:44] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed [20240319-00:20:44] [INFO ] Non-TLS connection established from ::ffff:192.168.178.40 port 63717: with security level : high [20240319-00:20:45] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor [20240319-00:20:45] [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 10485760 MB cache entries 100 [20240319-00:20:45] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3 [20240319-00:20:45] [WARN ] xrdp_caps_process_codecs: unknown codec id 5 [20240319-00:20:45] [INFO ] xrdp_caps_process_codecs: RemoteFX, codec id 3, properties len 49 [20240319-00:20:45] [INFO ] Loading keymap file /etc/xrdp/km-00000407.ini [20240319-00:20:45] [WARN ] local keymap file for 0x00000407 found and doesn't match built in keymap, using local keymap file [20240319-00:20:45] [INFO ] connecting to sesman on 127.0.0.1:3350 [20240319-00:20:45] [INFO ] xrdp_wm_log_msg: sesman connect ok [20240319-00:20:45] [INFO ] sesman connect ok [20240319-00:20:45] [INFO ] sending login info to session manager. Please wait... [20240319-00:20:45] [INFO ] xrdp_wm_log_msg: login successful for user mwrdp on display 10 [20240319-00:20:45] [INFO ] login successful for user mwrdp on display 10 [20240319-00:20:45] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4 [20240319-00:20:45] [INFO ] started connecting [20240319-00:20:45] [INFO ] lib_mod_connect: connecting via UNIX socket [20240319-00:20:46] [INFO ] lib_mod_log_peer: xrdp_pid=25024 connected to X11rdp_pid=25063 X11rdp_uid=1001 X11rdp_gid=1001 client_ip=::ffff:192.168.178.40 client_port=63717 [20240319-00:20:46] [INFO ] connected ok

All this happens since the last update on my debian bookworm installation. So something has changed with a new package but do not know which causes the problem now. 2 weeks ago everything worked properly.

mickym2 commented 8 months ago

I found out - that the default security level will be set to RDP, if access to the cert files. If I add xrdp user to ssl-cert group it switches to SSL level but - the problem remains the same.

craftzneko commented 8 months ago

hey @andrei-toterman did you manage to find the issue after?