Centos 7 issues starting TigerVNC server service

Issues related to applications and software problems
Post Reply
steenert
Posts: 4
Joined: 2022/07/07 11:25:27

Centos 7 issues starting TigerVNC server service

Post by steenert » 2022/07/07 11:44:06

Hi,

I have been trying to start a TigerVNC server on port 5901 in order to remote-control the Gnome GUI of our Centos 7 server. However when starting the service using:

Code: Select all

sudo systemctl start vncserver@:1
It appears to fail. Checking the service status shows the following:

Code: Select all

[admin@jump001 ~]$ sudo systemctl status vncserver@:1
● vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2022-07-07 13:20:38 CEST; 7s ago
  Process: 3944 ExecStop=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
  Process: 4011 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
 Main PID: 4017 (vncserver_wrapp)
   CGroup: /system.slice/system-vncserver.slice/vncserver@:1.service
           ├─4017 /bin/sh /usr/bin/vncserver_wrapper admin :1
           └─4329 sleep 0.1

Jul 07 13:20:38 jump001.ipbb.mgt.local systemd[1]: Starting Remote desktop service (VNC)...
Jul 07 13:20:38 jump001.ipbb.mgt.local systemd[1]: Started Remote desktop service (VNC).
Jul 07 13:20:41 jump001.ipbb.mgt.local vncserver_wrapper[4017]: New 'jump001.ipbb.mgt.local:1 (admin)' desktop is jump001.ipbb.mgt.local:1
Jul 07 13:20:41 jump001.ipbb.mgt.local vncserver_wrapper[4017]: Starting applications specified in /home/admin/.vnc/xstartup
Jul 07 13:20:41 jump001.ipbb.mgt.local vncserver_wrapper[4017]: Log file is /home/admin/.vnc/jump001.ipbb.mgt.local:1.log

[admin@jump001 ~]$ sudo systemctl status vncserver@:1
● vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2022-07-07 13:20:46 CEST; 4s ago
  Process: 4345 ExecStop=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
  Process: 4017 ExecStart=/usr/bin/vncserver_wrapper admin %i (code=exited, status=2)
  Process: 4011 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
 Main PID: 4017 (code=exited, status=2)

Jul 07 13:20:38 jump001.ipbb.mgt.local systemd[1]: Starting Remote desktop service (VNC)...
Jul 07 13:20:38 jump001.ipbb.mgt.local systemd[1]: Started Remote desktop service (VNC).
Jul 07 13:20:41 jump001.ipbb.mgt.local vncserver_wrapper[4017]: New 'jump001.ipbb.mgt.local:1 (admin)' desktop is jump001.ipbb.mgt.local:1
Jul 07 13:20:41 jump001.ipbb.mgt.local vncserver_wrapper[4017]: Starting applications specified in /home/admin/.vnc/xstartup
Jul 07 13:20:41 jump001.ipbb.mgt.local vncserver_wrapper[4017]: Log file is /home/admin/.vnc/jump001.ipbb.mgt.local:1.log
Jul 07 13:20:46 jump001.ipbb.mgt.local vncserver_wrapper[4017]: FATAL: 'vncserver :1' failed to start after 5 seconds!
Jul 07 13:20:46 jump001.ipbb.mgt.local systemd[1]: vncserver@:1.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 07 13:20:46 jump001.ipbb.mgt.local systemd[1]: Unit vncserver@:1.service entered failed state.
Jul 07 13:20:46 jump001.ipbb.mgt.local systemd[1]: vncserver@:1.service failed.
The vnc log shows the following:

Code: Select all

[admin@jump001 ~]$ cat /home/admin/.vnc/jump001.ipbb.mgt.local:1.log

Xvnc TigerVNC 1.8.0 - built Oct 13 2020 16:13:03
Copyright (C) 1999-2017 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12004000, The X.Org Foundation


Thu Jul  7 13:20:38 2022
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5901
 vncext:      created VNC server for screen 0
/home/admin/.vnc/xstartup: line 5:  4055 Terminated              /etc/X11/xinit/xinitrc
Killing Xvnc process ID 4049
[admin@jump001 ~]$
The xstartup file contains:

Code: Select all

[admin@jump001 ~]$ cat /home/admin/.vnc/xstartup
#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
/etc/X11/xinit/xinitrc
#dbus-launch /usr/bin/startx &
# Assume either Gnome or KDE will be started by default when installed
# We want to kill the session automatically in this case when user logs out. In case you modify
# /etc/X11/xinit/Xclients or ~/.Xclients yourself to achieve a different result, then you should
# be responsible to modify below code to avoid that your session will be automatically killed
if [ -e /usr/bin/gnome-session -o -e /usr/bin/startkde ]; then
    vncserver -kill $DISPLAY
fi
/var/log/messages shows the following:

Code: Select all

[admin@jump001 ~]$ sudo tail /var/log/messages       
Jul  7 13:36:59 localhost systemd: Starting Remote desktop service (VNC)...
Jul  7 13:36:59 localhost systemd: Started Remote desktop service (VNC).
Jul  7 13:36:59 localhost systemd: Started Session c6 of user admin.
Jul  7 13:36:59 localhost systemd: Starting Session c6 of user admin.
Jul  7 13:37:02 localhost vncserver_wrapper: New 'jump001.ipbb.mgt.local:1 (admin)' desktop is jump001.ipbb.mgt.local:1
Jul  7 13:37:02 localhost vncserver_wrapper: Starting applications specified in /home/admin/.vnc/xstartup
Jul  7 13:37:02 localhost vncserver_wrapper: Log file is /home/admin/.vnc/jump001.ipbb.mgt.local:1.log
Jul  7 13:37:03 localhost com.redhat.imsettings: [ 1657193823.068945]: IMSettings-Daemon[4654]: INFO: Starting imsettings-daemon...
Jul  7 13:37:03 localhost com.redhat.imsettings: [ 1657193823.069156]: IMSettings-Daemon[4654]: INFO:   [HOME=/home/admin/.config/imsettings]
Jul  7 13:37:03 localhost com.redhat.imsettings: [ 1657193823.069231]: IMSettings-Daemon[4654]: INFO:   [XINPUTRCDIR=/etc/X11/xinit/]
Jul  7 13:37:03 localhost com.redhat.imsettings: [ 1657193823.069294]: IMSettings-Daemon[4654]: INFO:   [XINPUTDIR=/etc/X11/xinit/xinput.d/]
Jul  7 13:37:03 localhost com.redhat.imsettings: [ 1657193823.069350]: IMSettings-Daemon[4654]: INFO:   [MODULEDIR=/usr/lib64/imsettings]
Jul  7 13:37:03 localhost com.redhat.imsettings: [ 1657193823.069410]: IMSettings-Daemon[4654]: INFO:   [MODULES=gsettings]
Jul  7 13:37:03 localhost org.a11y.Bus: Activating service name='org.a11y.atspi.Registry'
Jul  7 13:37:03 localhost org.a11y.Bus: Successfully activated service 'org.a11y.atspi.Registry'
Jul  7 13:37:03 localhost org.a11y.atspi.Registry: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Jul  7 13:37:03 localhost gnome-session: gnome-session-binary[4561]: WARNING: software acceleration check failed: Child process exited with code 1
Jul  7 13:37:03 localhost gnome-session-binary[4561]: WARNING: software acceleration check failed: Child process exited with code 1
Jul  7 13:37:03 localhost journal: Cannot open display: 
Jul  7 13:37:03 localhost org.a11y.atspi.Registry: X connection to :1 broken (explicit kill or server shutdown).
Jul  7 13:37:03 localhost com.redhat.imsettings: [ 1657193823.523999]: IMSettings-Daemon[4654]: INFO: Release the ownership of com.redhat.imsettings
Jul  7 13:37:03 localhost org.gtk.vfs.Daemon: A connection to the bus can't be made
Jul  7 13:37:03 localhost com.redhat.imsettings: Exiting...
Jul  7 13:37:03 localhost com.redhat.imsettings: [ 1657193823.524303]: GLib-GIO[4654]: CRITICAL **: Error while sending AddMatch() message: The connection is closed
Jul  7 13:37:03 localhost com.redhat.imsettings: [ 1657193823.524429]: GLib-GIO[4654]: CRITICAL **: Error while sending AddMatch() message: The connection is closed
Jul  7 13:37:03 localhost com.redhat.imsettings: [ 1657193823.524655]: IMSettings-Daemon[4654]: INFO: Unloading imesttings module: gsettings
Jul  7 13:37:03 localhost com.redhat.imsettings: [ 1657193823.524791]: IMSettings-Daemon[4654]: INFO: imsettings-daemon is shut down.
Jul  7 13:37:08 localhost vncserver_wrapper: FATAL: 'vncserver :1' failed to start after 5 seconds!
Jul  7 13:37:08 localhost systemd: vncserver@:1.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Jul  7 13:37:08 localhost systemd: Unit vncserver@:1.service entered failed state.
Jul  7 13:37:08 localhost systemd: vncserver@:1.service failed.
Jul  7 13:37:14 localhost journal: No devices in use, exit
[admin@jump001 ~]$ 
vnc packages:

Code: Select all

[admin@jump001 ~]$ yum list installed | grep vnc
gtk-vnc2.x86_64                            0.7.0-2.el7                 @anaconda
gvnc.x86_64                                0.7.0-2.el7                 @anaconda
tigervnc-icons.noarch                      1.8.0-22.el7                @updates 
tigervnc-license.noarch                    1.8.0-1.el7                 @anaconda
tigervnc-server.x86_64                     1.8.0-21.el7                installed
tigervnc-server-minimal.x86_64             1.8.0-21.el7                installed
[admin@jump001 ~]$ 
This machine unfortunately does not have internet access.
If anyone has seen this before, or knows what might be wrong looking at the logs, please let me know :).

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 7 issues starting TigerVNC server service

Post by TrevorH » 2022/07/07 11:54:11

Jul 7 13:37:03 localhost gnome-session-binary[4561]: WARNING: software acceleration check failed: Child process exited with code 1
Something to do with that. What mesa* packages are installed?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

steenert
Posts: 4
Joined: 2022/07/07 11:25:27

Re: Centos 7 issues starting TigerVNC server service

Post by steenert » 2022/07/07 12:10:38

Hi Trevor, thanks for your reply.

The installed mesa packages are the following:

Code: Select all

[admin@jump001 ~]$ yum list installed | grep mesa
mesa-dri-drivers.x86_64                    17.0.1-6.20170307.el7       @anaconda
mesa-filesystem.x86_64                     17.0.1-6.20170307.el7       @anaconda
mesa-khr-devel.x86_64                      18.3.4-12.el7_9             @updates 
mesa-libEGL.x86_64                         18.3.4-12.el7_9             @updates 
mesa-libEGL-devel.x86_64                   18.3.4-12.el7_9             @updates 
mesa-libGL.x86_64                          18.3.4-12.el7_9             @updates 
mesa-libGL-devel.x86_64                    18.3.4-12.el7_9             @updates 
mesa-libGLES.x86_64                        18.3.4-12.el7_9             @updates 
mesa-libGLU.x86_64                         9.0.0-4.el7                 @base    
mesa-libGLU-devel.x86_64                   9.0.0-4.el7                 @base    
mesa-libgbm.x86_64                         18.3.4-12.el7_9             @updates 
mesa-libglapi.x86_64                       18.3.4-12.el7_9             @updates 
mesa-libxatracker.x86_64                   17.0.1-6.20170307.el7       @anaconda
mesa-private-llvm.x86_64                   3.9.1-3.el7                 @anaconda
[admin@jump001 ~]$

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 7 issues starting TigerVNC server service

Post by TrevorH » 2022/07/07 12:47:56

Well I'd start by running yum update since, for example, your copy of mesa-dri-drivers claims to be version 17.0.1-6.20170307.el7 when the current one is mesa-dri-drivers-18.3.4-12.el7_9.x86_64
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

steenert
Posts: 4
Joined: 2022/07/07 11:25:27

Re: Centos 7 issues starting TigerVNC server service

Post by steenert » 2022/07/07 13:30:43

This system is not connected to the internet and a repository is not available to it unfortunately.

Would manually updating the packages found here: https://pkgs.org/search/?q=mesa also be sufficient?

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 7 issues starting TigerVNC server service

Post by TrevorH » 2022/07/07 15:07:20

The problem is that you have no idea what undocumented dependencies newer versions of packages have. They don't get tested against every combination of previously installed things, only that the latest version of X works when everything else is up to date.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

steenert
Posts: 4
Joined: 2022/07/07 11:25:27

Re: Centos 7 issues starting TigerVNC server service

Post by steenert » 2022/07/08 18:14:07

Updating my packages was indeed the way to go! It is working now.

I used this method to update my packages: https://serverfault.com/questions/97497 ... alled-pac

I had to transfer my updates package files from a "online" system (VM in my case) to my "offline" system.

Thanks for the help @TrevorH

Post Reply