RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1853608 - Fail to start tigervnc server
Summary: Fail to start tigervnc server
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: tigervnc
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Jan Grulich
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-03 10:23 UTC by Han Han
Modified: 2021-05-18 15:28 UTC (History)
7 users (show)

Fixed In Version: tigervnc-1.11.0-6.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:28:37 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
journalctl log for comment8 (1.17 MB, text/plain)
2020-09-01 03:12 UTC, Yuxin Sun
no flags Details

Description Han Han 2020-07-03 10:23:14 UTC
Description of problem:
As subject

Version-Release number of selected component (if applicable):
xorg-x11-server-common-1.20.8-3.el8.x86_64
tigervnc-server-1.10.1-5.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Disable wayland for the remote desktop
➜  ~ cat /etc/gdm/custom.conf 
# GDM configuration storage

[daemon]
# Uncoment the line below to force the login screen to use Xorg
WaylandEnable=false

➜  ~ systemctl get-default            
graphical.target
  
➜  ~ reboot

➜  ~ ps aux|grep xorg -i
gdm         2452  0.0  0.2 2768036 67072 tty1    Sl+  Jul02   0:00 /usr/libexec/Xorg vt1 -displayfd 3 -auth /run/user/42/gdm/Xauthority -background none -noreset -keeptty -verbose 3


2. Add a use to /etc/tigervnc/vncserver.users
➜  ~ tail -1 /etc/tigervnc/vncserver.users
:1=root


3. Try to start vncserver
➜  ~ systemctl start vncserver@:1.service
➜  ~ systemctl status vncserver@:1.service
● vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

Jul 03 06:09:30 hp-dl385g10-15.lab.eng.pek2.redhat.com systemd[1]: Starting Remote desktop service (VNC)...
Jul 03 06:09:30 hp-dl385g10-15.lab.eng.pek2.redhat.com systemd[1]: Started Remote desktop service (VNC).
Jul 03 06:09:31 hp-dl385g10-15.lab.eng.pek2.redhat.com systemd[1]: vncserver@:1.service: Succeeded.

4. Try to start vnc by vncsession-start:
➜  ~ /usr/libexec/vncsession-start :1 

5. Debug vncsession-start:
...
+ '[' -z root ']'
+ exec /usr/sbin/vncsession root :1

try to start vnc by: vncsession
➜  ~ vncsession root :1 
➜  ~ echo $?
0
➜  ~ ps aux|grep vnc -i 


Actual results:
As above. Vncsession returned success but vnc server was not started.

Expected results:
vnc server started

Additional info:

Comment 1 Jan Grulich 2020-07-03 10:38:25 UTC
Did you run "vncpasswd" for the root user?

Comment 2 Jan Grulich 2020-07-03 11:21:57 UTC
Works for me:

