Question

xrdp changing to xrdp.service: Can't open PID file /run/xrdp/xrdp.pid (yet?) after start: Operation not permitted after functioning well.

Last week I enabled a remote desktop on my droplet. I used the guide of the Digital Oceans’s blog article “How To Enable Remote Desktop Protocol Using xrdp on Ubuntu 22.04”. I followed all the steps and finally I got it. I was working until today I tryed to connect the remote desktop and I got an error message “Unable to connect. We couldn’t connect to the remote PC. Make sure the PC is turned on and connected to the network, and that remote access is enabled. Error code: 0x204”. I connected the console and I could see the rdp is not working. I have done everything but xrdp remains the same:

root@ubuntu-s-2vcpu-4gb-amd-sfo3-01:~# sudo systemctl status xrdp
● xrdp.service - xrdp daemon
Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2023-10-08 13:21:27 -05; 4h 29min ago
Docs: man:xrdp(8)
man:xrdp.ini(5)
Process: 822 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)
Process: 837 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 842 (xrdp)
Tasks: 1 (limit: 4656)
Memory: 1.7M
CGroup: /system.slice/xrdp.service
└─842 /usr/sbin/xrdp
Oct 08 13:21:26 ubuntu-s-2vcpu-4gb-amd-sfo3-01 xrdp[837]: (837)(140443694966592)[INFO ] address [0.0.0.0] port [3389] mode 1
Oct 08 13:21:26 ubuntu-s-2vcpu-4gb-amd-sfo3-01 xrdp[837]: (837)(140443694966592)[INFO ] listening to port 3389 on 0.0.0.0
Oct 08 13:21:26 ubuntu-s-2vcpu-4gb-amd-sfo3-01 xrdp[837]: (837)(140443694966592)[INFO ] xrdp_listen_pp done
Oct 08 13:21:26 ubuntu-s-2vcpu-4gb-amd-sfo3-01 xrdp[837]: (837)(140443694966592)[DEBUG] Closed socket 7 (AF_INET6 :: port 3389)
Oct 08 13:21:26 ubuntu-s-2vcpu-4gb-amd-sfo3-01 systemd[1]: xrdp.service: Can't open PID file /run/xrdp/xrdp.pid (yet?) after start: Operation not permitted
Oct 08 13:21:27 ubuntu-s-2vcpu-4gb-amd-sfo3-01 systemd[1]: Started xrdp daemon.
Oct 08 13:21:28 ubuntu-s-2vcpu-4gb-amd-sfo3-01 xrdp[842]: (842)(140443694966592)[INFO ] starting xrdp with pid 842
Oct 08 13:21:28 ubuntu-s-2vcpu-4gb-amd-sfo3-01 xrdp[842]: (842)(140443694966592)[INFO ] address [0.0.0.0] port [3389] mode 1
Oct 08 13:21:28 ubuntu-s-2vcpu-4gb-amd-sfo3-01 xrdp[842]: (842)(140443694966592)[INFO ] listening to port 3389 on 0.0.0.0
Oct 08 13:21:28 ubuntu-s-2vcpu-4gb-amd-sfo3-01 xrdp[842]: (842)(140443694966592)[INFO ] xrdp_listen_pp done

Could you please help me to recover my remote desktop? Regards,


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
October 9, 2023

Heya,

Check if your Port 3389 is closed. I’ve had cases where the port for some reason was closed from outside of the Droplet and the fix was to change the Port to another, let’s say 3390.

If that turns out to be the case, then I’ll recommend contacting DigitalOcean’s support to see why it has happened and prevent it from happening again.

KFSys
Site Moderator
Site Moderator badge
October 9, 2023

Heya,

Check if your Port 3389 is closed. I’ve had cases where the port for some reason was closed from outside of the Droplet and the fix was to change the Port to another, let’s say 3390.

If that turns out to be the case, then I’ll recommend contacting DigitalOcean’s support to see why it has happened and prevent it from happening again.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel