XRDP fails to start on boot

This document (000019917) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12 SP5

Situation

When rebooting a system xrdp fails to start automatically.
With xrdp debug messages enabled we see the following when running "journalctl -u xrdp" after boot:
Mar 16 17:48:23 examplehost systemd[1]: Starting xrdp daemon...
Mar 16 17:48:23 examplehost xrdp[1780]: (1780)(140360899446528)[DEBUG] Testing if xrdp can listen on 0.0.0.0 port 3389.
Mar 16 17:48:23 examplehost xrdp[1780]: (1780)(140360899446528)[DEBUG] Closed socket 7 (AF_INET6 :: port 3389)
Mar 16 17:48:23 examplehost systemd[1]: xrdp.service: PID file /var/run/xrdp.pid not readable (yet?) after start: No such file or directory
Mar 16 17:48:25 examplehost xrdp[1823]: (1823)(140360899446528)[INFO ] starting xrdp with pid 1823
Mar 16 17:48:25 examplehost xrdp[1823]: (1823)(140360899446528)[INFO ] listening to port 3389 on 0.0.0.0
Mar 16 17:49:54 examplehost systemd[1]: xrdp.service: Start operation timed out. Terminating.
Mar 16 17:49:54 examplehost xrdp[1823]: (1823)(140360899446528)[DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
Mar 16 17:49:54 examplehost systemd[1]: Stopped xrdp daemon.
Mar 16 17:49:54 examplehost systemd[1]: xrdp.service: Unit entered failed state.
Mar 16 17:49:54 examplehost systemd[1]: xrdp.service: Failed with result 'timeout'.

After boot however running "systemctl start xrdp" works without issue.

Resolution

  1. Edit the xrdp systemd service file with "systemctl edit xrdp.service"
  2. Copy the following lines into the file:
    • [Unit]
      After=multi-user.target xrdp-sesman.service
  3. Reboot
Xrdp should now come up without manual intervention on boot.

Cause

By default xrdp is set to start after the network. In some cases xrdp appears to start a bit too early leading to a timeout. This work around creates an override for the default xrdp service so that it starts after multi-user.target delaying its start in the boot process a little bit. This change is persistent between updates.

Additional Information

To remove the override placed in the solution section you can run:
systemctl revert xrdp.service

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000019917
  • Creation Date: 19-Mar-2021
  • Modified Date:19-Mar-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center