[root@rhel82 ~]# systemctl start vncserver@:1
[root@rhel82 ~]# systemctl status vncserver@:1
● vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; disabled; vendor>
   Active: active (running) since Fri 2020-07-03 13:19:49 CEST; 6s ago
  Process: 2557 ExecStart=/usr/libexec/vncsession-start :1 (code=exited, status>
 Main PID: 2562 (vncsession)
    Tasks: 1 (limit: 23802)
   Memory: 2.3M
   CGroup: /system.slice/system-vncserver.slice/vncserver@:1.service
           ‣ 2562 /usr/sbin/vncsession root :1
 
Jul 03 13:19:49 rhel82 systemd[1]: Starting Remote desktop service (VNC)...
Jul 03 13:19:49 rhel82 systemd[1]: Started Remote desktop service (VNC).

Comment 3 Han Han 2020-07-06 01:48:47 UTC
(In reply to Jan Grulich from comment #1)
> Did you run "vncpasswd" for the root user?

Yes. Bug reproduced after vncpasswd.

Comment 4 Jan Grulich 2020-07-06 17:10:00 UTC
I tested the latest build and it just works. Any chance you used tigervnc before for the "root" user on the same machine? Can you try removing /root/.vnc and creating it again with vncpasswd?

Comment 5 Yuxin Sun 2020-08-27 03:43:17 UTC
Hi,

I also hit it in in RHEL-8.3.0-20200925.0. 

# systemctl status vncserver@:1.service
● vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

Aug 27 11:35:32 wala83test108130847-vm1 systemd[1]: Starting Remote desktop service (VNC)...
Aug 27 11:35:32 wala83test108130847-vm1 systemd[1]: Started Remote desktop service (VNC).
Aug 27 11:35:34 wala83test108130847-vm1 systemd[1]: vncserver@:1.service: Succeeded.

# rpm -qa|grep vnc
gtk-vnc2-0.9.0-2.el8.x86_64
tigervnc-server-1.10.1-7.el8.x86_64
tigervnc-server-minimal-1.10.1-7.el8.x86_64
tigervnc-license-1.10.1-7.el8.noarch
tigervnc-server-module-1.10.1-7.el8.x86_64
libvncserver-0.9.11-15.el8_2.1.x86_64
gvnc-0.9.0-2.el8.x86_64
tigervnc-1.10.1-7.el8.x86_64
tigervnc-selinux-1.10.1-7.el8.noarch
tigervnc-icons-1.10.1-7.el8.noarch

# rpm -qa|grep xorg
xorg-x11-xkb-utils-7.7-28.el8.x86_64
xorg-x11-drv-fbdev-0.5.0-2.el8.x86_64
xorg-x11-drv-intel-2.99.917-39.20200205.el8.x86_64
xorg-x11-server-Xwayland-1.20.8-6.el8.x86_64
xorg-x11-drv-wacom-0.38.0-1.el8.x86_64
xorg-x11-drv-ati-19.1.0-1.el8.x86_64
xorg-x11-xinit-session-1.3.4-18.el8.x86_64
xorg-x11-server-Xorg-1.20.8-6.el8.x86_64
xorg-x11-xauth-1.0.9-12.el8.x86_64
xorg-x11-drv-evdev-2.10.6-2.el8.x86_64
xorg-x11-fonts-misc-7.5-19.el8.noarch
xorg-x11-drv-libinput-0.29.0-1.el8.x86_64
xorg-x11-drv-wacom-serial-support-0.38.0-1.el8.x86_64
xorg-x11-drv-vmware-13.2.1-8.el8.x86_64
xorg-x11-drv-qxl-0.1.5-11.el8.x86_64
xorg-x11-drv-vesa-2.4.0-3.el8.x86_64
xorg-x11-drv-nouveau-1.0.15-4.el8.1.x86_64
xorg-x11-xinit-1.3.4-18.el8.x86_64
xorg-x11-font-utils-7.5-40.el8.x86_64
xorg-x11-server-common-1.20.8-6.el8.x86_64
xorg-x11-utils-7.5-28.el8.x86_64
xorg-x11-server-utils-7.7-27.el8.x86_64

Comment 6 Jan Grulich 2020-08-27 05:48:59 UTC
(In reply to Yuxin Sun from comment #5)
> Hi,
> 
> I also hit it in in RHEL-8.3.0-20200925.0. 
> 
> # systemctl status vncserver@:1.service
> ● vncserver@:1.service - Remote desktop service (VNC)
>    Loaded: loaded (/etc/systemd/system/vncserver@.service; disabled; vendor
> preset: disabled)
>    Active: inactive (dead)
> 
> Aug 27 11:35:32 wala83test108130847-vm1 systemd[1]: Starting Remote desktop
> service (VNC)...
> Aug 27 11:35:32 wala83test108130847-vm1 systemd[1]: Started Remote desktop
> service (VNC).
> Aug 27 11:35:34 wala83test108130847-vm1 systemd[1]: vncserver@:1.service:
> Succeeded.
> 

Did you follow all the steps mentioned in the HOWTO.md file shipped with Tigervnc? You seem to be running the old systemd service located in /etc/systemd/system/vncserver@.service. You are supposed to remove that one and then the newly installed service file located in /usr/lib/systemd/system/vncserver@.service will be used. This is all mentioned in the HOWTO.

Comment 7 Yuxin Sun 2020-08-27 06:56:35 UTC
(In reply to Jan Grulich from comment #6)
> (In reply to Yuxin Sun from comment #5)
> 
> Did you follow all the steps mentioned in the HOWTO.md file shipped with
> Tigervnc? You seem to be running the old systemd service located in
> /etc/systemd/system/vncserver@.service. You are supposed to remove that one
> and then the newly installed service file located in
> /usr/lib/systemd/system/vncserver@.service will be used. This is all
> mentioned in the HOWTO.

Hi Jan,

I copied the /usr/lib/systemd/system/vncserver@.service to /etc/systemd/system/vncserver@.service. They are the same files.
Besides, I just removed the /etc/systemd/system/vncserver@.service and start the service again and got the same result.

Comment 8 Jan Grulich 2020-08-31 10:03:33 UTC
Can you show me tigervnc log from $HOME/.vnc/hostname:1.log? Anything in journal, check that by running "journalctl --since "1 hour ago" for example.

Comment 9 Yuxin Sun 2020-09-01 03:04:51 UTC
[root@wala83test108130847-vm1 ~]# cat ~/.vnc/wala83test108130847-vm1\:1.log 
Using desktop session com.redhat.Kiosk

New 'wala83test108130847-vm1:1 (root)' desktop is wala83test108130847-vm1:1

Starting desktop session com.redhat.Kiosk


Xvnc TigerVNC 1.10.0 - built Jul  8 2020 14:00:34
Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12008000, The X.Org Foundation


Tue Sep  1 11:00:54 2020
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5901
 vncext:      created VNC server for screen 0
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86MonBrightnessCycle
> Warning:          Could not resolve keysym XF86RotationLockToggle
Errors from xkbcomp are not fatal to the X server
xinit: XFree86_VT property unexpectedly has 0 items instead of 1
xinit: connection to X server lost

waiting for X server to shut down 
Tue Sep  1 11:00:55 2020
 ComparingUpdateTracker: 0 pixels in / 0 pixels out
 ComparingUpdateTracker: (1:-nan ratio)

Comment 10 Yuxin Sun 2020-09-01 03:12:49 UTC
Created attachment 1713243 [details]
journalctl log for comment8

Comment 11 Jan Grulich 2020-09-01 04:48:14 UTC
Is the root user logged in graphically? I see you are starting Kiosk mode, I'm not sure this mode has been working over VNC. Can you try running session=gnome?

Comment 12 Yuxin Sun 2020-09-01 07:42:02 UTC
(In reply to Jan Grulich from comment #11)
> Is the root user logged in graphically? I see you are starting Kiosk mode,
> I'm not sure this mode has been working over VNC. Can you try running
> session=gnome?

Hi Jan,

Sorry I'm not quite familiar with vnc debugging. Could you please help to figure out the details, such as which file should I modify and do I need to restart any service? 

Thanks!

Comment 13 Jan Grulich 2020-09-01 11:44:11 UTC
(In reply to Yuxin Sun from comment #12)
> (In reply to Jan Grulich from comment #11)
> > Is the root user logged in graphically? I see you are starting Kiosk mode,
> > I'm not sure this mode has been working over VNC. Can you try running
> > session=gnome?
> 
> Hi Jan,
> 
> Sorry I'm not quite familiar with vnc debugging. Could you please help to
> figure out the details, such as which file should I modify and do I need to
> restart any service? 
> 
> Thanks!

Did you follow the documentation for the new Tigervnc? There it mentions you can configure session type.

Comment 14 Yuxin Sun 2020-09-02 01:44:32 UTC
(In reply to Jan Grulich from comment #13)
> (In reply to Yuxin Sun from comment #12)
> > (In reply to Jan Grulich from comment #11)
> > > Is the root user logged in graphically? I see you are starting Kiosk mode,
> > > I'm not sure this mode has been working over VNC. Can you try running
> > > session=gnome?
> > 
> > Hi Jan,
> > 
> > Sorry I'm not quite familiar with vnc debugging. Could you please help to
> > figure out the details, such as which file should I modify and do I need to
> > restart any service? 
> > 
> > Thanks!
> 
> Did you follow the documentation for the new Tigervnc? There it mentions you
> can configure session type.

Thanks Jan! Just saw it. Set session=gnome in ~/.vnc/config and restart the service. The service can be started successfully.

[root@wala83test108130847-vm1 ~]# cat ~/.vnc/config
session=gnome

[root@wala83test108130847-vm1 ~]# systemctl status vncserver@:1.service
● vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-09-02 09:29:08 CST; 50s ago
  Process: 17942 ExecStart=/usr/libexec/vncsession-start :1 (code=exited, status=0/SUCCESS)
 Main PID: 17948 (vncsession)
    Tasks: 1 (limit: 20503)
   Memory: 1.4M
   CGroup: /system.slice/system-vncserver.slice/vncserver@:1.service
           ‣ 17948 /usr/sbin/vncsession root :1

Sep 02 09:29:08 wala83test108130847-vm1 systemd[1]: Starting Remote desktop service (VNC)...
Sep 02 09:29:08 wala83test108130847-vm1 systemd[1]: Started Remote desktop service (VNC).

[root@wala83test108130847-vm1 ~]# netstat -antp|grep 5901
tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN      18893/Xvnc          
tcp6       0      0 :::5901                 :::*                    LISTEN      18893/Xvnc  


So that the session=gnome is the must configuration of using tigervnc-server right?

Comment 15 Jan Grulich 2020-09-11 14:50:40 UTC
It is not the must, other session types should work as well, however the kiosk mode doesn't work for some reason and I'm not sure it's Tigervnc related.

Comment 16 Jan Grulich 2020-09-22 14:11:36 UTC
@Han, is this still a problem?

Comment 17 John Call 2020-09-30 08:04:01 UTC
(In reply to Jan Grulich from comment #11)
> Is the root user logged in graphically?


Just some comments from the peanut gallery...  It seems likely to me that the root user was logged in graphically to the system's console when root's VNC session tried to start.  Not good.
Looks like a pretty significant change[1] between tigervnc-server-1.9...el8.rpm and tigervnc-server-1.10...el8.rpm  This will be weird for RHEL8 folks since both versions are available...
It was cool that I could have my jcall user logged into the same system twice (at the same time) before.  But the new configuration method seems much easier/cleaner.
[1] - https://github.com/TigerVNC/tigervnc/commit/1af1cfdf8709dd1a5574efa19fb4f0e68a98021e#diff-4f8cb32c09f9d1c8b1a617a7eae01314


--- ./1.9.0-9.el8.x86_64/usr/lib/systemd/user/vncserver@.service	2019-02-09 03:21:59.000000000 -0700
+++ ./1.10.1-7.el8.x86_64/usr/lib/systemd/system/vncserver@.service	2020-07-08 07:59:22.000000000 -0600
@@ -1,23 +1,11 @@
 # The vncserver service unit file
 #
-# Quick HowTo: As the User wanting to have this functionality
-#
-# 1. Copy this file to ~/.config/systemd/user/ (Optional, in case default settings are not suitable)
-#
-#   $ mkdir -p ~/.config/systemd/user
-#   $ cp /usr/lib/systemd/user/vncserver@.service ~/.config/systemd/user/
-#
-# 2. Reload user's systemd
-#
-#    $ systemctl --user daemon-reload
-#
-# 3. Start the service immediately and enable it at boot
-#
-#    $ systemctl --user enable vncserver@:<display>.service --now
-#
-# 4. Enable lingering
-#
-#    $ loginctl enable-linger
+# Quick HowTo:
+# 1. Add a user mapping to /etc/tigervnc/vncserver.users.
+# 2. Adjust the global or user configuration. See the
+#    vncsession(8) manpage for details. (OPTIONAL)
+# 3. Run `systemctl enable vncserver@:<display>.service`
+# 4. Run `systemctl start vncserver@:<display>.service`

Comment 19 Han Han 2020-10-09 09:31:25 UTC
(In reply to Jan Grulich from comment #8)
> Can you show me tigervnc log from $HOME/.vnc/hostname:1.log? Anything in
> journal, check that by running "journalctl --since "1 hour ago" for example.

It works after set session=gnome in ~/.vnc/config
Version: tigervnc-server-1.10.1-7.el8.x86_64

Comment 20 Mike Cao 2020-11-16 08:50:17 UTC
I can reproduce this issue on my server. The issue could be fixed after adding session=gnome in ~/.vnc/config


environment:
[root@lenovo-sr850p-01 .vnc]# rpm -qa|grep vnc
libvncserver-0.9.11-15.el8_2.1.x86_64
tigervnc-server-minimal-1.10.1-7.el8.x86_64
gvnc-0.9.0-2.el8.x86_64
tigervnc-icons-1.10.1-7.el8.noarch
tigervnc-selinux-1.10.1-7.el8.noarch
tigervnc-server-module-1.10.1-7.el8.x86_64
tigervnc-license-1.10.1-7.el8.noarch
tigervnc-server-applet-1.9.0-15.el8_1.noarch
gtk-vnc2-0.9.0-2.el8.x86_64
tigervnc-server-1.10.1-7.el8.x86_64
tigervnc-1.10.1-7.el8.x86_64
[root@lenovo-sr850p-01 .vnc]# rpm -qa|grep xorg
xorg-x11-drv-libinput-0.29.0-1.el8.x86_64
xorg-x11-server-common-1.20.8-6.el8.x86_64
xorg-x11-xinit-1.3.4-18.el8.x86_64
xorg-x11-server-utils-7.7-27.el8.x86_64
xorg-x11-drv-nouveau-1.0.15-4.el8.1.x86_64
xorg-x11-server-Xwayland-1.20.8-6.el8.x86_64
xorg-x11-xauth-1.0.9-12.el8.x86_64
xorg-x11-xinit-session-1.3.4-18.el8.x86_64
xorg-x11-drv-vesa-2.4.0-3.el8.x86_64
abrt-addon-xorg-2.10.9-20.el8.x86_64
xorg-x11-drv-vmware-13.2.1-8.el8.x86_64
xorg-x11-xkb-utils-7.7-28.el8.x86_64
xorg-x11-drv-ati-19.1.0-1.el8.x86_64
xorg-x11-drv-qxl-0.1.5-11.el8.x86_64
xorg-x11-drv-wacom-serial-support-0.38.0-1.el8.x86_64
xorg-x11-drv-wacom-0.38.0-1.el8.x86_64
xorg-x11-font-utils-7.5-40.el8.x86_64
xorg-x11-utils-7.5-28.el8.x86_64
xorg-x11-fonts-Type1-7.5-19.el8.noarch
xorg-x11-fonts-ISO8859-1-100dpi-7.5-19.el8.noarch
xorg-x11-drv-evdev-2.10.6-2.el8.x86_64
xorg-x11-server-Xorg-1.20.8-6.el8.x86_64
xorg-x11-drv-intel-2.99.917-39.20200205.el8.x86_64
xorg-x11-drv-fbdev-0.5.0-2.el8.x86_64

Comment 21 Jan Grulich 2020-11-16 10:12:59 UTC
Without specifying "session=gnome" it should fallback to the first session it can find in /usr/share/xsessions. Can you post what is your log output once you start vncserver without specifying the "session" paramater? The log is in "$HOME/.vnc/hostname:x.log".

In my case without specifying the "session" parameter it is:
>Using desktop session gnome-classic
>
>New 'fedora:2 (testvnc)' desktop is fedora:2
>
>Starting desktop session gnome-classic

Comment 31 faraz.hussain 2021-04-19 21:04:16 UTC
I am running Redhat 8.3 and am running into the same issue. Unfortunately the proposed fix of adding "session=gnome" to the config did not do anything.  I tried doing a "yum update". The error in my VNC log file is:

Errors from xkbcomp are not fatal to the X server
xinit: XFree86_VT property unexpectedly has 0 items instead of 1
xinit: connection to X server lost

waiting for X server to shut down

Not sure how to debug furthur. I also notice I can't login to the kiosk ( physical machine ) anymore via the graphical interface. It just gives me the command line login proompt.

Comment 32 faraz.hussain 2021-04-19 21:45:38 UTC
Seems I got it working again by simply doing a "yum groupinstall -y "Server with GUI" ". I am not sure how/why this fixed it.

Comment 34 errata-xmlrpc 2021-05-18 15:28:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: tigervnc security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1783


Note You need to log in before you can comment on or make changes to this bug.