xrdp dies when starting at boot time

Bug #339032 reported by Martin Jackson
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xrdp (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Jaunty by Martin Jackson
Nominated for Karmic by ItFinallyWorks

Bug Description

When rebooting in jaunty, xrdp leaves a pid file in /var/run/xrdp but is not running when I can actually ssh into the machine. sesman is running fine. This means that I have to manually clear the pidfile (/etc/init.d/xrdp doesn't check this) and restart the xrdp service. The reason I noticed it was that I have a nagios server monitoring the xrdp service (TCP port 3389) and it got connection refused. Notice also that xrdp starts fine under Intrepid.

xrdp (0.4.0~dfsg-9), i386

Expected results: Service restarts and RDP clients can connect

Actual results: RDP clients got connection refused errors

Revision history for this message
ItFinallyWorks (a-c-programmer) wrote :

Same problem here, but even if the init.d script is modified to clear the pid files, the server doesn't start properly on its own. After clearing sesman.log, after a reboot, the contents of sesman.log are
[20090530-00:59:49] [INFO ] starting signal handling thread...
[20090530-00:59:49] [INFO ] signal handler thread started successfully
[20090530-00:59:49] [CORE ] starting sesman with pid 2353
[20090530-00:59:49] [INFO ] listening...

Also, the relevant processes are
$ ps -A | grep sesman
 2353 ? 00:00:00 sesman
$ ps -A | grep xrdp
$

So it appears xrdp is not starting (or is shutting down), but sesman is running ok.

Not surprisingly, xrdp does not work - connection refused.

If xrdp is then restarted manually:
$ ps -A | grep sesman
 3303 pts/0 00:00:00 sesman
$ ps -A | grep xrdp
 3301 pts/0 00:00:00 xrdp
$ cat /var/log/sesman.log
[20090530-00:59:49] [INFO ] starting signal handling thread...
[20090530-00:59:49] [INFO ] signal handler thread started successfully
[20090530-00:59:49] [CORE ] starting sesman with pid 2353
[20090530-00:59:49] [INFO ] listening...
[20090530-01:05:52] [INFO ] shutting down sesman 1
[20090530-01:05:52] [INFO ] starting signal handling thread...
[20090530-01:05:52] [INFO ] signal handler thread started successfully
[20090530-01:05:52] [CORE ] starting sesman with pid 3303
[20090530-01:05:52] [INFO ] listening...

xrdp works - I can login remotely.

Revision history for this message
ItFinallyWorks (a-c-programmer) wrote :

After encountering the keyboard issue (https://bugs.launchpad.net/ubuntu/+source/xrdp/+bug/320393) I think these might be related since fixing that issue with the workaround given for the referenced bug seems to fix this one.

Revision history for this message
ItFinallyWorks (a-c-programmer) wrote :

Ignore the above - gconf settings for one person shouldn't be able to do this. But oddly enough the problem seems to have disappeared for me, not sure why - maybe an update fixed it?

Revision history for this message
Zoran Nasev (nasevz) wrote :

I have the same problem on my office computer, but not on my home computer even if both of them have updated jaunty. The only difference in installing was while testing xrdp on my office computer I installed it with vnc4server as dependency. When I found that tightvnc is better supported, I uninstalled vnc4sever and installed tightvnc. On my home computer I installed xrdp with tightvnc and had no problem.

Revision history for this message
Brent (brent-hughes11) wrote :

I had the same problem. xrdp wouldn't stay running from the startup scripts, but if I logged in I could run it manually with no problems. After a few days of trying everything I could think of I stumbled upon a solution. Putting a delay at the end of /etc/init.d/xrdp seems to do the trick. I added "sleep 20" just before the exit statement and it works fine (sleep 10 didn't). Perhaps xrdp takes a few seconds to get going and is sensitive to the calling script exiting during this time. I had this issue in Xubuntu 9.04 but not in Titan LEV 9.04, both tested on the same hardware. Perhaps the bulkier Titan distro has enough going on during startup to slow it down enough on its own.

Revision history for this message
Martin Jackson (mhjacks) wrote :

That is useful information! I'll give it a try and post the results here. Thanks!

Revision history for this message
Federico (makexy) wrote :

Please fix!
Thanx.

Revision history for this message
Martin Jackson (mhjacks) wrote :

It seems to be working correctly for Maverick i386 and amd64 now.

Revision history for this message
Carl Vancil (twist-f) wrote :

I ran into this same problem. I checked over my sesman.ini file, and found that the problem disappeared after a changed the ip-binding back to 127.0.0.1. Apparently, it's a misconception on the part of some (including myself) that the ip-binding needs to match that of the static-eth0 address.

Anyway, try setting the listen address within sesman.ini to 127.0.0.1, the with sesman and xrdp killed and the pids cleared, try a start, then a stop, then check the pid directory again to verify whether the pid cleared or not.

This worked for me on Ubuntu server 10.04.4.

Revision history for this message
penalvch (penalvch) wrote :
Changed in xrdp (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.