ThinLinc login fails (No agent server was available)

Hello,
I’m running a ThinLinc server on Rocky8 and connecting to it from a Windows client. It was working fine, but now I can’t log in using ThinLinc (I can connect using SSH). This issue started with version 4.17, and updating to version 4.18 did not help.

uname -a:

Linux eda 4.18.0-553.34.1.el8_10.x86_64 #1 SMP Wed Jan 8 14:44:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

vsmserver.log:

2025-01-17 16:24:41 INFO vsmserver: VSM server version 4.18.0 build 3877 started
2025-01-17 16:24:41 INFO vsmserver.license: Updating license data from disk to memory
2025-01-17 16:24:41 INFO vsmserver.license: License summary: 10 concurrent users. Hard limit of 10 concurrent users.
2025-01-17 16:24:41 INFO vsmserver.session: Loaded 0 sessions for 0 users from file
2025-01-17 16:25:07 INFO vsmserver.session: User with uid 2020 (turtle) requested a new session
2025-01-17 16:25:22 WARNING vsmserver: VSM agent 127.0.0.1 reported failure creating session for turtle
2025-01-17 16:25:22 WARNING vsmserver.loadinfo: Agent 127.0.0.1 failed to start session, Increasing penalty points by 5 to 5
2025-01-17 16:25:22 WARNING vsmserver: No working agents found trying to start new session for turtle
2025-01-17 16:26:01 INFO vsmserver.loadinfo: VSM agent 127.0.0.1 had 5 penalty points, decreasing to 4
2025-01-17 16:26:41 INFO vsmserver.loadinfo: VSM agent 127.0.0.1 had 4 penalty points, decreasing to 3
2025-01-17 16:27:21 INFO vsmserver.loadinfo: VSM agent 127.0.0.1 had 3 penalty points, decreasing to 2
2025-01-17 16:28:01 INFO vsmserver.loadinfo: VSM agent 127.0.0.1 had 2 penalty points, decreasing to 1
2025-01-17 16:28:41 INFO vsmserver.loadinfo: VSM agent 127.0.0.1 had 1 penalty points, decreasing to 0

vsmagent.log:

2025-01-17 16:24:41 INFO vsmagent: VSM agent version 4.18.0 build 3877 started
2025-01-17 16:24:41 INFO vsmagent: My public hostname is 10.10.0.130
2025-01-17 16:25:22 WARNING tl-session: tl-xinit exited with status=1

xinit.log:

xauth:  file /var/opt/thinlinc/sessions/turtle/10/Xauthority does not exist
tl-xinit: timeout while waiting for xauth command
xauth:  unable to open tmp file "/var/opt/thinlinc/sessions/turtle/10/Xauthority-n"
xauth:  unable to write authority file /var/opt/thinlinc/sessions/turtle/10/Xauthority-n

I would appreciate any assistance to fix it.

Hi @TrutleFX,

The issue is this line here - something is causing xauth to fail (or time out). Is there anything in the system logs for this user which might indicate what’s going on?

Hi @aaron,
Thanks for your reply!

Unfortunately, I’m not familiar with xauth and I’m not sure where its logs are stored. I ran journalctl -f during the ThinLinc connection, and the following log was generated (the IP address is removed):

Jan 28 12:51:00 eda sshd[2234513]: Accepted password for turtle from X.X.X.X port 51729 ssh2
Jan 28 12:51:00 eda systemd-logind[1028]: New session 53 of user turtle.
Jan 28 12:51:00 eda systemd[1]: Started Session 53 of user turtle.
Jan 28 12:51:00 eda sshd[2234513]: pam_unix(sshd:session): session opened for user turtle by (uid=0)
Jan 28 12:51:01 eda systemd-logind[1028]: New session 54 of user turtle.
Jan 28 12:51:01 eda systemd[1]: Started Session 54 of user turtle.
Jan 28 12:51:01 eda tl-session[2234553]: pam_unix(thinlinc:session): session opened for user turtle by (uid=0)
Jan 28 12:51:16 eda tl-session[2234553]: pam_unix(thinlinc:session): session closed for user turtle
Jan 28 12:51:16 eda systemd-logind[1028]: Session 54 logged out. Waiting for processes to exit.
Jan 28 12:51:16 eda sshd[2234513]: pam_unix(sshd:session): session closed for user turtle
Jan 28 12:51:16 eda systemd-logind[1028]: Session 53 logged out. Waiting for processes to exit.
Jan 28 12:51:16 eda systemd[1]: session-53.scope: Succeeded.
Jan 28 12:51:16 eda systemd-logind[1028]: Removed session 53.
Jan 28 12:51:16 eda systemd[1]: session-54.scope: Succeeded.
Jan 28 12:51:16 eda systemd-logind[1028]: Removed session 54.

As I understand, the session is starting but it gets closed immediately.

Hi @TrutleFX,

Thanks for the logs. xauth is having trouble writing your Xauthority file, but it’s not obvious to me as to why. Does the directory /var/opt/thinlinc/sessions/turtle/10 exist, and is it writable? Have you tried ending all existing sessions first (for example, by rebooting)?

@CendioOssman @samuel any ideas?

Hi @aaron,

