Debian Bug report logs - #654788
xrdp: Fail to connect after login on first try, succeed on the second

version graph

Package: xrdp; Maintainer for xrdp is Vincent Bernat <bernat@debian.org>; Source for xrdp is src:xrdp.

Reported by: Petter Reinholdtsen <pere@hungry.com>

Date: Thu, 5 Jan 2012 19:21:02 UTC

Severity: important

Found in version xrdp/0.5.0~20100303cvs-6

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Vincent Bernat <bernat@debian.org>:
Bug#654788; Package xrdp. (Thu, 05 Jan 2012 19:21:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
New Bug report received and forwarded. Copy sent to Vincent Bernat <bernat@debian.org>. (Thu, 05 Jan 2012 19:21:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: submit@bugs.debian.org
Subject: xrdp: Fail to connect after login on first try, succeed on the second
Date: Thu, 05 Jan 2012 20:19:46 +0100
Package: xrdp
Version: 0.5.0~20100303cvs-6 
Severity: important
User: debian-edu@lists.debian.org
Usertags: debian-edu

In Debian Edu/Squeeze, we install xrdp in the Thin-Client-Server
profile.  When I set up a combined Main-Server+Thin-Client-Server log in
as the localadmin user and start 'rdesktop tjener', the login prompt
show up and I enter the password, but the RPD session do not start
properly.  These are the messages shown in the rdesktop window when the
connection fail:

  connecting to sesman ip 127.0.0.1 port 3350
  sesman connect ok
  sending login info to sesman
  xrdp_mm_process_login_response: login successful for display
  started connecting
  connecting to 127.0.0.5910
  error - problem connecting

When I press OK, the rdesktop session teminates.  When I try to log in
again, the login work fine.  I suspect this problem is a race condition,
where creating the vnc session actually worked but something tried to
connect "too early" and caused this failure.  The reason is that when I
tested the last time, I could hear the KDE login sound some time after I
tried to log in, but before I was able to try to log in again.

The machine I test on is rather old (Dell Latitude D505 - more than 7
years old), and do not have a lot of memory.  Could the machine speed be
related to the failure?

If you want to test this yourself, it is possible to install Debian Edu
on a virtual machine to give it a go.  Let me know if you want to do
that and I'll guide you through the process. :)
-- 
Happy hacking
Petter Reinholdtsen




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#654788; Package xrdp. (Sat, 07 Jan 2012 13:33:23 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincent Bernat <bernat@debian.org>:
Extra info received and forwarded to list. (Sat, 07 Jan 2012 13:33:25 GMT) Full text and rfc822 format available.

Message #10 received at 654788@bugs.debian.org (full text, mbox):

From: Vincent Bernat <bernat@debian.org>
To: Petter Reinholdtsen <pere@hungry.com>
Cc: 654788@bugs.debian.org
Subject: Re: Bug#654788: xrdp: Fail to connect after login on first try, succeed on the second
Date: Sat, 07 Jan 2012 14:31:15 +0100
[Message part 1 (text/plain, inline)]
OoO Pendant  le journal télévisé du  jeudi 05 janvier  2012, vers 20:19,
Petter Reinholdtsen <pere@hungry.com> disait :

> In Debian Edu/Squeeze, we install xrdp in the Thin-Client-Server
> profile.  When I set up a combined Main-Server+Thin-Client-Server log in
> as the localadmin user and start 'rdesktop tjener', the login prompt
> show up and I enter the password, but the RPD session do not start
> properly.  These are the messages shown in the rdesktop window when the
> connection fail:

>   connecting to sesman ip 127.0.0.1 port 3350
>   sesman connect ok
>   sending login info to sesman
>   xrdp_mm_process_login_response: login successful for display
>   started connecting
>   connecting to 127.0.0.5910
>   error - problem connecting

> When I press OK, the rdesktop session teminates.  When I try to log in
> again, the login work fine.  I suspect this problem is a race condition,
> where creating the vnc session actually worked but something tried to
> connect "too early" and caused this failure.  The reason is that when I
> tested the last time, I could hear the KDE login sound some time after I
> tried to log in, but before I was able to try to log in again.

> The machine I test on is rather old (Dell Latitude D505 - more than 7
> years old), and do not have a lot of memory.  Could the machine speed be
> related to the failure?

xrdp will start Xvnc and will check if it is running by checking for the
existence of /tmp/.X11-unix/X%d exists. It seems possible that Xvnc will
start an  X server listening to  this socket before VNC  is listening to
the appropriate port.

In  sesman/session.c,  look at  wait_for_xserver()  function. Maybe  you
could add g_sleep(1000) at the end of the function? Or check if there is
something listening at  the correct port (but this  is more tricky since
you can't bind to the port, otherwise, you risk to steal it from Xvnc).

Which Xvnc server are you using?
-- 
Vincent Bernat ☯ http://vincent.bernat.im

panic("aha1740.c"); /* Goodbye */
	2.2.16 /usr/src/linux/drivers/scsi/aha1740.c
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Vincent Bernat <bernat@debian.org>:
Bug#654788; Package xrdp. (Sun, 08 Jan 2012 04:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
Extra info received and forwarded to list. Copy sent to Vincent Bernat <bernat@debian.org>. (Sun, 08 Jan 2012 04:03:03 GMT) Full text and rfc822 format available.

Message #15 received at 654788@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: 654788@bugs.debian.org
Subject: Re: Bug#654788: xrdp: Fail to connect after login on first try, succeed on the second
Date: Sun, 08 Jan 2012 05:00:43 +0100
[Vincent Bernat]
> In sesman/session.c, look at wait_for_xserver() function. Maybe you
> could add g_sleep(1000) at the end of the function? Or check if there
> is something listening at the correct port (but this is more tricky
> since you can't bind to the port, otherwise, you risk to steal it from
> Xvnc).

I'll have a look when I am back with the machine next week.

> Which Xvnc server are you using?

I'm using vnc4server.
-- 
Happy hacking
Petter Reinholdtsen




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 07:38:51 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.