Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vncserver wont stay running using domain user account, local account works as expected #1355

Closed
jeremytourville opened this issue Oct 11, 2021 · 8 comments

Comments

@jeremytourville
Copy link

Describe the bug
Using a domain user account to start vncserver@.service file does not error but does not start successfully either. The directrions from HOWTO.md file were followed.
Using a local account works as written in HOWTO.md

To Reproduce
Steps to reproduce the behavior:

  1. Install Centos 8 Stream and choose server with GUI
  2. Join server to domain ipa-client-installl --mkhomedir
  3. Add a local user and set passwd:
useradd user
passwd user
Changing password for user user.
New password: 
Retype new password:
passwd: all authentication tokens updated successfully.

  1. edit /etc/tigervnc/vncserver.users and add accounts for domain user and a local user
  2. edit /etc/gdm/custom.conf and uncomment wayland line. e.g.- WaylandEnable=false
  3. add vncpasswd for both userss:
    su - jeremyt or su - user
vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
A view-only password is not used
  1. try to start service: sudo systemctl start vncserver@:x (where x is display number from vncserver.users file)

Expected behavior
systemctl status vncserver@:x should display active (running) status

Screenshots
N/A.

Client (please complete the following information):
N/A - server won't start so client is not relevant at this point

Server (please complete the following information):

  • OS: CentOS Stream release 8
  • VNC server: TigerVNC
  • VNC server version: tigervnc-server-1.11.0-9.el8.x86_64
  • Server downloaded from: Centos 8 repos
  • Server was started using: sudo systemctl start vncerver@:2

Additional context
/etc/tigervnc/vncserver.users config:

:2=jeremyt@ad.nac-issa.org
:3=user

I have also tried specifying:
:2=jeremyt
This results in the same issue and makes no difference

Both the domain user and local user have only two files in .vnc, the passwd file and the log file

Contents of the domain user log:

Using desktop session gnome

New 'vnc.idm.nac-issa.org:2 (jeremyt@ad.nac-issa.org)' desktop is vnc.idm.nac-issa.org:2

Starting desktop session gnome


Xvnc TigerVNC 1.11.0 - built Jul 21 2021 11:25:16
Copyright (C) 1999-2020 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12011000, The X.Org Foundation


Mon Oct 11 10:42:16 2021
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5902
 vncext:      created VNC server for screen 0
xinit: XFree86_VT property unexpectedly has 0 items instead of 1

** (process:1980): WARNING **: 10:42:17.169: Could not make bus activated clients aware of XDG_CURRENT_DESKTOP=GNOME environment variable: Could not connect: Connection refused

Contents of local user log file:

Using desktop session gnome

New 'vnc.idm.nac-issa.org:3 (user)' desktop is vnc.idm.nac-issa.org:3

Starting desktop session gnome


Xvnc TigerVNC 1.11.0 - built Jul 21 2021 11:25:16
Copyright (C) 1999-2020 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12011000, The X.Org Foundation


Mon Oct 11 12:40:18 2021
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5903
 vncext:      created VNC server for screen 0
xinit: XFree86_VT property unexpectedly has 0 items instead of 1

Mon Oct 11 12:40:19 2021
 ComparingUpdateTracker: 0 pixels in / 0 pixels out
 ComparingUpdateTracker: (1:-nan ratio)


domain user systemctl start:

[root@vnc ~]# systemctl start vncserver@:2
[root@vnc ~]# systemctl status vncserver@:2
● vncserver@:2.service - Remote desktop service (VNC)
Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; disabled; vendor preset: disabled)
Active: inactive (dead)

Oct 11 10:42:16 vnc.idm.nac-issa.org systemd[1]: Starting Remote desktop service (VNC)...
Oct 11 10:42:16 vnc.idm.nac-issa.org systemd[1]: Started Remote desktop service (VNC).
Oct 11 10:42:18 vnc.idm.nac-issa.org systemd[1]: vncserver@:2.service: Succeeded.
Oct 11 12:06:04 vnc.idm.nac-issa.org systemd[1]: Starting Remote desktop service (VNC)...
Oct 11 12:06:04 vnc.idm.nac-issa.org systemd[1]: Started Remote desktop service (VNC).
Oct 11 12:06:05 vnc.idm.nac-issa.org systemd[1]: vncserver@:2.service: Succeeded.

local user systemctl start:

[root@vnc ~]# systemctl start vncserver@:3
[root@vnc ~]# systemctl status vncserver@:3
● vncserver@:3.service - Remote desktop service (VNC)
Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2021-10-11 12:08:56 CDT; 3s ago
Process: 2564 ExecStart=/usr/libexec/vncsession-start :3 (code=exited, status=0/SUCCESS)
Main PID: 2571 (vncsession)
Tasks: 0 (limit: 50559)
Memory: 1.0M
CGroup: /system.slice/system-vncserver.slice/vncserver@:3.service
‣ 2571 /usr/sbin/vncsession user :3

Oct 11 12:08:56 vnc.idm.nac-issa.org systemd[1]: Starting Remote desktop service (VNC)...
Oct 11 12:08:56 vnc.idm.nac-issa.org systemd[1]: Started Remote desktop service (VNC).



@jeremytourville
Copy link
Author

The last line of the domain user log file should say:
xinit: connection to X server lost
Sorry, I missed copying that in my original post.

@CendioOssman
Copy link
Member

