Websockify timeout?

OoD version - 3.1.1

The session will attempt to start the desktop, it will eventually timeout and change to completed.
Clicking the arrows again on that same job to relaunch results in a successful desktop launch.

I’m seeing the following in the log.
Launching desktop ‘mate’…
No such schema “org.mate.screensaver”
[websockify]: pid: 9270 (proxying 40636 ==> localhost:5901)
[websockify]: log file: ./websockify.log
[websockify]: waiting …
[websockify]: timed-out :(!
Cleaning up…
Killing Xvnc process ID 9218
Xvnc seems to be deadlocked. Kill the process manually and then re-run
/opt/TurboVNC/bin/vncserver -kill :1
to clean up the socket files.

Is this indicating that websockify isn’t starting in time ?
Since websockify never starts the websockify.log is empty.

Thank you.

I’m sure there is a better way to fix this, but this seemed to work.
Changed to 10seconds -/opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.1-1/gems/ood_core-0.24.2/lib/ood_core/batch_connect/templates/vnc.rb

              elif [ $counter -ge **10** ]; then
                # timeout after ~5 seconds
                echo "[websockify]: timed-out :(!" >&2

Thanks for taking the time to fix it on your side. I’ll take a look at the library and see what we can do.

1 Like

If 10 works for you, then I’ll just increase the timeout to 10 on our side too.

It’s rare but I have found it would fail on 10 on slower servers.
Maybe 15 or 20 is the way to go. Can’t hurt either way.

Thanks for the quick response and a fantastic tool!

1 Like

I wonder if there’s more to this if it takes more than 10 seconds to boot up…

The use case is a bit different here vs. physical servers.
This is in AWS using EC2s so boot up time will be extended if the EC2 isn’t already up. EC2s are terminated after each job so generally speaking a new server is booting up each time.

I had the same issue with OOD 3.1.4.
I solved the issue by setting the timeout to 10 seconds.
This may be caused by using a slow ARM CPU.

I’m getting timeouts across the board no matter what timeout value I use. These are not slow servers, dual AMD EPYC 7H12 64-Core Processor. I forced the submit to use an idle server. I tried values up to 90 seconds, the reset it to 30.

I turned off selinux and firewalld with same results. So none of my rules are blocking.

Remote desktop is the only app I can’t get to run on 3.1.1.

/opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.4-1/gems/ood_core-0.25.0/lib/ood_core/batch_connect/templates/vnc.rb

elif [ $counter -ge 30 ]; then
# timeout after ~30 seconds
echo “[websockify]: timed-out :(!” >&2
return 1

Can you share your output.log and vnc.log. Seems like if you set to 30 or 60 seconds (or even 300) it’s enough time to ssh into the machine and see what’s going on.

websockify version on compute node: websockify-0.10.0-py3.6.egg
it’s in the /usr/local/bin/ folder, so it’s in default PATH.

output.log:

Setting VNC password…
Starting VNC server…

Desktop ‘TurboVNC: tempest-epyc002:1 (w55c785)’ started on display tempest-epyc002:1

Log file is vnc.log
Successfully started VNC server on tempest-epyc002:5901…
Script starting…
Starting websocket server…
ERROR: Collection default cannot be found
Launching desktop ‘xfce’…
[websockify]: pid: 3763963 (proxying 54853 ==> localhost:5901)
[websockify]: log file: ./websockify.log
[websockify]: waiting …
_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root

(xfwm4:3763971): xfwm4-WARNING **: 10:01:24.803: GLX extension missing, GLX support disabled.

(xfsettingsd:3763992): xfsettingsd-WARNING **: 10:01:24.902: Unknown mode ‘1536x717 @ 60.0’ for output VNC-0, aborting.

** (xfce4-screensaver:3764009): WARNING **: 10:01:25.211: screensaver already running in this session

** (wrapper-2.0:3764020): WARNING **: 10:01:25.444: No outputs have backlight property

(wrapper-2.0:3764015): libnotify-WARNING **: 10:01:25.459: Failed to connect to proxy

(wrapper-2.0:3764015): Gtk-WARNING **: 10:01:25.488: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PulseaudioButton)

(wrapper-2.0:3764020): Gtk-WARNING **: 10:01:25.491: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PowerManagerButton)

(wrapper-2.0:3764031): Gtk-WARNING **: 10:01:25.548: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner XfceArrowButton)
[websockify]: timed-out after 90 seconds :(!
Cleaning up…
Killing Xvnc process ID 3763885
Desktop ‘xfce’ ended with 1 status…

vnc.log:

TurboVNC Server (Xvnc) 64-bit v3.1 (build 20231117)
Copyright (C) 1999-2023 The VirtualGL Project and many others (see README.md)
Visit http://www.TurboVNC.org for more information on TurboVNC

26/06/2024 10:01:23 Using security configuration file /etc/turbovncserver-security.conf
26/06/2024 10:01:23 Enabled security type ‘tlsvnc’
26/06/2024 10:01:23 Enabled security type ‘tlsotp’
26/06/2024 10:01:23 Enabled security type ‘tlsplain’
26/06/2024 10:01:23 Enabled security type ‘x509vnc’
26/06/2024 10:01:23 Enabled security type ‘x509otp’
26/06/2024 10:01:23 Enabled security type ‘x509plain’
26/06/2024 10:01:23 Enabled security type ‘vnc’
26/06/2024 10:01:23 Enabled security type ‘otp’
26/06/2024 10:01:23 Enabled security type ‘unixlogin’
26/06/2024 10:01:23 Enabled security type ‘plain’
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
26/06/2024 10:01:23 Desktop name ‘TurboVNC: tempest-epyc002:1 (w55c785)’ (tempest-epyc002:1)
26/06/2024 10:01:23 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
26/06/2024 10:01:23 Listening for VNC connections on TCP port 5901
26/06/2024 10:01:23 Interface 0.0.0.0
26/06/2024 10:01:23 Framebuffer: BGRX 8/8/8/8
26/06/2024 10:01:23 New desktop size: 800 x 600
26/06/2024 10:01:23 New screen layout:
26/06/2024 10:01:23 0x00000040 (output 0x00000040): 800x600+0+0
26/06/2024 10:01:23 Maximum clipboard transfer size: 1048576 bytes
26/06/2024 10:01:23 VNC extension running!

Sorry - it looks like I’d need the websockify.log as well. The expression in the shell script waits until is sees something like this in websockify.log. Somehow grep cannot find this?

  - proxying from :23437 to localhost:5908

Websockify.log is 0 bytes, for every session that I have tried to start.

Kenny

Upgrading my websockify to 0.12.0 did the trick. I’ll reset the timeout value back to 5.

The Xfce job started up in about 1 second.

Kenny