lubuntu 14.04 서버 중 하나에 xrdp를 설치하고 RDP를 통해 특정 애플리케이션에 액세스하기 위해 동일한 서버에 40-50명의 사용자를 만들었습니다.
모든 사용자는 성공적으로 mstsc.exe(Windows 원격 데스크톱)에서 RDP를 얻고 응용 프로그램을 어느 정도 사용하지만 xrdp 서비스가 오작동하는 경우가 있습니다. 특히 하루에 2~3회 이런 일이 많이 발생합니다.
다음 중 하나를 확인하면 sudo service xrdp status
항상 실패합니다. 특히 RDP 세션 관리자가 실패합니다.
* Checking status of Remote Desktop Protocol server xrdp [ok]
* Checking status of RDP Session Manager sesman [fail]
일반적으로 사용자가 제대로 작동하도록 하려면 시스템을 재부팅해야 합니다.
특정 xrdp 서비스를 다시 시작하거나 sudo xrdp-sesman -k
xrdp 서비스를 다시 시작하여 세션 관리자를 종료해도 시작되지 않습니다&따라서 사용자는 RDP 세션을 가질 수 없습니다..
그렇다면 서비스 실패의 가능한 원인을 찾는 방법/무엇이 있습니까?! ! !
편집: 로그 추가됨
다음은 두 가지 로그입니다./var/log/xrdp.log & /var/log/xrdp-sesman.log
==========================================================================
/var/log/xrdp.log (xrdp log messages)
When xrdp service status was FAILED & users can't take RDP, RDP was Hang ---->
[20180314-12:17:16] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20180314-12:17:16] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20180314-12:17:17] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20180314-12:17:17] [DEBUG] xrdp_mm_module_cleanup
[20180314-12:17:17] [INFO ] An established connection closed to endpoint: 127.0.0.1:3350 - socket: 11
[20180314-12:17:27] [DEBUG] returnvalue from xrdp_mm_connect 0
[20180314-12:17:27] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20180314-12:17:27] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20180314-12:17:28] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
Continues same above message
[20180314-12:17:56] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20180314-12:17:57] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20180314-12:17:57] [DEBUG] xrdp_mm_module_cleanup
[20180314-12:17:57] [INFO ] An established connection closed to endpoint: 127.0.0.1:3350 - socket: 11
[20180314-12:18:04] [DEBUG] returnvalue from xrdp_mm_connect 0
[20180314-12:18:48] [INFO ] An established connection closed to endpoint: XXX.XX.XX.X:YYYYY - socket: 8
[20180314-12:18:48] [DEBUG] xrdp_mm_module_cleanup
[20180314-12:18:48] [INFO ] An established connection closed to endpoint: 127.0.0.1:3350 - socket: 11
[20180314-12:18:48] [ERROR] Listening socket is in wrong state we terminate listener
[20180314-12:19:42] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XX.XXX.XX:YYYYY - socket: 8
[20180314-12:19:43] [DEBUG] xrdp_mm_module_cleanup
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XXX.XX.XX:YYYYY - socket: 12
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XXX.XX.XX:YYYYY - socket: 13
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XX.XX.X:YYYYY - socket: 8
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XXX.XXX.XX:YYYYY - socket: 8
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XXX.XXX.XX:YYYYY - socket: 8
[20180314-12:19:43] [DEBUG] xrdp_mm_module_cleanup
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XX.XX.XX:YYYYY - socket: 8
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.X.XX.XX:YYYYY - socket: 8
[20180314-12:19:43] [ERROR] Listening socket is in wrong state we terminate listener
[20180314-12:19:43] [DEBUG] xrdp_mm_module_cleanup
[20180314-12:19:43] [DEBUG] xrdp_mm_module_cleanup
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XXX.XX.XX:YYYYY - socket: 12
[20180314-12:19:43] [ERROR] Listening socket is in wrong state we terminate listener
[20180314-12:19:43] [ERROR] Listening socket is in wrong state we terminate listener
[20180314-12:19:43] [DEBUG] xrdp_mm_module_cleanup
[20180314-12:19:43] [DEBUG] xrdp_mm_module_cleanup
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XXX.XX.XX:YYYYY - socket: 13
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XXX.XX.XX:YYYYY - socket: 12
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XXX.XX.XX:YYYYY - socket: 12
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XXX.XX.XX:YYYYY - socket: 13
[20180314-12:19:43] [ERROR] Listening socket is in wrong state we terminate listener
[20180314-12:19:43] [INFO ] An established connection closed to endpoint: XXX.XXX.XX.XX:YYYYY - socket: 13
[20180314-12:19:43] [ERROR] Listening socket is in wrong state we terminate listener
[20180314-12:19:43] [ERROR] Listening socket is in wrong state we terminate listener
Manually done system reboot
After reboot xrdp service status was OK & users can take RDP ---->
[20180314-12:21:06] [INFO ] A connection received from: XXX.XX.XX.X port YYYYY
[20180314-12:21:06] [INFO ] An established connection closed to endpoint: XXX.XX.XX.X:YYYYY - socket: 8
[20180314-12:21:06] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20180314-12:21:06] [CORE ] WARNING: Invalid x.509 certificate path defined, default path will be used: /etc/xrdp/cert.pem
[20180314-12:21:06] [CORE ] WARNING: Invalid x.509 certificate path defined, default path will be used: /etc/xrdp/key.pem
[20180314-12:21:06] [DEBUG] xrdp_0000152e_wm_login_mode_event_00000001
[20180314-12:21:06] [WARN ] local keymap file for 0x0409 found and dosen't match built in keymap, using local keymap file
[20180314-12:21:12] [DEBUG] returnvalue from xrdp_mm_connect 0
[20180314-12:21:12] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20180314-12:21:12] [INFO ] lib_mod_log_peer: xrdp_pid=5422 connected to X11rdp_pid=5763 X11rdp_uid=1007 X11rdp_gid=1007 client_ip=XXX.XX.XX.X client_port=YYYYY
[20180314-12:21:12] [DEBUG] xrdp_mm_connect_chansrv: chansrvconnect successful
[20180314-12:21:12] [INFO ] An established connection closed to endpoint: 127.0.0.1:3350 - socket: 11
[20180314-12:21:13] [INFO ] The following channel is allowed: cliprdr (0)
[20180314-12:21:13] [INFO ] The following channel is allowed: rdpdr (1)
[20180314-12:21:13] [DEBUG] The allow channel list now initialized for this session
==========================================================================
/var/log/xrdp-sesman.log (Sesman log Messages)
When xrdp service status was FAILED & users can't take RDP, RDP was Hang---->
[20180314-12:17:27] [INFO ] A connection received from: 127.0.0.1 port 47441
[20180314-12:17:27] [INFO ] scp thread on sck 8 started successfully
[20180314-12:17:27] [INFO ] ++ reconnected session: username XXXXXX, display :15.0, session_pid 23908, ip XXX.XX.XX.X:YYYYY - socket: 8
[20180314-12:17:27] [INFO ] An established connection closed to endpoint: 127.0.0.1:47441 - socket: 8
[20180314-12:17:42] [INFO ] shutting down sesman 1
[20180314-12:17:42] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20180314-12:17:42] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20180314-12:17:51] [WARN ] [init:46] libscp initialized
[20180314-12:17:51] [CORE ] starting sesman with pid 16164
[20180314-12:17:51] [INFO ] listening...
[20180314-12:17:51] [ERROR] bind error on port '3350': 98 (Address already in use)
[20180314-12:17:51] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20180314-12:19:43] [INFO ] shutting down sesman 1
[20180314-12:19:43] [INFO ] shutting down sesman 1
[20180314-12:19:43] [INFO ] shutting down sesman 1
[20180314-12:19:43] [INFO ] shutting down sesman 1
Manually done system reboot
After reboot xrdp service status was OK & users can take RDP ---->
[20180314-12:20:36] [WARN ] [init:46] libscp initialized
[20180314-12:20:36] [CORE ] starting sesman with pid 2896
[20180314-12:20:36] [INFO ] listening...
[20180314-12:21:12] [INFO ] A connection received from: 127.0.0.1 port 52106
[20180314-12:21:12] [INFO ] scp thread on sck 8 started successfully
[20180314-12:21:12] [INFO ] ++ created session (access granted): username XXXXXX, ip XXX.XX.XX.X:38916 - socket: 8
[20180314-12:21:12] [INFO ] starting X11rdp session...
[20180314-12:21:12] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9
[20180314-12:21:12] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9
[20180314-12:21:12] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9
[20180314-12:21:12] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9
[20180314-12:21:12] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9
[20180314-12:21:12] [INFO ] An established connection closed to endpoint: 127.0.0.1:52106 - socket: 8
[20180314-12:21:12] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20180314-12:21:12] [INFO ] An established connection closed to endpoint: 127.0.0.1:52106 - socket: 8
[20180314-12:21:12] [INFO ] X11rdp :11 -geometry 800x600 -depth 24 -bs -ac -nolisten tcp -uds -once
[20180314-12:21:12] [INFO ] starting xrdp-sessvc - xpid=5763 - wmpid=5762
==========================================================================