RHEL9 Websockify

Hello, I am trying to get the interactive desktop application working on a RHEL9 Slurm cluster. I’ve run into a show stopper with websockify, it seems maybe OOD is hardcoded to look in opt for it?

From the log:

/var/spool/slurm/d/job04034/slurm_script: line 206: /opt/websockify/run: No such file or directory

Despite having version 0.11 installed via dnf on our compute nodes:

rpm -qa | grep python3-websockify
python3-websockify-0.11.0-1.el9.noarch

I’m assuming this is a path issue? We’re running TurboVNC as a VNC server.

Thanks!

Edit: from the launch script OOD generated:

start_websockify() {
  local log_file="./websockify.log"
  # launch websockify in background and redirect all output to a file.
  ${WEBSOCKIFY_CMD:-/opt/websockify/run} $1 --heartbeat=${WEBSOCKIFY_HEARTBEAT_SECONDS:-30} $2 &> $log_file &
  local ws_pid=$!
  local counter=0
  local max_timeout=${WEBSOCKIFY_TIMEOUT_SECONDS:-10}

Definitely looks like it’s getting the websockify path from here. Anyway to change where that looks?

Figured out a few things, namely that I can set this in the cluster definition:

  batch_connect:
    vnc:
      websockify_cmd: "/usr/bin/websockify"

That seems to work, the OOD script now:

start_websockify() {
  local log_file="./websockify.log"
  # launch websockify in background and redirect all output to a file.
  /usr/bin/websockify $1 --heartbeat=${WEBSOCKIFY_HEARTBEAT_SECONDS:-30} $2 &> $log_file &

However, it seems websockify 0.11 is throwing an error:

Traceback (most recent call last):
  File "/usr/bin/websockify", line 33, in <module>
    sys.exit(load_entry_point('websockify==0.11.0', 'console_scripts', 'websockify')())
  File "/usr/bin/websockify", line 25, in importlib_load_entry_point
    return next(matches).load()
StopIteration

So that changes the scope of this problem. I’ll keep digging on that, does OOD need an older or newer version of websockify? The documentation says 0.8+ but I know RHEL tends to be a bit behind.

OSC uses 0.11.0 though it’s through a module. Did you get 0.11.0 off of dnf/yum?

Also I’m wondering if that’s the full stack trace. It doesn’t appear to be.

Yes, it came through DNF. Package was python3-websockify.

I agree on the stack trace, but that’s all that is in the websockify.log file from the job. Trying to get more information out of it.

I went down the virtual environment path with Websockify and that seemed to work. Something must missing from the RHEL compiled version. So for anyone reading this thread in the future you need to create a venv or Lmod to run Websockify, adjust the path in your cluster definition thusly:

  batch_connect:
    vnc:
      websockify_cmd: "/hpc/venv/websockify/bin/websockify"

I just did a quick and dirty virtual environment here. Just make sure this is shared out on NFS or otherwise accessible by your compute nodes.