- xrdp service fails to start after reboot
- Открытие порта для xrdp
- Не удалось запустить демон xrdp, возможно, адрес уже используется
- Arch Linux
- #2 2023-02-05 10:51:25
- Re: [SOLVED] xrdp daemon failed to start
- #3 2023-02-05 13:24:42
- Re: [SOLVED] xrdp daemon failed to start
- #4 2023-02-05 17:36:07
- Re: [SOLVED] xrdp daemon failed to start
- #5 2023-02-05 17:40:46
- Re: [SOLVED] xrdp daemon failed to start
- #6 2023-02-05 19:18:27
- Re: [SOLVED] xrdp daemon failed to start
- #7 2023-02-05 19:27:26
- Re: [SOLVED] xrdp daemon failed to start
- #8 2023-02-05 19:28:18
- Re: [SOLVED] xrdp daemon failed to start
- #9 2023-02-07 17:05:30
- Re: [SOLVED] xrdp daemon failed to start
xrdp service fails to start after reboot
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) man:xrdp.ini(5) 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
Открытие порта для xrdp
Здравствуйте. Имеется компьютер Linux, к которому необходимо подключаться по rdp из Windows по порту 126. Но когда в файле xrdp.ini меняю порт с 3389 на 126 у меня выходит ошибка при запросе: sudo systemctl status xrdp
авг 11 09:47:18 debian xrdp[3017]: (3017)(140151725082432)[ERROR] g_tcp_bind(7, 126) failed bind IPv6 (errno=13) and IPv4 (errno=22). авг 11 09:47:18 debian xrdp[3017]: (3017)(140151725082432)[DEBUG] Closed socket 7 (AF_INET6 :: port 0)
То есть порт открылся, а вот по xrdp через него подсоединиться не получается.
В конечном итоге хотелось бы подключаться к данному компьютеру по внешнему ip. То есть например так: 81.30.218.71:216
А чуть ниже в логе написано «Failed to start xrdp daemon, possibly address already in use.» но ты не стал этого постить сюда, так как это не важно?
Либо оставить порт >1024 и делать DNAT/REDIRECT в iptables на порт 126, либо CAP_NET_BIND_SERVICE на бинарник (и так при каждом обновлении) https://stackoverflow.com/questions/413807/is-there-a-way-for-non-root-proces.
Походу xrdp не будте биднится на привилегированный порт
Да с какого такого фига сервис будет сам решать куда ему биндиться, а куда нет.
constin ★★★★ ( 11.08.21 09:29:27 MSK )
Последнее исправление: constin 11.08.21 09:29:36 MSK (всего исправлений: 1)
Подскажите, пожалуйста, подробнее. А текст ошибки полностью конечно выложу. Просто показалось что будет нечитаемо..
Active: failed (Result: exit-code) since Wed 2021-08-11 11:14:50 +05; 19min ago Docs: man:xrdp(8) man:xrdp.ini(5) Process: 17385 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS) Process: 17414 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=1/FAILURE)
авг 11 11:14:50 debian systemd[1]: Starting xrdp daemon… авг 11 11:14:50 debian xrdp[17414]: (17414)(140063791548224)[DEBUG] Testing if xrdp can listen on 0.0.0.0 port 126. авг 11 11:14:50 debian xrdp[17414]: (17414)(140063791548224)[ERROR] g_tcp_bind(7, 126) failed bind IPv6 (errno=13) and IPv4 (errno=22). авг 11 11:14:50 debian xrdp[17414]: (17414)(140063791548224)[DEBUG] Closed socket 7 (AF_INET6 :: port 0) авг 11 11:14:50 debian xrdp[17414]: (17414)(140063791548224)[ERROR] Failed to start xrdp daemon, possibly address already in use. авг 11 11:14:50 debian systemd[1]: xrdp.service: Control process exited, code=exited, status=1/FAILURE авг 11 11:14:50 debian systemd[1]: xrdp.service: Failed with result ‘exit-code’. авг 11 11:14:50 debian systemd[1]: Stopped xrdp daemon.
Не удалось запустить демон xrdp, возможно, адрес уже используется
Ошибка: не удалось запустить демон xrdp, возможно, адрес уже используется.
-- A start job for unit xrdp.service has begun execution. -- -- The job identifier is 1785. okt 23 12:01:29 Ubutu20 xrdp-sesman[3636]: (3636)(140566295258688)[INFO ] listening to port 3350 on 127.0.0.1 okt 23 12:01:29 Ubutu20 xrdp[3650]: (3650)(140065546684224)[INFO ] address [0.0.0.0] port [3389] mode 3 okt 23 12:01:29 Ubutu20 xrdp[3650]: (3650)(140065546684224)[INFO ] listening to port 3389 on 0.0.0.0 okt 23 12:01:29 Ubutu20 xrdp[3650]: (3650)(140065546684224)[ERROR] trans_listen_address failed okt 23 12:01:29 Ubutu20 xrdp[3650]: (3650)(140065546684224)[DEBUG] Closed socket 7 (AF_VSOCK cid -1 port -1) okt 23 12:01:29 Ubutu20 xrdp[3650]: (3650)(140065546684224)[ERROR] Failed to start xrdp daemon, possibly address already in use. okt 23 12:01:29 Ubutu20 systemd[1]: xrdp.service: Control process exited, code=exited, status=1/FAILURE -- Subject: Unit process exited -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- An ExecStart= process belonging to unit xrdp.service has exited. -- -- The process' exit code is 'exited' and its exit status is 1. okt 23 12:01:29 Ubutu20 systemd[1]: xrdp.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- The unit xrdp.service has entered the 'failed' state with result 'exit-code'. okt 23 12:01:29 Ubutu20 systemd[1]: Failed to start xrdp daemon. -- Subject: A start job for unit xrdp.service has failed -- Defined-By: systemd -- Support: http://www.ubuntu.com/suppor
Arch Linux
So xrdp is already running, but nothing happened when I installed it? Did something go wrong with the installation?
Last edited by prayner96 (2023-02-08 10:12:39)
#2 2023-02-05 10:51:25
Re: [SOLVED] xrdp daemon failed to start
Installed xrdp AUR package
How exactly did you do that? I’ve just tried using makepkg and it all works as expected so I’m guessing you’re using some crappy AUR «helper» that’s messed things up for you.
Does the service start if you follow the advice given in the journal excerpt?
#3 2023-02-05 13:24:42
Re: [SOLVED] xrdp daemon failed to start
If it only checks for that lock file, probably. But then you might have two instances and the old one operates on the wrong lock.
stat /var/run/xrdp.pid cat /var/run/xrdp.pid ps aux | grep xrdp find /etc/systemd -type l -exec test -f <> \; -print | awk -F'/' '< printf ("%-40s | %s\n", $(NF-0), $(NF-1)) >' | sort -f
#4 2023-02-05 17:36:07
Re: [SOLVED] xrdp daemon failed to start
Correct @Head_on_a_Stick, I am using Paru. Figured it was better for keeping AUR packages updated simultaneously. You don’t approve?
$ stat /var/run/xrdp.pid stat: cannot statx '/var/run/xrdp.pid': No such file or directory $ cat /var/run/xrdp.pid cat: /var/run/xrdp.pid: No such file or directory $ ps aux | grep xrdp root 726 0.0 0.0 20440 1172 ? S 11:04 0:00 xrdp user 2336 0.0 0.0 6568 2480 pts/0 S+ 18:26 0:00 grep xrdp $ find /etc/systemd -type l -exec test -f <> \; -print | awk -F'/' '< printf ("%-40s | %s\n", $(NF-0), $(NF-1)) >' | sort -f dhcpcd.service | multi-user.target.wants display-manager.service | system getty@tty1.service | getty.target.wants p11-kit-server.socket | sockets.target.wants pipewire.socket | sockets.target.wants remote-fs.target | multi-user.target.wants wpa_supplicant@EE-Hub-hxR9.service | multi-user.target.wants wpa_supplicant@interface.service | multi-user.target.wants wpa_supplicant@wlp0s20f3.service | multi-user.target.wants
Does the service start if you follow the advice given in the journal excerpt?
There is no /var/run/xrdp.pid file to delete.
I guess I installed it wrong. Perhaps I need to reinstall.
#5 2023-02-05 17:40:46
Re: [SOLVED] xrdp daemon failed to start
root 726 0.0 0.0 20440 1172 ? S 11:04 0:00 xrdp
There’s an instance running but apparently no /var/run/xrdp.pid ?
What started it? Why is there no lockfile?
#6 2023-02-05 19:18:27
Re: [SOLVED] xrdp daemon failed to start
The PID file should be found at /run/xrdp.pid thanks to the arch-config.diff applied by the package:
diff -up src/xrdp-0.9.16/instfiles/xrdp.service.in.orig src/xrdp-0.9.16/instfiles/xrdp.service.in --- src/xrdp-0.9.16/instfiles/xrdp.service.in.orig 2020-06-26 05:13:58.000000000 -0600 +++ src/xrdp-0.9.16/instfiles/xrdp.service.in 2021-05-12 17:06:31.680000000 -0600 @@ -6,11 +6,9 @@ After=network.target xrdp-sesman.service [Service] Type=forking -PIDFile=@localstatedir@/run/xrdp.pid -EnvironmentFile=-@sysconfdir@/sysconfig/xrdp -EnvironmentFile=-@sysconfdir@/default/xrdp -ExecStart=@sbindir@/xrdp $XRDP_OPTIONS -ExecStop=@sbindir@/xrdp $XRDP_OPTIONS --kill +PIDFile=/run/xrdp.pid +ExecStart=@sbindir@/xrdp +ExecStop=@sbindir@/xrdp --kill [Install] WantedBy=multi-user.target
No idea why though
$ pacman -Q xrdp xrdp 0.9.21.1-1 $ pgrep -a xrd 1$ doas systemctl start xrdp $ pgrep -a xrd 38397 /usr/bin/xrdp-sesman 38399 /usr/bin/xrdp $ stat /run/xrdp.pid File: /run/xrdp.pid Size: 5 Blocks: 8 IO Block: 4096 regular file Device: 0,21 Inode: 1257 Links: 1 Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2023-02-05 19:14:13.484762256 +0000 Modify: 2023-02-05 19:14:13.484762256 +0000 Change: 2023-02-05 19:14:13.484762256 +0000 Birth: 2023-02-05 19:14:13.484762256 +0000 $ doas cat /run/xrdp.pid 38399$
I am using Paru. Figured it was better for keeping AUR packages updated simultaneously. You don’t approve?
I don’t approve of most AUR packages so naturally I have a low opinion of any «helpers».
But that’s not important here. Have you tried installing the package manually? Does it work then?
#7 2023-02-05 19:27:26
Re: [SOLVED] xrdp daemon failed to start
#8 2023-02-05 19:28:18
Re: [SOLVED] xrdp daemon failed to start
#9 2023-02-07 17:05:30
Re: [SOLVED] xrdp daemon failed to start
There’s an instance running but apparently no /var/run/xrdp.pid ?
What started it? Why is there no lockfile?
I tried killing the living sessions of xrdp and then starting again, but it was no use. Then I tried to enable the service, but it did nothing either. Although now there is an actual output for the following code:
$ stat /var/run/xrdp.pid File: /var/run/xrdp.pid Size: 5 Blocks: 8 IO Block: 4096 regular file Device: 0,21 Inode: 1569 Links: 1 Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2023-02-07 17:30:08.813187130 +0100 Modify: 2023-02-07 17:30:08.813187130 +0100 Change: 2023-02-07 17:30:08.813187130 +0100 Birth: 2023-02-07 17:30:08.813187130 +0100 $ sudo cat /var/run/xrdp.pid 46789 $ sudo ps aux | grep xrdp root 46787 0.0 0.0 12976 872 ? S 17:30 0:00 /usr/bin/xrdp-sesman root 46789 0.0 0.0 20444 1168 ? S 17:30 0:00 /usr/bin/xrdp baz_mor+ 48703 0.0 0.0 6568 2508 pts/5 S+ 17:39 0:00 grep xrdp $ find /etc/systemd -type l -exec test -f <> \; -print | awk -F'/' '< printf ("%-40s | %s\n", $(NF-0), $(NF-1)) >' | sort -f dhcpcd.service | multi-user.target.wants display-manager.service | system getty@tty1.service | getty.target.wants p11-kit-server.socket | sockets.target.wants pipewire.socket | sockets.target.wants remote-fs.target | multi-user.target.wants wpa_supplicant@EE-Hub-hxR9.service | multi-user.target.wants wpa_supplicant@interface.service | multi-user.target.wants wpa_supplicant@wlp0s20f3.service | multi-user.target.wants xrdp.service | multi-user.target.wants
Still, nothing worked. So I killed the processes again and checked xrdp status:
$ systemctl status xrdp × xrdp.service - xrdp daemon Loaded: loaded (/usr/lib/systemd/system/xrdp.service; enabled; preset: d> Active: failed (Result: signal) since Tue 2023-02-07 17:46:37 CET; 2min > Duration: 16min 28.717s Docs: man:xrdp(8) man:xrdp.ini(5) Main PID: 46789 (code=killed, signal=KILL) CPU: 13ms Feb 07 17:30:07 user xrdp[46788]: [INFO ] listening to port 3389 on 0.0.0> Feb 07 17:30:07 user xrdp[46788]: [INFO ] xrdp_listen_pp done Feb 07 17:30:07 user systemd[1]: xrdp.service: Can't open PID file /run/x> Feb 07 17:30:08 user systemd[1]: Started xrdp daemon. Feb 07 17:30:09 user xrdp[46789]: [INFO ] starting xrdp with pid 46789 Feb 07 17:30:09 user xrdp[46789]: [INFO ] address [0.0.0.0] port [3389] m> Feb 07 17:30:09 user xrdp[46789]: [INFO ] listening to port 3389 on 0.0.0> Feb 07 17:30:09 user xrdp[46789]: [INFO ] xrdp_listen_pp done Feb 07 17:46:37 user systemd[1]: xrdp.service: Main process exited, code=> Feb 07 17:46:37 user systemd[1]: xrdp.service: Failed with result 'signal>
Note: I am using Qtile without a DE and I have not installed `xorgxrdp`.