I recently had an issue on my Raspberry Pi 3 b+ (running Stretch) whereby SSH stopped working after installing Kodi.

I've managed to get past that but I now can't connect using RDP (from Windows 10 PC) which, again, I could before installing Kodi. Now, it just shows the xrdp login screen, but after entering my login details, nothing happens...it just sits there unresponsive for about 1 minute. It does become responsive again (i.e. I can change the session option, re-type username, etc), but doesn't show anything else.

I've tried stopping the xrdp service and starting it again:

sudo service xrdp stop
sudo service xrdp start

...and the start command gives an error:

Job for xrdp.service failed because of unavailable resources or another system error.
See "systemctl status xrdp.service" and "journalctl -xe" for details.

Running the suggested systemctl command above gives:

● xrdp.service - xrdp daemon
   Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
   Active: failed (Result: resources) since Mon 2019-01-07 14:48:34 GMT; 2min 6s ago
     Docs: man:xrdp(8)
  Process: 2238 ExecStopPost=/bin/rm -rf /var/run/xrdp/sockdir (code=exited, status=0/SUCCESS)
  Process: 2236 ExecStop=/usr/sbin/xrdp $XRDP_OPTIONS --kill (code=exited, status=0/SUCCESS)
  Process: 2299 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)
  Process: 2287 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)
 Main PID: 648 (code=exited, status=0/SUCCESS)

Jan 07 14:48:34 raspberrypi systemd[1]: Starting xrdp daemon...
Jan 07 14:48:34 raspberrypi systemd[1]: xrdp.service: PID file /run/xrdp/xrdp.pid not readable (yet?) after start: No such file or directory
Jan 07 14:48:34 raspberrypi systemd[1]: Failed to start xrdp daemon.
Jan 07 14:48:34 raspberrypi systemd[1]: xrdp.service: Unit entered failed state.
Jan 07 14:48:34 raspberrypi systemd[1]: xrdp.service: Failed with result 'resources'.

I've also tried running "journalctl -xe" and it gives:

systemd[1]: xrdp.service: PID file /run/xrdp/xrdp.pid not readable (yet?) after start: No such file or directory
systemd[1]: xrdp-sesman.service: Control process exited, code=exited status=1
systemd[1]: xrdp-sesman.service: Unit entered failed state.
systemd[1]: xrdp-sesman.service: Failed with result 'exit-code'.
xrdp[2526]: (2526)(1996214976)[INFO ] starting xrdp with pid 2526
xrdp[2526]: (2526)(1996214976)[ERROR] xrdp_listen_main_loop: listen error, possible port already in use
xrdp[2526]: (2526)(1996214976)[DEBUG] Closed socket 11 (AF_INET6 :: port 0)
systemd[1]: xrdp.service: Daemon never wrote its PID file. Failing.
systemd[1]: Failed to start xrdp daemon.

I've checked in the /run folder and there is no xrdp subfolder. I tried creating one but it just disappears when I then attempt to restart the xrdp service.

Not sure if the "port already in use" issue is as a result of the first issue or whether it's a separate problem?

Checking /var/log/xrdp-sesman.log shows:

[20190107-14:21:22] [INFO ] shutting down sesman 1
[20190107-14:21:22] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
[20190107-14:21:22] [DEBUG] libscp initialized
[20190107-14:21:22] [INFO ] starting xrdp-sesman with pid 13691
[20190107-14:21:22] [ERROR] bind error on port '3350': 22 (Invalid argument)
[20190107-14:21:22] [DEBUG] Closed socket 7 (AF_INET6 :: port 0)

I'm not sure what all this means but some Googling suggests there's a possible issue with regard to IPv6 clashing with xrdp, but I don't know if that's still the case or not? Others suggest a reinstall of xrdp may be necessary.

Can anyone confirm the best way to address this?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.