CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So far so good. I can log in without issues. The problem starts when I try to exit and then log in again. I get the following on the second login:
Code:
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to session manager, please wait...
xrdp_mm_process_login_responce: login successful for display 10
VNC started connecting
Waiting 2000 ms for VNC to start...
VNC connecting to 127.0.0.1 5910
VNC error - problem connecting
some problem
Was looking on the web but nothing really addressed this issue. Sure I found a few sites that talked about closing the connection without logging out but I logged out everything. The only way to be able to use VNC was to restart the service.
Anyone know what I might be missing or where to look to fix this?
Yes, restarting VNC does fix the problem but I cannot continue to restart the service every time someone finishes working on the system.
I'm wondering why this is happening and if there is a fix I could try. Luckily for me I'm the only one using it right now and I have Ad,min rights to the system but when it goes live it's going to be a problem.
Here is what I'm seeing in the log for today. I restarted the service and connected.
xrdp.log
Code:
[20160927-13:41:40] [INFO ] A connection received from: 10.5.33.15 port 34842
[20160927-13:41:40] [INFO ] An established connection closed to endpoint: 10.5.33.15:34842 - socket: 8
[20160927-13:41:40] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20160927-13:41:40] [CORE ] WARNING: Invalid x.509 certificate path defined, default path will be used: /etc/xrdp/cert.pem
[20160927-13:41:40] [WARN ] Invalid X.509 certificate path defined, default path will be used: /etc/xrdp/key.pem
[20160927-13:41:40] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 8
[20160927-13:41:40] [ERROR] Listening socket is in wrong state we terminate listener
[20160927-13:41:42] [INFO ] A connection received from: 10.5.33.15 port 34843
[20160927-13:41:42] [INFO ] An established connection closed to endpoint: 10.5.33.15:34843 - socket: 8
[20160927-13:41:42] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20160927-13:41:42] [CORE ] WARNING: Invalid x.509 certificate path defined, default path will be used: /etc/xrdp/cert.pem
[20160927-13:41:42] [WARN ] Invalid X.509 certificate path defined, default path will be used: /etc/xrdp/key.pem
[20160927-13:41:42] [DEBUG] xrdp_00005cde_wm_login_mode_event_00000001
[20160927-13:41:42] [WARN ] local keymap file for 0x0409 found and dosen't match built in keymap, using local keymap file
[20160927-13:41:50] [DEBUG] returnvalue from xrdp_mm_connect 0
[20160927-13:41:52] [INFO ] The following channel is allowed: rdpdr (0)
[20160927-13:41:53] [INFO ] The following channel is allowed: rdpsnd (1)
[20160927-13:41:53] [INFO ] The following channel is allowed: cliprdr (2)
[20160927-13:41:53] [INFO ] The following channel is allowed: drdynvc (3)
[20160927-13:41:53] [DEBUG] The allow channel list now initialized for this session
[20160927-13:41:53] [DEBUG] xrdp_mm_connect_chansrv: chansrvconnect successful
[20160927-13:41:53] [INFO ] An established connection closed to endpoint: 127.0.0.1:3350 - socket: 11
[20160927-13:42:20] [INFO ] An established connection closed to endpoint: 109.112.47.46:12148 - socket: 13
[20160927-13:42:20] [INFO ] An established connection closed to endpoint: 10.5.33.15:34843 - socket: 8
[20160927-13:42:20] [DEBUG] xrdp_mm_module_cleanup
[20160927-13:42:20] [DEBUG] VNC mod_exit
[20160927-13:42:20] [INFO ] An established connection closed to endpoint: 127.0.0.1:5910 - socket: 12
[20160927-13:42:20] [ERROR] Listening socket is in wrong state we terminate listener
xrdp-sesman.log
Code:
[20160927-13:41:05] [INFO ] A connection received from: 127.0.0.1 port 32912
[20160927-13:41:05] [INFO ] scp thread on sck 8 started successfully
[20160927-13:41:05] [INFO ] ++ reconnected session: username robert, display :10.0, session_pid 21324, ip 10.5.33.15:34835 - socket: 8
[20160927-13:41:05] [INFO ] An established connection closed to endpoint: 127.0.0.1:32912 - socket: 8
[20160927-13:41:30] [INFO ] shutting down sesman 1
[20160927-13:41:30] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20160927-13:41:30] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20160927-13:41:30] [CORE ] shutting down log subsystem...
[20160927-13:41:31] [WARN ] [init:46] libscp initialized
[20160927-13:41:31] [CORE ] starting sesman with pid 23763
[20160927-13:41:31] [INFO ] listening...
[20160927-13:41:50] [INFO ] A connection received from: 127.0.0.1 port 33134
[20160927-13:41:50] [INFO ] scp thread on sck 8 started successfully
[20160927-13:41:50] [INFO ] ++ created session (access granted): username robert, ip 10.5.33.15:34843 - socket: 8
[20160927-13:41:50] [INFO ] starting Xvnc session...
[20160927-13:41:50] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9
[20160927-13:41:50] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9
[20160927-13:41:50] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9
[20160927-13:41:50] [INFO ] An established connection closed to endpoint: 127.0.0.1:33134 - socket: 8
[20160927-13:41:50] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20160927-13:41:51] [INFO ] An established connection closed to endpoint: 127.0.0.1:33134 - socket: 8
[20160927-13:41:51] [ERROR] env_set_user: error creating .vnc dir
[20160927-13:41:51] [INFO ] Xvnc :10 -geometry 1920x1080 -depth 24 -rfbauth /home/robert/.vnc/sesman_robert_passwd -bs -nolisten tcp -localhost -dpi 96
[20160927-13:41:51] [INFO ] starting xrdp-sessvc - xpid=23782 - wmpid=23781
[20160927-13:42:20] [INFO ] ++ terminated session: username robert, display :10.0, session_pid 23780, ip 10.5.33.15:34843 - socket: 8
Then I attempted to login again and seen the following in the logs:
xrdp.log
Code:
[20160927-13:45:27] [INFO ] A connection received from: 10.5.33.15 port 34882
[20160927-13:45:27] [INFO ] An established connection closed to endpoint: 10.5.33.15:34882 - socket: 8
[20160927-13:45:27] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20160927-13:45:27] [CORE ] WARNING: Invalid x.509 certificate path defined, default path will be used: /etc/xrdp/cert.pem
[20160927-13:45:27] [WARN ] Invalid X.509 certificate path defined, default path will be used: /etc/xrdp/key.pem
[20160927-13:45:27] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 8
[20160927-13:45:27] [ERROR] Listening socket is in wrong state we terminate listener
[20160927-13:45:28] [INFO ] A connection received from: 10.5.33.15 port 34884
[20160927-13:45:28] [INFO ] An established connection closed to endpoint: 10.5.33.15:34884 - socket: 8
[20160927-13:45:28] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20160927-13:45:28] [CORE ] WARNING: Invalid x.509 certificate path defined, default path will be used: /etc/xrdp/cert.pem
[20160927-13:45:28] [WARN ] Invalid X.509 certificate path defined, default path will be used: /etc/xrdp/key.pem
[20160927-13:45:29] [DEBUG] xrdp_00006289_wm_login_mode_event_00000001
[20160927-13:45:29] [WARN ] local keymap file for 0x0409 found and dosen't match built in keymap, using local keymap file
[20160927-13:45:36] [DEBUG] returnvalue from xrdp_mm_connect 0
[20160927-13:45:39] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20160927-13:45:40] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20160927-13:45:41] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20160927-13:45:42] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20160927-13:45:43] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20160927-13:45:44] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20160927-13:45:45] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20160927-13:45:46] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20160927-13:45:47] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20160927-13:45:49] [DEBUG] VNC Error after security negotiation
[20160927-13:45:49] [DEBUG] VNC error before sending share flag
[20160927-13:45:49] [DEBUG] VNC error before receiving server init
[20160927-13:45:49] [DEBUG] VNC error before receiving pixel format
[20160927-13:45:49] [DEBUG] VNC error before receiving name length
[20160927-13:45:49] [DEBUG] VNC error before receiving name
[20160927-13:45:49] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
[20160927-13:45:49] [DEBUG] xrdp_mm_module_cleanup
[20160927-13:45:49] [DEBUG] VNC mod_exit
[20160927-13:45:49] [INFO ] An established connection closed to endpoint: 127.0.0.1:3350 - socket: 11
[20160927-13:45:53] [INFO ] An established connection closed to endpoint: 10.5.33.15:34884 - socket: 8
[20160927-13:45:53] [DEBUG] xrdp_mm_module_cleanup
[20160927-13:45:53] [ERROR] Listening socket is in wrong state we terminate listener
xrdp-sesman.log
Code:
[20160927-13:45:36] [INFO ] A connection received from: 127.0.0.1 port 33146
[20160927-13:45:36] [INFO ] scp thread on sck 8 started successfully
[20160927-13:45:36] [INFO ] ++ created session (access granted): username robert, ip 10.5.33.15:34884 - socket: 8
[20160927-13:45:36] [INFO ] starting Xvnc session...
[20160927-13:45:36] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9
[20160927-13:45:36] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9
[20160927-13:45:36] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9
[20160927-13:45:36] [INFO ] An established connection closed to endpoint: 127.0.0.1:33146 - socket: 8
[20160927-13:45:36] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7
[20160927-13:45:36] [INFO ] An established connection closed to endpoint: 127.0.0.1:33146 - socket: 8
[20160927-13:45:36] [ERROR] env_set_user: error creating .vnc dir
[20160927-13:45:36] [INFO ] Xvnc :10 -geometry 1920x1080 -depth 24 -rfbauth /home/robert/.vnc/sesman_robert_passwd -bs -nolisten tcp -localhost -dpi 96
[20160927-13:45:37] [INFO ] starting xrdp-sessvc - xpid=25232 - wmpid=25231
I used the first solution to get things working. Only drawback is if you are ssh'ed in at the same time as you are rdpx'ed in and quite rdpx you will lose the ssh session also. Not a deal breaker for me at this time though. Thanks again.
I used the first solution to get things working. Only drawback is if you are ssh'ed in at the same time as you are rdpx'ed in and quite rdpx you will lose the ssh session also. Not a deal breaker for me at this time though. Thanks again.
You can tell the difference between the two environments (rdp vs ssh) by checking what environment variables are set between the two. Use env command and log both scenarios to check the difference. You can make the ssh scenario benign.
Additionally, you should not use killall -9 (aka SIGKILL) but instead should use killall -15 (aka SIGTERM). The latter offers xrdp the chance to gracefully shutdown and clean up its state. If SIGTERM doesn't work then you should use SIGHUP (killall -1) or SIGINT (killall -2) before resorting to SIGKILL.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.