Closed jackwang713 closed 1 week ago
Problem found, it was my problem, turned off ipv6 on the loopback interface via sysctl. net.ipv6.conf.lo.disable_ipv6=1 After turning on ipv6 on the loopback interface, the xrdp connection worked fine.
please close issue
@jackwang713 - thanks for raising this, and also for providing a solution.
Given you're the third person to report something similar, I'm going to try to reproduce this so I understand it further. At the moment I can't see a reason why this should happen.
I can't reproduce this as reported on Ubuntu 22.04
As it is, disabling loopback on the lo0 interface results in an unstable system. Sometimes I get a desktop and sometimes I don't. However, the waitforx
executable always manages to connect to the X server.
Looking at the source code for libX11 and XCB, if I'm passed a DISPLAY of the form :n
, waitforx
will always try to make a connection to the X server via the UNIX socket. Furthermore, by default we pass -nolisten tcp
to the X server, so the X server won't be listening on TCP anyway.
However, looking into this has given me an insight into how this could potentially happen. I'll open a PR for discussion and reference this issue.
PR #3297 now links to this issue. I'll close it as requested.
xrdp version
0.10.80
Detailed xrdp version, build options
Operating system & version
Ubuntu 24.04.1 LTS
Installation method
Doesn't matter
Which backend do you use?
xorgxrdp
What desktop environment do you use?
No response
Environment xrdp running on
LG gram14 notebook,Intel® Core™ i5-8265U × 8,Software Rendering
What's your client?
MS offical client
Area(s) with issue?
Session manager (sesman)
Steps to reproduce
The operating system is ubuntu 24.04, compiled and installed the latest xrdp software. 24.04 has automatic ipv6 enabled by default, and the xrdp connection is unsuccessful. xrdp-sesman.log reports an error: waitforx: Timed out waiting for RandR outputs. this time, use the following command in /usr/local /libexec/xrdp/waitforx -d :10 command, sometimes the connection is successful. Use the command _sudo sysctl -w net.ipv6.conf.all.disableipv6=1 to turn off ipv6 on all interfaces and connect successfully without restarting the xrdp service.
✔️ Expected Behavior
Would like to be able to use xrdp in an ipv6 environment.
❌ Actual Behavior
Under ubuntu 24.04, IPv6 must be turned off to use xrdp.
Anything else?
xrdp-sesman.log: [2024-11-01T12:11:56.463+0800] [INFO ] Socket 13: connection accepted from AF_UNIX [2024-11-01T12:11:56.470+0800] [INFO ] Received system login request from xrdp for user: jackwang IP: 192.168.12.8 [2024-11-01T12:11:56.474+0800] [DEBUG] Closed socket 13 (AF_UNIX) [2024-11-01T12:11:56.474+0800] [DEBUG] Calling exec (excutable: /usr/local/libexec/xrdp/xrdp-sesexec, arguments: xrdp-sesexec) [2024-11-01T12:11:56.485+0800] [INFO ] starting xrdp-sesexec with pid 18114 [2024-11-01T12:11:56.527+0800] [INFO ] TerminalServerUsers group tsusers doesn't exist. Access granted for jackwang [2024-11-01T12:11:56.530+0800] [INFO ] Access permitted for user: jackwang [2024-11-01T12:11:56.532+0800] [DEBUG] Closed socket 9 (AF_UNIX) [2024-11-01T12:11:56.532+0800] [INFO ] Received sys login status for jackwang : logged in [2024-11-01T12:11:56.549+0800] [INFO ] Received request from xrdp to create a session for user jackwang [2024-11-01T12:11:56.553+0800] [DEBUG] session_list_get_bydata: search policy=UB type=Xorg U=1008 B=24 D=(2560x1440) I=192.168.12.8 [2024-11-01T12:11:56.556+0800] [DEBUG] session_list_get_bydata: No matches found [2024-11-01T12:11:56.560+0800] [DEBUG] Did not find a running X server at /tmp/.X11-unix/X10 [2024-11-01T12:11:56.564+0800] [DEBUG] Did not find a running X server at /tmp/.X10-lock [2024-11-01T12:11:56.567+0800] [DEBUG] Closed socket 15 (0.0.0.0:5910) [2024-11-01T12:11:56.570+0800] [DEBUG] Did not find a running X server at 5910 [2024-11-01T12:11:56.573+0800] [DEBUG] Closed socket 15 (0.0.0.0:6010) [2024-11-01T12:11:56.576+0800] [DEBUG] Did not find a running X server at 6010 [2024-11-01T12:11:56.579+0800] [DEBUG] Closed socket 15 (0.0.0.0:6210) [2024-11-01T12:11:56.582+0800] [DEBUG] Closed socket 13 (AF_UNIX) [2024-11-01T12:11:56.636+0800] [DEBUG] Waiting for X server to start on display :10 [2024-11-01T12:11:56.637+0800] [DEBUG] Calling exec (excutable: /usr/local/libexec/xrdp/waitforx, arguments: /usr/local/libexec/xrdp/waitforx -d :10) [2024-11-01T12:11:56.640+0800] [INFO ] Starting X server on display 10: Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log [2024-11-01T12:11:56.644+0800] [DEBUG] Calling exec (excutable: Xorg, arguments: Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log) [2024-11-01T12:11:56.644+0800] [DEBUG] waitforx: Opening display :10. Attempt 1 of 10 [2024-11-01T12:12:26.645+0800] [ERROR] waitforx: Timed out waiting for RandR outputs [2024-11-01T12:12:26.650+0800] [DEBUG] waiting for pid 18130 to exit [2024-11-01T12:12:26.653+0800] [ERROR] Timed out waiting for X server [2024-11-01T12:12:26.668+0800] [DEBUG] Closed socket 9 (AF_UNIX) [2024-11-01T12:12:26.671+0800] [INFO ] Session on display 10 has finished. [2024-11-01T12:12:26.673+0800] [DEBUG] Closed socket 15 (AF_UNIX) [2024-11-01T12:12:26.675+0800] [DEBUG] Closed socket 14 (AF_UNIX) [2024-11-01T12:17:39.952+0800] [INFO ] sesman_main_loop: sesman asked to terminate [2024-11-01T12:17:39.978+0800] [DEBUG] Closed socket 12 (AF_UNIX)