Bug#840132: xrdp-sesman.service sometimes fails to start on boot
Since so many people are involved in this bug, please can we have an update from any of you. Do you still encounter the reported problem with current versions? Best, Alex
Bug#840132: xrdp-sesman.service sometimes fails to start on boot
On Mon, Mar 06, 2017 at 06:06:19AM +, David Gilmour wrote: > On Tue, 28 Feb 2017 15:07:39 +0100 Paul van Tilburgwrote: > > I have updated the xrdp.service unit locally and that seems to fix it > > (see attached file). > > > > The changes are: > > > > --- /lib/systemd/system/xrdp.service2017-01-25 18:10:11.0 > > +0100 > > +++ /etc/systemd/system/xrdp.service2017-02-28 15:07:01.130060204 > > +0100 > > @@ -1,8 +1,7 @@ > >[Unit] > >Description=xrdp daemon > >Documentation=man:xrdp(8) man:xrdp.ini(5) > > -Requires=xrdp-sesman.service > > -After=network.target xrdp-sesman.service > > +After=network-online.target > > Paul, unfortunately it didn’t seem to work for me: > > root@pod:/home/david# systemctl status xrdp > > ● xrdp.service - xrdp daemon > >Loaded: loaded (/etc/systemd/system/xrdp.service; enabled; vendor preset: > enabled) >Active: failed (Result: resources) since Sun 2017-03-05 21:39:49 PST; 56s > ago > Docs: man:xrdp(8) >man:xrdp.ini(5) > Process: 873 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/ > SUCCESS) > Process: 849 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, > status=0/SUCCESS) > > Mar 05 21:39:46 pod systemd[1]: Starting xrdp daemon... > Mar 05 21:39:46 pod systemd[1]: xrdp.service: PID file /run/xrdp/xrdp.pid not > readable (yet?) after start: No such file or directory > Mar 05 21:39:48 pod xrdp[1119]: (1119)(139942974253888)[INFO ] starting xrdp > with pid 1119 > Mar 05 21:39:49 pod xrdp[1119]: (1119)(139942974253888)[ERROR] > xrdp_listen_main_loop: listen error, possible port already in use > Mar 05 21:39:49 pod xrdp[1119]: (1119)(139942974253888)[DEBUG] Closed socket > 11 (AF_INET6 :: port 0) The above is strange. So even after the network-online target, there is still something that prevents XRDP for listening on its required port. After a few seconds it seems settled and you can start XRDP. If I search for this error online, there are many issues reported about this error message, so I'm not sure if this a different problem. Do you get the same error with the upstream systemd unit. About xrdp-sesman, it also fails because it cannot listen on a port, weird. Something is awry in the network implementation here that doesn't bother other daemons. Do you also use NetworkManager or a different network configuration stack? Kind regards, Paul -- Using the Power of Debian GNU/Linux | E-mail: pau...@debian.org Jabber/XMPP: p...@luon.net | GnuPG key ID: 0x50064181
Bug#840132: xrdp-sesman.service sometimes fails to start on boot
On Tue, 28 Feb 2017 15:07:39 +0100 Paul van Tilburgwrote: > Hi! > > I have been struggling with the same issues. Because we want to offer a > GNOME desktop, NetworkManager is installed. The way it configures the > network might reveal an issue in xrdp itself. > > I have updated the xrdp.service unit locally and that seems to fix it > (see attached file). > > The changes are: > > --- /lib/systemd/system/xrdp.service2017-01-25 18:10:11.0 +0100 > +++ /etc/systemd/system/xrdp.service2017-02-28 15:07:01.130060204 +0100 > @@ -1,8 +1,7 @@ >[Unit] >Description=xrdp daemon >Documentation=man:xrdp(8) man:xrdp.ini(5) > -Requires=xrdp-sesman.service > -After=network.target xrdp-sesman.service > +After=network-online.target > >[Service] >Type=forking > > The after requirement on network-online.target is not how it should be, > but it seems necessary for xrdp to start. The require on xrdp-sesman is > not necessary at all (given that xrdp-sesman.service binds to > xrdp.service), so I dropped that. > > Paul > > -- > Using the Power of Debian GNU/Linux | E-mail: pau...@debian.org > Jabber/XMPP: p...@luon.net | GnuPG key ID: 0x50064181 Paul, unfortunately it didn’t seem to work for me: root@pod:/home/david# systemctl status xrdp ● xrdp.service - xrdp daemon Loaded: loaded (/etc/systemd/system/xrdp.service; enabled; vendor preset: enabled) Active: failed (Result: resources) since Sun 2017-03-05 21:39:49 PST; 56s ago Docs: man:xrdp(8) man:xrdp.ini(5) Process: 873 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS) Process: 849 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS) Mar 05 21:39:46 pod systemd[1]: Starting xrdp daemon... Mar 05 21:39:46 pod systemd[1]: xrdp.service: PID file /run/xrdp/xrdp.pid not readable (yet?) after start: No such file or directory Mar 05 21:39:48 pod xrdp[1119]: (1119)(139942974253888)[INFO ] starting xrdp with pid 1119 Mar 05 21:39:49 pod xrdp[1119]: (1119)(139942974253888)[ERROR] xrdp_listen_main_loop: listen error, possible port already in use Mar 05 21:39:49 pod xrdp[1119]: (1119)(139942974253888)[DEBUG] Closed socket 11 (AF_INET6 :: port 0) Mar 05 21:39:49 pod systemd[1]: xrdp.service: Daemon never wrote its PID file. Failing. Mar 05 21:39:49 pod systemd[1]: Failed to start xrdp daemon. Mar 05 21:39:49 pod systemd[1]: xrdp.service: Unit entered failed state. Mar 05 21:39:49 pod systemd[1]: xrdp.service: Failed with result 'resources'. root@pod:/home/david# systemctl status xrdp-sesman ● xrdp-sesman.service - xrdp session manager Loaded: loaded (/lib/systemd/system/xrdp-sesman.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2017-03-05 21:39:47 PST; 1min 7s ago Docs: man:xrdp-sesman(8) man:sesman.ini(5) Process: 1126 ExecStop=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --kill (code=exited, status=1/FAILURE) Process: 852 ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS (code=exited, status=0/SUCCESS) Main PID: 1120 (code=exited, status=0/SUCCESS) Mar 05 21:39:46 pod systemd[1]: Starting xrdp session manager... Mar 05 21:39:46 pod xrdp-sesman[852]: (852)(140554723779904)[DEBUG] libscp initialized Mar 05 21:39:47 pod xrdp-sesman[1120]: (1120)(140554723779904)[INFO ] starting xrdp-sesman with pid 1120 Mar 05 21:39:47 pod systemd[1]: Started xrdp session manager. Mar 05 21:39:47 pod xrdp-sesman[1120]: (1120)(140554723779904)[ERROR] bind error on port '3350': 22 (Invalid argument) Mar 05 21:39:47 pod xrdp-sesman[1120]: (1120)(140554723779904)[DEBUG] Closed socket 7 (AF_INET6 :: port 0) Mar 05 21:39:47 pod systemd[1]: xrdp-sesman.service: Control process exited, code=exited status=1 Mar 05 21:39:47 pod systemd[1]: xrdp-sesman.service: Unit entered failed state. Mar 05 21:39:47 pod systemd[1]: xrdp-sesman.service: Failed with result 'exit-code'. root@pod:/home/david# systemctl restart xrdp root@pod:/home/david# systemctl restart xrdp-sesman root@pod:/home/david# systemctl status xrdp ● xrdp.service - xrdp daemon Loaded: loaded (/etc/systemd/system/xrdp.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2017-03-05 21:41:02 PST; 10s ago Docs: man:xrdp(8) man:xrdp.ini(5) Process: 1724 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS) Process: 1715 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS) Main PID: 1726 (xrdp) Tasks: 1 (limit: 4915) CGroup: /system.slice/xrdp.service └─1726 /usr/sbin/xrdp Mar 05 21:41:01 pod systemd[1]: Starting xrdp daemon... Mar 05 21:41:01 pod systemd[1]: xrdp.service: PID file /run/xrdp/xrdp.pid not readable (yet?) after start: No such file or directory Mar 05 21:41:02 pod systemd[1]: Started xrdp daemon. Mar 05 21:41:03 pod xrdp[1726]: (1726)(139798253062976)[INFO
Bug#840132: xrdp-sesman.service sometimes fails to start on boot
Yes, I can confirm the problem occurs on 0.9.1-1. I don't think it's a local configuration problem. Network and Network online targets both are reached before the libvirtd.service starts. Indeed, libvirtd.service declares that it must run after Network target is achieved. But it then goes on to do things that appear to disrupt the network. I cannot establish for sure that these are what causes xrdp to fail to start without debugging xrdp, which I am not in a position to do. It seems to me that Network target semantics are not rich or specific enough to cover the virtual host case completely - if so, this is an issue that is larger than xrdp of course. But knowing this, it also seems that xrdp could insulate itself against transient errors that might occur during initialization. Also, I imagine that the test cases for xrdp should include configurations where libvirtd is running. Hope that helps. Cheers, David
Bug#840132: xrdp-sesman.service sometimes fails to start on boot
Hi, > One thing possibly interesting about both systems is that they are both > kvm hosts. After each system reaches network.target, the dependency for > starting xrdp in systemd, quite a bit of subsequent network > configuration takes place: So why is network.target reached, then? This seems to be a local configuration issue. What you report looks related to some issues we had when IPv6 was enabled but no addresses configured (not even link-local). In any case, there have been related changes, and I am not sure whether they fix that for you or not. Can you please test with 0.9.1-1 and report back? Cheers, Nik -- PGP-Fingerprint: 3C9D 54A4 7575 C026 FB17 FD26 B79A 3C16 A0C4 F296 Dominik George · Hundeshagenstr. 26 · 53225 Bonn Mobile: +49-1520-1981389 · https://www.dominik-george.de/ Teckids e.V. · FrOSCon e.V. Fellowship of the FSFE · Piratenpartei Deutschland Opencaching Deutschland e.V. · Debian Maintainer LPIC-3 Linux Enterprise Professional (Security) signature.asc Description: PGP signature
Bug#840132: xrdp-sesman.service sometimes fails to start on boot
Package: xrdp Followup-For: Bug #840132 Dear Maintainer, I have two systems on which xrdp fails to start at boot. On both systems, subsequently running "systemctl start xrdp" always succeeds, and if it is followed by "systemctl start xrdp-sesman", xrdp functions normally and accepts sessions. The systemd error report immediately after boot (before the successful manual start) is as follows: ● xrdp.service - xrdp (X Remote Desktop Protocol) protocol server Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled) Active: inactive (dead) since Mon 2016-12-26 19:26:54 PST; 40min ago Docs: man:xrdp(8) man:xrdp.ini(5) Process: 1166 ExecStopPost=/bin/rm -rf /var/run/xrdp/sockdir (code=exited, status=0/SUCCESS) Process: 1162 ExecStop=/usr/sbin/xrdp $XRDP_OPTIONS --kill (code=exited, status=0/SUCCESS) Process: 856 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS) Process: 831 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS) Main PID: 1100 (code=exited, status=0/SUCCESS) Dec 26 19:26:51 pod systemd[1]: Starting xrdp (X Remote Desktop Protocol) protocol server... Dec 26 19:26:52 pod systemd[1]: xrdp.service: PID file /run/xrdp/xrdp.pid not readable (yet?) after start: No such file or directory Dec 26 19:26:53 pod systemd[1]: Started xrdp (X Remote Desktop Protocol) protocol server. Dec 26 19:26:54 pod xrdp[1100]: (1100)(140648291601216)[INFO ] starting xrdp with pid 1100 Dec 26 19:26:54 pod xrdp[1100]: (1100)(140648291601216)[ERROR] xrdp_listen_main_loop: listen error, possible port already in use Dec 26 19:26:54 pod xrdp[1100]: (1100)(140648291601216)[DEBUG] Closed socket 11 (AF_INET6 :: port 0) On the second system, the error message is different; the xrdp service fails because of a timeout. Both systems are on xrdp 0.9.1~2016121126+git5171fa7-1. One thing possibly interesting about both systems is that they are both kvm hosts. After each system reaches network.target, the dependency for starting xrdp in systemd, quite a bit of subsequent network configuration takes place: virtual network interfaces, bridges, wlan probing and more. In other words, it's clear that xrdp is trying to start in a system whose network configuration is still very much underway. Of course, in all cases, xrdp-sesman also fails to start, with the cause being the failed dependency on xrdp.service. For that reason I am attaching to this bug. - David -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386, multiarch Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages xrdp depends on: ii adduser 3.115 ii init-system-helpers 1.46 ii libc62.24-8 ii libfuse2 2.9.7-1 ii libjpeg62-turbo 1:1.5.1-2 ii libopus0 1.1.3-1 ii libpam0g 1.1.8-3.3 ii libssl1.11.1.0c-2 ii libx11-6 2:1.6.4-2 ii libxfixes3 1:5.0.3-1 ii libxrandr2 2:1.5.1-1 ii lsb-base 9.20161125 Versions of packages xrdp recommends: ii xorgxrdp 0.9.1~2016121126+git5171fa7-1 Versions of packages xrdp suggests: pn guacamole Versions of packages xorgxrdp depends on: ii libc6 2.24-8 pn xorg-input-abi-24 ii xserver-xorg-core [xorg-video-abi-23] 2:1.19.0-2 Versions of packages xorgxrdp recommends: ii xorg 1:7.7+18 Versions of packages xrdp is related to: pn vnc-server -- no debconf information
Bug#840132: xrdp-sesman.service sometimes fails to start on boot
Hello, reportbug did notify me about a newer version, however the newest one to be downloaded via packages.debian.org (yes, for unstable) was still the one I had. I'll get around to testing newer versions eventually, but for now I'm back on 0.6.1. At least that one more or less works (w/ xfce) and when it fails it does so consistently. Cheers, C. 2016-10-08 19:40 GMT+02:00 Dominik George: > Hi, > > > Version: 0.9.0~20160601+git703fedd-3 > > Please try again with the current version 0.9.0~20161006+git132cc10-1. It > should at least give more conclusive logs. > > Cheers, > Nik
Bug#840132: xrdp-sesman.service sometimes fails to start on boot
Hi, > Version: 0.9.0~20160601+git703fedd-3 Please try again with the current version 0.9.0~20161006+git132cc10-1. It should at least give more conclusive logs. Cheers, Nik signature.asc Description: This is a digitally signed message part.
Bug#840132: xrdp-sesman.service sometimes fails to start on boot
Package: xrdp Version: 0.9.0~20160601+git703fedd-3 Severity: normal Hello, since xrdp still doesn't work for me I've been doing a lot of experiments to get it to cooperate, including a lot of rebooting to get back to a clean slate. I've noticed that sesman doesn't always start automatically on boot. Symptom: xrdp login screen / session chooser comes up but hitting enter after the password does nothing. systemctl status says: ● xrdp-sesman.service - xrdp (X Remote Desktop Protocol) session manager Loaded: loaded (/lib/systemd/system/xrdp-sesman.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sam 2016-10-08 18:25:37 CEST; 2min 3s ago Docs: man:xrdp-sesman(8) man:sesman.ini(5) Process: 819 ExecStop=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --kill (code=exited, status=1/FAILURE) Process: 817 ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS (code=exited, status=0/SUCCESS) Main PID: 818 (code=exited, status=0/SUCCESS) Okt 08 18:25:37 fatbeard systemd[1]: Starting xrdp (X Remote Desktop Protocol) session manager... Okt 08 18:25:37 fatbeard xrdp-sesman[817]: (817)(139868790023360)[WARN ] [init:46] libscp initialized Okt 08 18:25:37 fatbeard xrdp-sesman[818]: (818)(139868790023360)[CORE ] starting sesman with pid 818 Okt 08 18:25:37 fatbeard systemd[1]: Started xrdp (X Remote Desktop Protocol) session manager. Okt 08 18:25:37 fatbeard xrdp-sesman[818]: (818)(139868790023360)[INFO ] listening... Okt 08 18:25:37 fatbeard xrdp-sesman[818]: (818)(139868790023360)[ERROR] bind error on port '3350': 22 (Invalid argument) Okt 08 18:25:37 fatbeard xrdp-sesman[818]: (818)(139868790023360)[INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7 Okt 08 18:25:37 fatbeard systemd[1]: xrdp-sesman.service: Control process exited, code=exited status=1 Okt 08 18:25:37 fatbeard systemd[1]: xrdp-sesman.service: Unit entered failed state. Okt 08 18:25:37 fatbeard systemd[1]: xrdp-sesman.service: Failed with result 'exit-code'. Cheers, C. -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 4.7.0-1-amd64 (SMP w/2 CPU cores) Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages xrdp depends on: ii adduser 3.115 ii init-system-helpers 1.45 ii libc62.24-3 ii libfuse2 2.9.7-1 ii libjpeg62-turbo 1:1.5.0-1 ii libopus0 1.1.2-1 ii libpam0g 1.1.8-3.3 ii libssl1.0.2 1.0.2j-1 ii libx11-6 2:1.6.3-1 ii libxfixes3 1:5.0.2-1 ii libxrandr2 2:1.5.0-1 Versions of packages xrdp recommends: ii xorgxrdp 0.9.0~20160601+git703fedd-3 xrdp suggests no packages. Versions of packages xorgxrdp depends on: ii libc6 2.24-3 pn xorg-input-abi-22 ii xserver-xorg-core [xorg-video-abi-20] 2:1.18.4-2 Versions of packages xorgxrdp recommends: ii xorg 1:7.7+16 Versions of packages xrdp is related to: ii tightvncserver [vnc-server] 1.3.9-8 ii vnc4server [vnc-server] 4.1.1+X4.3.0-39 -- Configuration Files: /etc/xrdp/xrdp.ini changed [not included] -- no debconf information