The xrdp service is failing after a restart, with the following errors:

sudo systemctl restart xrdp.service
Job for xrdp.service failed because the control process exited with error code.
See "systemctl status xrdp.service" and "journalctl -xe" for details.

sudo systemctl status xrdp.service
● xrdp.service - xrdp daemon
Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-11-30 17:59:31 CET; 2min 55s ago
 Docs: man:xrdp(8)
Process: 455 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=1/FAILURE)
Process: 440 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)

Nov 30 17:59:30 raspberrypi systemd[1]: Starting xrdp daemon...
Nov 30 17:59:31 raspberrypi systemd[1]: xrdp.service: Control process exited, code=exited status=1
Nov 30 17:59:31 raspberrypi systemd[1]: Failed to start xrdp daemon.
Nov 30 17:59:31 raspberrypi systemd[1]: xrdp.service: Unit entered failed state.
Nov 30 17:59:31 raspberrypi systemd[1]: xrdp.service: Failed with result 'exit-code'.

When I re-install it, it is working, until the next reboot. option 1: sudo apt-get purge xrdp && sudo apt-get install xrdp option 2: sudo apt-get purge xrdp && sudo dpkg -i ./xrdp_0.9.4-1_armhf.deb

I tried option 2, because I read that there is a problem with xrdp 0.9.1-9, so I downloaded a newer version.

The xrdp-config is unmodified, also it is working fine until reboot. That means I am able to connect to the Pi with no problems. Same with my modified config.

Right now i use this workaround after reboot, but i want to know what exactly causes the error:

apt-get purge xrdp --yes && dpkg -i /home/pi/Documents/xrdp_0.9.4-1_armhf.deb

2 Answers 2


Still an issue???

Did you mount /var/log tmpfs???

Seems that xrdp at startup expects a file /var/log/xrdp.log, owner xrdp:adm, access 640 to exist and if not fails

So try:

Disable automatic start at boot time (systemctl disable xrdp)

touch /var/log/xrdp.log

chown xrdp:adm /var/log/xrdp.log

chmod 640 /var/log/xrdp.log

systemctl start xrdp

systemctl status xrdp

You may wish to add this to /etc/crontab @reboot

For me it works.

  • Thanks; that fixed it for me. (Now I just need to figure out when/why/how it got installed in the first place and if I even need it to auto-run…)
    – Synetech
    Commented Sep 20, 2018 at 19:20

To mkae the service start i've just changed this line in /etc/xrdp/xrdp.ini:

  • If the log file needs to exist, probably best to use /var/tmp which is explicitly supposed to be persistent.
    – Protopia
    Commented Dec 29, 2020 at 9:52
  • On Raspbian /tmp is persistent, but this is a good point about best practices, since it commonly is not (and really should be cleaned at boot if it isn't).
    – goldilocks
    Commented Dec 29, 2020 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.