That directory is created during the connection and exists until the session ends (at which point an error is shown on the client side). After that, it is renamed to 10.<somekindofnumber>.ended.
Also, 10 was the initial name of that subdirectory when I noticed that ThinLinc was not working. Sometimes, it is 11, 15 or 16.
For example, after pressing the “Connect” button on the client, the following directory is created:
/var/opt/thinlinc/sessions/turtle/15
When the session ends (an error is shown on the client side in this case), it is renamed to:
/var/opt/thinlinc/sessions/turtle/15.1738145140.ended

My user has write permissions to that directory. I tried quickly creating a file during the connection, before the session ended (i.e., in /var/opt/thinlinc/sessions/turtle/15) and also after the session ended (in /var/opt/thinlinc/sessions/turtle/15.1738145140.ended).

The contents of the /var/opt/thinlinc/sessions/turtle/:

total 4
drwxr-xr-x 22 turtle cad 4096 Jan 29 12:30 .
drwxr-xr-x  3 root      root      23 Jan 17 14:23 ..
drwx------  3 turtle cad  151 Jan 17 14:23 10.1737116643.ended
drwx------  3 turtle cad  151 Jan 17 14:25 10.1737116726.ended
drwx------  3 turtle cad  151 Jan 17 14:25 10.1737116762.ended
drwx------  3 turtle cad  151 Jan 17 15:56 10.1737122215.ended
drwx------  3 turtle cad  151 Jan 17 15:57 10.1737122249.ended
drwx------  3 turtle cad  151 Jan 17 16:11 10.1737123086.ended
drwx------  3 turtle cad  151 Jan 17 16:19 10.1737123612.ended
drwx------  3 turtle cad  151 Jan 17 16:25 10.1737123922.ended
drwx------  3 turtle cad  151 Jan 18 12:34 10.1737196485.ended
drwx------  3 turtle cad  151 Jan 18 12:46 10.1737197196.ended
drwx------  3 turtle cad  151 Jan 18 13:25 10.1737199517.ended
drwx------  3 turtle cad  163 Jan 20 12:57 10.1737370498.ended
drwx------  3 turtle cad  151 Jan 20 12:59 11.1737370809.ended
drwx------  3 turtle cad  151 Jan 29 12:05 15.1738145140.ended
drwx------  3 turtle cad  151 Jan 28 12:14 16.1738059273.ended
drwx------  3 turtle cad  151 Jan 28 12:50 16.1738061437.ended
drwx------  3 turtle cad  151 Jan 28 12:51 16.1738061476.ended
drwx------  3 turtle cad  176 Jan 29 12:15 16.1738145751.ended
drwx------  3 turtle cad  151 Jan 29 12:16 16.1738145788.ended
drwx------  3 turtle cad  176 Jan 29 12:19 16.1738145989.ended
lrwxrwxrwx  1 root      root      19 Jan 29 12:19 last -> 16.1738145989.ended

The contents of the /var/opt/thinlinc/sessions/turtle/last/

total 24
drwx------  3 turtle cad  151 Jan 29 12:33 .
drwxr-xr-x 22 turtle cad 4096 Jan 29 12:30 ..
drwx------  2 turtle cad    6 Jan 29 12:19 dev
-rw-------  1 turtle cad  256 Jan 29 12:19 pcsctun-cookie
-rw-------  1 turtle cad  256 Jan 29 12:19 pulse-cookie
-rw-------  1 turtle cad   64 Jan 29 12:19 sessionkey
-rw-------  1 turtle cad   16 Jan 29 12:19 vncpasswd
-rw-------  2 turtle cad    0 Jan 29 12:19 Xauthority-c
-rw-------  2 turtle cad    0 Jan 29 12:19 Xauthority-l
-rw-------  1 turtle cad  308 Jan 29 12:19 xinit.log

I tried rebooting the server, but it did not help.

Nothing obvious from the logs. Custom changes to SELinux? Could try sudo setenforce 0 and see if it gets things going.

SELinux is disabled.

sestatus
SELinux status:                 disabled

Out of disk space? Quota?

Nope, there is 100+ GB of available free space.

Hi,

Something is weird, I suspect it is the Xauthority-c and Xauthority-l files causing the problem. No idea why they have been created, but they’re lock files, and probably preventing xinit from doing its thing.

Try removing them, or if you have no active sessions for the user, maybe just get rid of the /var/opt/thinlinc/sessions/turtle directory altogether, and try again.

Hi @aaron,

Tried rebooting the whole server, deleting /var/opt/thinlinc/sessions/turtle directory, but no luck :frowning:

Hi @TrutleFX,

I’m sorry, I’m at a complete loss here… we know that ThinLinc works on Rocky 8, so there must be something about your specific system configuration which is causing the problem.

Do you know if any configuration was changed leading up to the issue? Are you able to re-install ThinLinc on a fresh Rocky 8 install?

Hi @aaron,
There were no changes to the configuration. The only thing that happened was an update.
Here is the information on which packages were updated: Updated Packages - Pastebin.com
However, I am not 100% sure that ThinLinc stopped working immediately after the update, as I did not use it for a week or two afterward.

I tried using older kernels (as suggested in other topics), but it did not help.
I will try installing a clean Rocky8 with ThinLinc on a different machine (or a VM) and check if it works.

@TrutleFX that sounds like a plan. Let us know if it still happens on a clean install - if the issue is reproducable, then we can certainly have a look into it for you.