Vsmserver.service fails to start

I downloaded thinlinc-4.14.0 and installed on Ubuntu 20.04.2 LTS server.
After install it fails to start vsmserver:
sudo systemctl status vsmserver
● vsmserver.service - ThinLinc VSM server
Loaded: loaded (/lib/systemd/system/vsmserver.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2022-10-27 09:26:45 +03; 12s ago
Process: 29458 ExecStart=/bin/bash --login -c /opt/thinlinc/sbin/vsmserver (code=exited, status=0/SUCCESS)
Main PID: 29482 (code=exited, status=1/FAILURE)

Any suggestion or resolution is appreciated.
Thanks,

Hi @oktayhg, and welcome!

Ouch, let’s try to figure out why…

Does /var/log/vsmserver.log yield any clues to why it fails to start? You could also check your systems journal:

journalctl -u vsmserver.service

Kind regards,
Martin

Hi Martin,

Thank you for such an instant response.

Here is my output. I just installed but couldn’t connect ever.

journalctl -u vsmserver.service

– Logs begin at Wed 2022-10-12 19:31:54 +03, end at Thu 2022-10-27 15:57:38 +03. –

Oct 26 15:42:10 kfmlarge.kocfinans.local systemd[1]: Starting ThinLinc VSM server…

Oct 26 15:42:10 kfmlarge.kocfinans.local systemd[1]: Started ThinLinc VSM server.

Oct 26 15:42:10 kfmlarge.kocfinans.local systemd[1]: vsmserver.service: Main process exited, code=exited, status=1/FAILURE

Oct 26 15:42:10 kfmlarge.kocfinans.local systemd[1]: vsmserver.service: Failed with result ‘exit-code’.

Oct 27 09:26:45 kfmlarge.kocfinans.local systemd[1]: Starting ThinLinc VSM server…

Oct 27 09:26:45 kfmlarge.kocfinans.local systemd[1]: Started ThinLinc VSM server.

Oct 27 09:26:45 kfmlarge.kocfinans.local systemd[1]: vsmserver.service: Main process exited, code=exited, status=1/FAILURE

Oct 27 09:26:45 kfmlarge.kocfinans.local systemd[1]: vsmserver.service: Failed with result ‘exit-code’.

Oct 27 13:51:15 kfmlarge.kocfinans.local systemd[1]: Starting ThinLinc VSM server…

Oct 27 13:51:15 kfmlarge.kocfinans.local systemd[1]: vsmserver.service: New main PID 1250401 does not exist or is a zombie.

Oct 27 13:51:15 kfmlarge.kocfinans.local systemd[1]: vsmserver.service: Failed with result ‘protocol’.

Oct 27 13:51:15 kfmlarge.kocfinans.local systemd[1]: Failed to start ThinLinc VSM server.

Sınıflandırma: Genel / Kişisel Veri İçermez

Hello again,

No problem. Could you please attach /var/log/vsmserver.log as well?

Kind regards,
Martin

2022-10-26 15:42:10 INFO vsmserver: VSM Server version 4.14.0 build 2408 started
2022-10-26 15:42:10 INFO vsmserver.license: Updating license data from disk to memory
2022-10-26 15:42:10 INFO vsmserver.license: License summary: 10 concurrent users. Hard limit of 10 concurrent users.
2022-10-26 15:42:10 ERROR vsmserver: Unable to bind to (‘’, 9000) - address already in use. Is another VSM Server running?
2022-10-26 15:42:10 ERROR vsmserver: Exiting
2022-10-27 09:26:45 INFO vsmserver: VSM Server version 4.14.0 build 2408 started
2022-10-27 09:26:45 INFO vsmserver.license: Updating license data from disk to memory
2022-10-27 09:26:45 INFO vsmserver.license: License summary: 10 concurrent users. Hard limit of 10 concurrent users.
2022-10-27 09:26:45 ERROR vsmserver: Unable to bind to (‘’, 9000) - address already in use. Is another VSM Server running?
2022-10-27 09:26:45 ERROR vsmserver: Exiting
2022-10-27 13:51:15 INFO vsmserver: VSM Server version 4.14.0 build 2408 started
2022-10-27 13:51:15 INFO vsmserver.license: Updating license data from disk to memory
2022-10-27 13:51:15 INFO vsmserver.license: License summary: 10 concurrent users. Hard limit of 10 concurrent users.
2022-10-27 13:51:15 ERROR vsmserver: Unable to bind to (‘’, 9000) - address already in use. Is another VSM Server running?
2022-10-27 13:51:15 ERROR vsmserver: Exiting

Okay, so there is already something listening on the port that vsmserver wants to bind to.
Could you show the output of

lsof -i | grep 9000

image
Now I released that port and could startup server. But client still cant’t connect to the server?

journalctl -u vsmagent.service
– Logs begin at Wed 2022-10-12 19:31:54 +03, end at Thu 2022-10-27 17:23:22 +03. –
Oct 26 15:42:09 kfmlarge.kocfinans.local systemd[1]: Starting ThinLinc VSM agent…
Oct 26 15:42:09 kfmlarge.kocfinans.local systemd[1]: Started ThinLinc VSM agent.

In vsmagent.log:

2022-10-26 15:42:09 INFO vsmagent: VSM Agent version 4.14.0 build 2408 started
2022-10-26 15:42:09 INFO vsmagent: My public hostname is 172.30.34.100
2022-10-27 17:16:12 ERROR vsmagent: Unhandled XMLRPC exception: <class ‘RecursionError’> maximum recursion depth exceeded in comparison Traceback (most recent call last):
File “/opt/thinlinc/modules/thinlinc/vsm/asyncbase.py”, line 104, in ooOOOoOO0
obj . handle_read_event ( )

What service did you have installed that was already listening on port 9000 ?

And could you please share a bit more of the traceback you received in vsmagent.log?

Regards,
Martin

It was a jupyter notebook process. I stopped that process and restarted vsmserver.

Sınıflandırma: Genel / Kişisel Veri İçermez

(Attachment vsmagent.log is missing)

Ok thank you.

It seems the vsmagent.log didn’t make it as an attachment, if it’s huge, you could limit it to the first 40-50 lines of the trace back and do an in-line attachment.

Kind regards,
Martin

Just a short follow-up question regarding port 9000 and jupyter notebook.
Did you choose that port yourself, or is it a default / recommended port for deployment?

Regards,
Martin

It was random port allocation from available ports by application.

1 Like

2022-10-26 15:42:09 INFO vsmagent: VSM Agent version 4.14.0 build 2408 started
2022-10-26 15:42:09 INFO vsmagent: My public hostname is 172.30.34.100
2022-10-27 17:16:12 ERROR vsmagent: Unhandled XMLRPC exception: <class ‘RecursionError’> maximum recursion depth exceeded in comparison Traceback (most recent call last):
File “/opt/thinlinc/modules/thinlinc/vsm/asyncbase.py”, line 104, in ooOOOoOO0
obj . handle_read_event ( )
File “/usr/lib/python3.8/asyncore.py”, line 420, in handle_read_event
self.handle_read()
File “/usr/lib/python3.8/asynchat.py”, line 151, in handle_read
self.found_terminator()
File “/opt/thinlinc/modules/thinlinc/vsm/xmlrpc.py”, line 555, in found_terminator
self . handle_request ( )
File “/opt/thinlinc/modules/thinlinc/vsm/xmlrpc.py”, line 569, in handle_request
self . handle_method ( )
File “/opt/thinlinc/modules/thinlinc/vsm/vsmagentchannel.py”, line 119, in handle_method
II1IIiiI ( self . vsmagent , sock = self . socket ) . handle ( self . methodname ,
File “/opt/thinlinc/modules/thinlinc/vsm/handler_reqsession.py”, line 50, in handle
self . check_old_client ( )
File “/opt/thinlinc/modules/thinlinc/vsm/handler_reqsession.py”, line 62, in check_old_client
self . check_valid_user ( )
File “/opt/thinlinc/modules/thinlinc/vsm/handler_reqsession.py”, line 69, in check_valid_user
self . setup_session_info ( )
File “/opt/thinlinc/modules/thinlinc/vsm/handler_reqsession.py”, line 95, in setup_session_info
self . find_free_display ( )
File “/opt/thinlinc/modules/thinlinc/vsm/handler_reqsession.py”, line 184, in find_free_display
CheckUnixSocketOpen ( self . parent . log , ii1 ,
File “/opt/thinlinc/modules/thinlinc/vsm/portopencheck.py”, line 39, in init
self . connect ( addr )
File “/usr/lib/python3.8/asyncore.py”, line 338, in connect
self.handle_connect_event()
File “/usr/lib/python3.8/asyncore.py”, line 426, in handle_connect_event

Ok. Do you happen to have other VNC servers running on this system with clients allocating ports? Your issue looks similar to ERROR vsmagent: Unhandled XMLRPC exception: - #2 by CendioOssman

Hi Martin,
Today I restarted my tests with connection.
I stopped xrdp service. Still can’t connect.
It is reported ok, but I get the same error (“No agent server was available”) and also the same XMRPC error.
image

Hello again @oktayhg

Could you try to adjust display_min=10 to display_min=20 in /opt/thinlinc/etc/conf.d/vsmagent.hconf and then restart vsmagent with systemctl restart vsmagent

The error you got in vsmagent.log is similar to the one in the other thread I pasted, have you had a chance to read through it?

https://community.thinlinc.com/t/error-vsmagent-unhandled-xmlrpc-exception/363/2

Hi,
display_min worked.
Now I get dark screen after the below error:
image

I added “unset DBUS_SESSION_BUS_ADDRESS” in /etc/X11/Xsession.d/80mate-environment, but didn’t solve!

Hello,

Please ensure you’re not logged in locally in X with that same user you’re trying to log in with ThinLinc.
That modification to /etc/X11/Xsession.d/80mate-environment is not necessary to get ThinLinc running.

Regards,
Martin

Hi,
display_min worked.
Some users got a dark screen after the below error:
image

I added “unset DBUS_SESSION_BUS_ADDRESS” in /etc/X11/Xsession.d/80mate-environment, but it didn’t solve!
I executed “sudo systemctl restart systemd-logind”, now the problem disappeared.
We will continue toe test from now on eventually.
Many thanks for your support!

1 Like