neutrinolabs / xrdp

xrdp: an open source RDP server
http://www.xrdp.org/
Apache License 2.0
5.75k stars 1.73k forks source link

Unable to connect even after successful login #2761

Closed jp803333 closed 1 year ago

jp803333 commented 1 year ago

xrdp version

0.9.17

Detailed xrdp version, build options

xrdp 0.9.17
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2020 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --enable-ipv6
      --enable-jpeg
      --enable-fuse
      --enable-rfxcodec
      --enable-opus
      --enable-painter
      --enable-vsock
      --build=x86_64-linux-gnu
      --prefix=/usr
      --includedir=${prefix}/include
      --mandir=${prefix}/share/man
      --infodir=${prefix}/share/info
      --sysconfdir=/etc
      --localstatedir=/var
      --disable-silent-rules
      --libdir=${prefix}/lib/x86_64-linux-gnu
      --libexecdir=${prefix}/lib/x86_64-linux-gnu
      --disable-maintainer-mode
      --disable-dependency-tracking
      --with-socketdir=/run/xrdp/sockdir
      build_alias=x86_64-linux-gnu
      CFLAGS=-g -O2 -ffile-prefix-map=/build/xrdp-asBei3/xrdp-0.9.17=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security 
      LDFLAGS=-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed
      CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 -Wno-error=deprecated-declarations
      PKG_CONFIG_PATH=/build/xrdp-asBei3/xrdp-0.9.17/pkgconfig

  Compiled with OpenSSL 3.0.2 15 Mar 2022

Operating system & version

Ubuntu 22.04.2 LTS

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

xorgxrdp

What desktop environment do you use?

Xfce

Environment xrdp running on

VM on azure cloud

What's your client?

Microsoft remote desktop on MacOS 13.3.1 (a) M1 pro

Area(s) with issue?

Session manager (sesman), Other

Steps to reproduce

I followed this guide from microsoft https://learn.microsoft.com/en-us/azure/virtual-machines/linux/use-remote-desktop?tabs=azure-cli

✔️ Expected Behavior

Succesful connection

❌ Actual Behavior

does not load desktop. displays : connection problem, giving up some problem after a few seconds of trying to connect

Anything else?

xrdp.log

[20230801-12:18:14] [ERROR] xrdp_sec_recv: xrdp_mcs_recv failed
[20230801-12:18:14] [ERROR] xrdp_rdp_recv: xrdp_sec_recv failed
[20230801-12:18:14] [ERROR] libxrdp_process_data: xrdp_rdp_recv failed
[20230801-12:18:14] [ERROR] xrdp_process_data_in: xrdp_process_loop failed
[20230801-12:18:14] [ERROR] SSL_shutdown: Failure in SSL library (protocol error?)
[20230801-12:18:14] [ERROR] SSL: error:0A000126:SSL routines::unexpected eof while reading
[20230801-12:27:49] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:<<my_ip>> port 30931
[20230801-12:27:49] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20230801-12:27:49] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20230801-12:27:51] [INFO ] Connected client computer name: Jitendras-MacBo
[20230801-12:27:51] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
[20230801-12:27:51] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
[20230801-12:27:51] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00c is unknown (ignored)
[20230801-12:27:51] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000000]
[20230801-12:27:51] [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [us] options []
[20230801-12:27:51] [INFO ] TLS connection established from ::ffff:<<my_ip>> port 30931: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384
[20230801-12:27:51] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
[20230801-12:27:51] [INFO ] xrdp_process_offscreen_bmpcache: support level 0 cache size 0 MB cache entries 0
[20230801-12:27:51] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
[20230801-12:27:51] [WARN ] Cannot find keymap file /etc/xrdp/km-00000000.ini
[20230801-12:27:51] [WARN ] Cannot find keymap file /etc/xrdp/km-00000000.ini
[20230801-12:27:51] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20230801-12:27:51] [WARN ] local keymap file for 0x00000000 found and doesn't match built in keymap, using local keymap file
[20230801-12:27:51] [INFO ] connecting to sesman ip 127.0.0.1 port 3350
[20230801-12:27:51] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20230801-12:27:51] [INFO ] sesman connect ok
[20230801-12:27:51] [INFO ] sending login info to session manager, please wait...
[20230801-12:27:51] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20230801-12:27:52] [INFO ] login successful for display 10
[20230801-12:27:52] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
[20230801-12:27:52] [INFO ] started connecting
[20230801-12:27:52] [INFO ] lib_mod_connect: connecting via UNIX socket
[20230801-12:31:21] [INFO ] connection problem, giving up
[20230801-12:31:21] [INFO ] some problem

xrdp-sesman.log

[20230801-12:27:51] [INFO ] Socket 8: AF_INET6 connection received from ::1 port 33822
[20230801-12:27:51] [INFO ] Terminal Server Users group is disabled, allowing authentication
[20230801-12:27:51] [INFO ] ++ created session (access granted): username jit-xdrp, ip ::ffff:<<my_ip>>:30931 - socket: 12
[20230801-12:27:51] [INFO ] starting Xorg session...
[20230801-12:27:51] [INFO ] Starting session: session_pid 4091, display :10.0, width 1920, height 1080, bpp 24, client ip ::ffff:<<my_ip>>:30931 - socket: 12, user name jit-xdrp
[20230801-12:27:51] [INFO ] [session start] (display 10): calling auth_start_session from pid 4091
[20230801-12:27:51] [ERROR] sesman_data_in: scp_process_msg failed
[20230801-12:27:52] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20230801-12:28:02] [WARN ] Timed out waiting for X server on display 10 to startup
[20230801-12:28:02] [WARN ] Timed out waiting for X server on display 10 to startup
[20230801-12:28:02] [INFO ] Session started successfully for user jit-xdrp on display 10
[20230801-12:28:02] [INFO ] Starting the xrdp channel server for display 10
[20230801-12:28:02] [ERROR] There is no X server active on display 10
[20230801-12:28:02] [INFO ] Session in progress on display 10, waiting until the window manager (pid 4106) exits to end the session
[20230801-12:28:02] [ERROR] A fatal error has occured attempting to start the window manager on display 10, aborting connection
[20230801-12:28:02] [WARN ] Window manager (pid 4106, display 10) exited quickly (0 secs). This could indicate a window manager config problem
[20230801-12:28:02] [INFO ] Calling auth_stop_session and auth_end from pid 4091
[20230801-12:28:02] [INFO ] Terminating X server (pid 4107) on display 10
[20230801-12:28:02] [INFO ] Terminating the xrdp channel server (pid 4118) on display 10
[20230801-12:28:02] [INFO ] shutting down sesman 1
[20230801-12:28:12] [INFO ] Starting X server on display 10: /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log  
[20230801-12:28:12] [INFO ] X server on display 10 (pid 4107) returned exit code 1 and signal number 0
[20230801-12:28:12] [INFO ] xrdp channel server for display 10 (pid 4118) exit code 1 and signal number 0
[20230801-12:28:12] [INFO ] cleanup_sockets:
[20230801-12:28:12] [INFO ] ++ terminated session:  username jit-xdrp, display :10.0, session_pid 4091, ip ::ffff:<<my_ip>>:30931 - socket: 12
matt335672 commented 1 year ago

May be a problem with the X server.

What's in ~jit-xdrp/.xorgxrdp.10.log?

jp803333 commented 1 year ago

There is no such file or jit-xdrp folder apparently.

matt335672 commented 1 year ago

Are we talking about the same thing?

~jit-xrdp should resolve to the home directory for the user jit-xrdp, which is probably /home/jit-xrdp.

If your user doesn't have a home directory, you won't be able to get any desktop working.

jp803333 commented 1 year ago

Okay got it, I deleted the old user and created a new one with an user folder in home directory. It working now

Thanks for the help.