VNC Session Failed to connect to server

Hi, I’m new to OOD and trying to configure a MATE desktop with TurboVNC.

I can ‘Launch’ an interactive desktop session, it starts, and I can click ‘Launch VNC Desktop Session’. Then it takes me to the NoVNC screen. There is an error message here, ‘Failed to connect to server’.

  batch_connect:
    basic:
      script_wrapper: |
        module purge
        %s
    vnc:
      script_wrapper: |
        module --force purge
        export PATH="/opt/TurboVNC/bin:$PATH"

Output.log is below:

slurmstepd: error: slurm_get_node_energy: Zero Bytes were transmitted or received
slurmstepd: error: _get_joules_task: can't get info from slurmd
Setting VNC password...
Starting VNC server...

Desktop 'TurboVNC: <node01.io>:1 (<user>)' started on display <node01.io>:1

Log file is vnc.log
Successfully started VNC server on <node01>.io:5901...
Script starting...
Starting websocket server...
The system default contains no modules
  (env var: LMOD_SYSTEM_DEFAULT_MODULES is empty)
  No changes in loaded modules

Launching desktop 'mate'...
[websockify]: pid: 230089 (proxying 31403 ==> localhost:5901)
[websockify]: log file: ./websockify.log
[websockify]: waiting ...
_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root

** (mate-settings-daemon:230143): WARNING **: 17:11:13.743: Could not open RFKILL control device, please verify your installation
Window manager warning: Log level 128: unsetenv() is not thread-safe and should not be used after threads are created
Unable to open desktop file /usr/share/applications/firefox.desktop for panel launcher: No such file or directory
Unable to open desktop file /usr/share/applications/thunderbird.desktop for panel launcher: No such file or directory
** Message: 17:11:14.193: couldn't access control socket: /run/user/1541400021/keyring/control: No such file or directory

(polkit-mate-authentication-agent-1:230219): polkit-mate-1-WARNING **: 17:11:14.211: Unable to determine the session we are in: No session for pid 230219
SSH_AUTH_SOCK=/run/user/1541400021/keyring/ssh
SSH_AUTH_SOCK=/run/user/1541400021/keyring/ssh

(caja:230214): Gtk-WARNING **: 17:11:14.310: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client
[websockify]: started successfully (proxying 31403 ==> localhost:5901)
Scanning VNC log file for user authentications...
Generating connection YAML file...

(mate-power-manager:230220): PowerManager-ERROR **: 17:11:14.458: Error in dbus - GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied
Initializing caja-wallpaper extension
Initializing caja-image-converter extension
Initializing caja-open-terminal extension
Initializing caja-xattr-tags extension
Initializing caja-sendto extension

(mate-panel:230176): GVFS-RemoteVolumeMonitor-WARNING **: 17:11:21.992: Owner of volume monitor org.gtk.vfs.MTPVolumeMonitor disconnected from the bus; removing drives/volumes/mounts

(mate-panel:230176): GVFS-RemoteVolumeMonitor-WARNING **: 17:11:21.993: Owner of volume monitor org.gtk.vfs.GPhoto2VolumeMonitor disconnected from the bus; removing drives/volumes/mounts

(mate-settings-daemon:230143): GVFS-RemoteVolumeMonitor-WARNING **: 17:11:21.999: Owner of volume monitor org.gtk.vfs.MTPVolumeMonitor disconnected from the bus; removing drives/volumes/mounts

(mate-settings-daemon:230143): GVFS-RemoteVolumeMonitor-WARNING **: 17:11:21.999: Owner of volume monitor org.gtk.vfs.GPhoto2VolumeMonitor disconnected from the bus; removing drives/volumes/mounts

(mate-settings-daemon:230143): GVFS-RemoteVolumeMonitor-WARNING **: 17:11:22.002: Owner of volume monitor org.gtk.vfs.UDisks2VolumeMonitor disconnected from the bus; removing drives/volumes/mounts

(mate-panel:230176): GVFS-RemoteVolumeMonitor-WARNING **: 17:11:22.013: Owner of volume monitor org.gtk.vfs.UDisks2VolumeMonitor disconnected from the bus; removing drives/volumes/mounts
mate-session[230114]: WARNING: Detected that screensaver has left the bus

(mate-settings-daemon:230143): GLib-GObject-CRITICAL **: 17:11:22.087: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(mate-settings-daemon:230143): GLib-GObject-CRITICAL **: 17:11:22.087: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[1719245473,000,xklavier.c:xkl_engine_start_listen/] 	The backend does not require manual layout management - but it is provided by the application
Window manager warning: CurrentTime used to choose focus window; focus window may not be correct.
Window manager warning: Got a request to focus 0xc00255 (Error) with a timestamp of 0.  This shouldn't happen!
Desktop 'mate' ended with 0 status...
Cleaning up...
Killing Xvnc process ID 230058
slurmstepd: error: slurm_get_node_energy: Zero Bytes were transmitted or received
slurmstepd: error: _get_joules_task: can't get info from slurmd

Any help or guidance would be appreciated as it seems like there are quite a few errors, not sure which ones are the primary ones to fix or if there’s something I need to do, e.g. open up a port.

Two things I would look at are

I don’t know if /run/user/$UID is working for you. Indeed we had to set the XDG_RUNTIME_DIR in the before_script.

You need to remove some packages. The powermanager is mate-power-manager on EL systems I believe (and the log in fact says the same in the beginning of the statement).