Hmm... I'm guessing the desktop environment is crashing somehow, and its logging is in the journal instead of in the vnc log file.

Could you run sudo journalctl -u user-<UID of domain user>.slice and see if you get some results there?

@jeremytourville
Copy link
Author

I hope I entered the command correctly:

sudo journalctl -u user-<UID of domain user>.slice

Let me know if this looks wrong. :-)

[jeremyt@ad.nac-issa.org@vnc ~]$ id -u jeremyt
581401105
[jeremyt@ad.nac-issa.org@vnc ~]$ sudo journalctl -u 581401105.slice
[sudo] password for jeremyt@ad.nac-issa.org: 
-- Logs begin at Mon 2021-10-11 14:31:04 CDT, end at Thu 2021-10-14 09:48:31 CD>
-- No entries --

So it looks like no luck there.

@jeremytourville
Copy link
Author

Ok, so after thinking about it some some more I realized I should probably run:
tail -f /var/log/messages

Doing so, yielded the following log entries:

Oct 14 12:19:27 vnc systemd[1]: Starting Remote desktop service (VNC)...
Oct 14 12:19:27 vnc systemd-logind[1056]: New session 10 of user jeremyt@ad.nac-issa.org.
Oct 14 12:19:27 vnc systemd[1]: Started Session 10 of user jeremyt@ad.nac-issa.org.
Oct 14 12:19:27 vnc systemd[1]: Started Remote desktop service (VNC).
Oct 14 12:19:27 vnc gnome-session[5745]: gnome-session-binary[5745]: WARNING: Could not make bus activated clients aware of QT_IM_MODULE=ibus environment variable: Could not connect: Connection refused
Oct 14 12:19:27 vnc gnome-session[5745]: gnome-session-binary[5745]: WARNING: Could not make bus activated clients aware of XMODIFIERS=@im=ibus environment variable: Could not connect: Connection refused
Oct 14 12:19:27 vnc gnome-session[5745]: gnome-session-binary[5745]: WARNING: Could not make bus activated clients aware of GNOME_DESKTOP_SESSION_ID=this-is-deprecated environment variable: Could not connect: Connection refused
Oct 14 12:19:27 vnc gnome-session[5745]: gnome-session-binary[5745]: WARNING: Could not make bus activated clients aware of XDG_MENU_PREFIX=gnome- environment variable: Could not connect: Connection refused
Oct 14 12:19:27 vnc gnome-session-binary[5745]: WARNING: Could not make bus activated clients aware of QT_IM_MODULE=ibus environment variable: Could not connect: Connection refused
Oct 14 12:19:27 vnc gnome-session-binary[5745]: WARNING: Could not make bus activated clients aware of XMODIFIERS=@im=ibus environment variable: Could not connect: Connection refused
Oct 14 12:19:27 vnc gnome-session-binary[5745]: WARNING: Could not make bus activated clients aware of GNOME_DESKTOP_SESSION_ID=this-is-deprecated environment variable: Could not connect: Connection refused
Oct 14 12:19:27 vnc gnome-session-binary[5745]: WARNING: Could not make bus activated clients aware of XDG_MENU_PREFIX=gnome- environment variable: Could not connect: Connection refused
Oct 14 12:19:27 vnc gnome-session[5745]: gnome-session-binary[5745]: WARNING: Lost name on bus: org.gnome.SessionManager
Oct 14 12:19:27 vnc gnome-session-binary[5745]: WARNING: Lost name on bus: org.gnome.SessionManager
Oct 14 12:19:27 vnc gnome-session[5745]: Unable to init server: Could not connect: Connection refused
Oct 14 12:19:27 vnc journal[5770]: Cannot open display: 
Oct 14 12:19:28 vnc systemd[1]: vncserver@:2.service: Succeeded.
Oct 14 12:19:28 vnc systemd[1]: session-10.scope: Succeeded.
Oct 14 12:19:28 vnc systemd-logind[1056]: Session 10 logged out. Waiting for processes to exit.
Oct 14 12:19:28 vnc systemd-logind[1056]: Removed session 10.

So, I guess the question to be solved is why the connection is refused. I am weak on the GUI in Linux but I am trying to learn. In fairness to the TigerVNC team, maybe my issue is with gnome and not tigervnc?

@CendioOssman
Copy link
Member

I think it is complaining about d-bus, which is supposed to be started by systemd for the user. Are those every line you got from the log? Or have you removed some things?

Have you tried reporting this bug to CentOS/Red Hat? This looks more like a bug in something in the system rather than TigerVNC.

@grulja, anything that looks familiar?

@grulja
Copy link
Contributor

grulja commented Nov 10, 2021

Hi, sorry for late answer. Unfortunately it doesn't look familiar, to me it looks like issue related to the system and not to TigerVNC. I would try to investigate this myself, but I've been recently quite busy.

@CendioOssman
Copy link
Member

Okay. @jeremytourville, please report the issue to Red Hat and we'll see if we can get one of their experts to have a look at this. Most of the errors are from gnome-session, so that's probably a good start as the component to use.

@gschwaer
Copy link

I had a similar issue on Xubuntu. And I found this issue because it also reported

xinit: XFree86_VT property unexpectedly has 0 items instead of 1

In the end my mistake was that I missed the following line in the HOWTO.md:

You will not be able to start a TigerVNC server for a user who is already logged into a graphical session.

Just for the record if someone else stumbles upon this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants