Win10의 xRDP는 연결 후 즉시 연결이 끊어집니다.

Win10의 xRDP는 연결 후 즉시 연결이 끊어집니다.

Win10에서 xRDP를 통해 최근에 설치된 Bodhi Linux에 연결하려고 합니다. 이 클라이언트에서 다른 많은 Ubuntu 서버에 연결할 수 있습니다. Bodhi에 대한 첫 경험이지만 모든 것이 익숙해 보입니다.

이 문제를 어떻게 해결하거나 최소한 진단할 수 있나요?

아래에 관련 내용을 게시하겠습니다.

로그에서

$ tail -30 /var/log/xrdp.log
...
[20220405-08:12:37] [INFO ] TLS connection established from ::ffff:192.168.0.71 port 60854: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384
[20220405-08:12:37] [DEBUG] xrdp_000007ad_wm_login_mode_event_00000001
[20220405-08:12:37] [INFO ] Loading keymap file /etc/xrdp/km-0000080a.ini
[20220405-08:12:37] [WARN ] local keymap file for 0x0000080a found and doesn't match built in keymap, using local keymap file
[20220405-08:12:42] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20220405-08:12:42] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20220405-08:12:42] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20220405-08:12:42] [DEBUG] return value from xrdp_mm_connect 0
[20220405-08:12:43] [INFO ] xrdp_wm_log_msg: login successful for display 13
[20220405-08:12:43] [DEBUG] xrdp_wm_log_msg: started connecting
[20220405-08:12:44] [INFO ] lib_mod_log_peer: xrdp_pid=1965 connected to X11rdp_pid=1973 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=::ffff:192.168.0.71 client_port=60854
[20220405-08:12:44] [DEBUG] xrdp_wm_log_msg: connected ok
[20220405-08:12:44] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20220405-08:12:44] [DEBUG] Closed socket 18 (AF_INET6 ::1 port 32828)
[20220405-08:12:45] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.0.176 port 3389)
[20220405-08:12:45] [DEBUG] xrdp_mm_module_cleanup
[20220405-08:12:45] [DEBUG] Closed socket 19 (AF_UNIX)
[20220405-08:12:45] [DEBUG] Closed socket 20 (AF_UNIX)

$ tail -30 /var/log/xrdp-sesman.log
...
[20220405-08:12:42] [INFO ] A connection received from ::1 port 32828
[20220405-08:12:42] [INFO ] ++ created session (access granted): username user1, ip ::ffff:192.168.0.71:60854 - socket: 12
[20220405-08:12:43] [INFO ] starting Xorg session...
[20220405-08:12:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 5910)
[20220405-08:12:43] [ERROR] g_tcp_bind(9, 6010) failed bind IPv6 (errno=98) and IPv4 (errno=22).
[20220405-08:12:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 0)
[20220405-08:12:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 5911)
[20220405-08:12:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 6011)
[20220405-08:12:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 6211)
[20220405-08:12:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 5912)
[20220405-08:12:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 6012)
[20220405-08:12:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 6212)
[20220405-08:12:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 5913)
[20220405-08:12:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 6013)
[20220405-08:12:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 6213)
[20220405-08:12:43] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20220405-08:12:43] [INFO ] calling auth_start_session from pid 1966
[20220405-08:12:43] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
[20220405-08:12:43] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20220405-08:12:43] [INFO ] /usr/lib/xorg/Xorg :13 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20220405-08:12:43] [CORE ] waiting for window manager (pid 1972) to exit
[20220405-08:12:45] [CORE ] window manager (pid 1972) did exit, cleaning up session
[20220405-08:12:45] [INFO ] calling auth_stop_session and auth_end from pid 1966
[20220405-08:12:45] [DEBUG] cleanup_sockets:
[20220405-08:12:45] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdp_chansrv_audio_out_socket_13
[20220405-08:12:45] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdp_chansrv_audio_in_socket_13
[20220405-08:12:45] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdpapi_13[20220405-08:12:45] [INFO ] ++ terminated session:  username user1, display :13.0, session_pid 1966, ip ::ffff:192.168.0.71:60854 - socket: 12

$ cat .xorgxrdp.13.log.old
[  2936.394]
X.Org X Server 1.20.13
X Protocol Version 11, Revision 0
...
[  2936.397] (++) Log file: ".xorgxrdp.13.log", Time: Tue Apr  5 08:12:43 2022
[  2936.398] (++) Using config file: "/etc/X11/xrdp/xorg.conf"
[  2936.398] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  2936.399] (==) ServerLayout "X11 Server"
[  2936.399] (**) |-->Screen "Screen (xrdpdev)" (0)
[  2936.399] (**) |   |-->Monitor "Monitor"
[  2936.400] (**) |   |-->Device "Video Card (xrdpdev)"
[  2936.400] (**) |-->Input Device "xrdpMouse"
[  2936.400] (**) |-->Input Device "xrdpKeyboard"
[  2936.400] (**) Option "DontVTSwitch" "on"
[  2936.400] (**) Option "AutoAddDevices" "off"
...

방화벽 상태. 규칙 3과 규칙 5는 나중에 추가되었지만 문제가 해결되지 않았습니다.

$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere
3389                       ALLOW       192.168.0.0/24
3389                       ALLOW       Anywhere
22/tcp (v6)                ALLOW       Anywhere (v6)
3389 (v6)                  ALLOW       Anywhere (v6)

답변1

나에게는 효과가 있었습니다(Ubuntu-20.40). 세션 관리자를 다음으로 변경하세요.xfce4그래서:

$ update-alternatives --config x-session-manager
There are 3 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).

  Selection    Path                    Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gnome-session   50        auto mode
  1            /usr/bin/gnome-session   50        manual mode
  2            /usr/bin/startxfce4      50        manual mode
  3            /usr/bin/xfce4-session   40        manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/startxfce4 to provide /usr/bin/x-session-manager (x-session-manager) in manual mode

명령을 다시 실행하십시오(확인하기 위해).

$ sudo update-alternatives --config x-session-manager
There are 3 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).

  Selection    Path                    Priority   Status
------------------------------------------------------------
  0            /usr/bin/startxfce4      50        auto mode
  1            /usr/bin/gnome-session   50        manual mode
* 2            /usr/bin/startxfce4      50        manual mode
  3            /usr/bin/xfce4-session   40        manual mode

Press <enter> to keep the current choice[*], or type selection number:

관련 정보