LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 09-26-2016, 03:14 PM   #1
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Centos 7 and xrdp


So I have installed Centos 7 and wanted to be able to remote into it. So I installed according to this document:

Install xrdp on CentOS 7 / RHEL 7

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?

Thanks.
 
Old 09-27-2016, 09:32 AM   #2
end
Member
 
Registered: Aug 2016
Posts: 266

Rep: Reputation: Disabled
re

maybe vnc didnt disconnect property from first login. try restart vnc service beafore second login
 
Old 09-27-2016, 10:45 AM   #3
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249

Original Poster
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
End, thanks for your reply.

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.
 
Old 09-27-2016, 10:56 AM   #4
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Check /var/log files for xrdp entries. You can use

Code:
grep -irl xrdp /bar/log
 
Old 09-27-2016, 12:21 PM   #5
end
Member
 
Registered: Aug 2016
Posts: 266

Rep: Reputation: Disabled
re

sorry you write my answer in your qestion i didnt notice.

only thing cross my mind is that with second login vnc try use different port 5911 insted 5910.

try edit etc/X11/xorg.conf

Section "Module"
Load "vnc"
EndSection

Last edited by end; 09-27-2016 at 12:26 PM.
 
Old 09-27-2016, 12:50 PM   #6
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249

Original Poster
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Thnx sag47.

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
What am I missing?
 
Old 09-29-2016, 10:22 AM   #7
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Seems another user experiences your issue with similar logs. A solution is documented at the bottom. https://github.com/neutrinolabs/xrdp/issues/284

See also https://sourceforge.net/p/xrdp/bugs/54/#108d

If you're comfortable building from source then apply that patch as a more elegant fix.

Last edited by sag47; 09-29-2016 at 10:24 AM.
 
Old 09-29-2016, 01:35 PM   #8
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249

Original Poster
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
sag47 Thank you kindly. This has fixed my issues.
 
Old 10-01-2016, 12:08 PM   #9
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Awesome! Glad you resolved it. Which solution specifically resolved it for you?

Last edited by sag47; 10-01-2016 at 12:09 PM.
 
Old 10-02-2016, 12:54 AM   #10
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249

Original Poster
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
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.
 
Old 10-02-2016, 04:14 PM   #11
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Quote:
Originally Posted by lazydog View Post
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.

TL;DR is you almost always want to give the process a chance to save and clean itself up. Only use SIGKILL as the last resort nuclear bomb option. See also http://tldp.org/LDP/Bash-Beginners-G...ect_12_01.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xrdp from windows into centos 7 sigint-ninja Linux - Newbie 4 01-28-2016 06:22 PM
[HELP] XRDP not working CentOS reneg4d3 Red Hat 0 03-04-2014 11:44 PM
[SOLVED] xrdp-v0.6.0 RHEL 6.4 Workstation. xrdp loaded started with sesman, but cannot connect capperdog Linux - Newbie 4 02-04-2014 02:56 PM
Can't Connect to CentOS server using XRDP Altiris Linux - Software 2 05-27-2013 02:59 AM
XRDP issue on Centos 6 ovod88 Linux - Newbie 8 08-15-2012 01:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 09:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration