Bug#840132: xrdp-sesman.service sometimes fails to start on boot
David Gilmour
david at gilmour.net
Mon Mar 6 06:06:19 UTC 2017
On Tue, 28 Feb 2017 15:07:39 +0100 Paul van Tilburg <paulvt at debian.org> wrote:
> 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.service 2017-01-25 18:10:11.000000000 +0100
> +++ /etc/systemd/system/xrdp.service 2017-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: paulvt at debian.org
> Jabber/XMPP: paul at luon.net | GnuPG key ID: 0x50064181
Paul, unfortunately it didn’t seem to work for me:
root at 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 at 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 at pod:/home/david# systemctl restart xrdp
root at pod:/home/david# systemctl restart xrdp-sesman
root at 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 ] starting xrdp with pid 1726
Mar 05 21:41:03 pod xrdp[1726]: (1726)(139798253062976)[INFO ] listening to port 3389 on 0.0.0.0
root at pod:/home/david# systemctl restart xrdp-sesman
root at 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: active (running) since Sun 2017-03-05 21:41:15 PST; 4s ago
Docs: man:xrdp-sesman(8)
man:sesman.ini(5)
Process: 1735 ExecStop=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --kill (code=exited, status=0/SUCCESS)
Process: 1738 ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 1739 (xrdp-sesman)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/xrdp-sesman.service
└─1739 /usr/sbin/xrdp-sesman
Mar 05 21:41:15 pod systemd[1]: Starting xrdp session manager...
Mar 05 21:41:15 pod xrdp-sesman[1738]: (1738)(140499228779840)[DEBUG] libscp initialized
Mar 05 21:41:15 pod xrdp-sesman[1739]: (1739)(140499228779840)[INFO ] starting xrdp-sesman with pid 1739
Mar 05 21:41:15 pod systemd[1]: Started xrdp session manager.
Mar 05 21:41:15 pod xrdp-sesman[1739]: (1739)(140499228779840)[INFO ] listening to port 3350 on 127.0.0.1
root at pod:/home/david# cat /etc/systemd/system/xrdp.sesman
cat: /etc/systemd/system/xrdp.sesman: No such file or directory
root at pod:/home/david# cat /etc/systemd/system/xrdp.service
[Unit]
Description=xrdp daemon
Documentation=man:xrdp(8) man:xrdp.ini(5)
After=network-online.target
[Service]
Type=forking
PIDFile=/run/xrdp/xrdp.pid
RuntimeDirectory=xrdp
EnvironmentFile=-/etc/sysconfig/xrdp
EnvironmentFile=-/etc/default/xrdp
User=xrdp
Group=xrdp
PermissionsStartOnly=true
ExecStartPre=/bin/sh /usr/share/xrdp/socksetup
ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS
ExecStop=/usr/sbin/xrdp $XRDP_OPTIONS --kill
ExecStopPost=/bin/rm -rf /var/run/xrdp/sockdir
[Install]
WantedBy=multi-user.target
root at pod:/home/david#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-remote-team/attachments/20170306/3ee546d6/attachment.html>
More information about the pkg-remote-team
mailing list