lubuntu 14.04サーバーの1つにxrdpをインストールし、RDPを介して特定のアプリケーションにアクセスするために、同じサーバー上に40〜50人のユーザーを作成しました。
すべてのユーザーは正常にmstsc.exe(Windowsリモートデスクトップ)からRDPを取得し、アプリケーションをある程度使用しますが、xrdpサービスが誤動作することがあります。特に1日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セッションを持つことはできません。。
それでは、サービス障害の考えられる原因を見つける方法/何がありますか?! ! !
編集:ログが追加されました
以下は2つのログです。/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
==========================================================================