xrdp 服务和 rdp 会话管理器失败的可能原因有哪些?

xrdp 服务和 rdp 会话管理器失败的可能原因有哪些?

我已在其中一台 lubuntu 14.04 服务器上安装了 xrdp,并在同一服务器上创建了 40-50 个用户,以通过 RDP 访问特定应用程序。

所有用户都成功地从 mstsc.exe(Windows 远程桌面)获取 RDP 并在一定程度上使用应用程序,但有时 xrdp 服务行为不当,这种情况会发生很多次,特别是每天两次/三次。

当我检查 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

==========================================================================

相关内容