noVNC only works with full hostname

When I spawn an interactive desktop, noVNC says “Failed to connect to server”.

output.log:

f12 console:

websock.js:185 WebSocket connection to 'wss://ood.unity.rc.umass.edu/rnode/login-build001/14147/websockify' failed: 
open @ websock.js:185
rfb.js:255 WebSocket on-error event
(anonymous) @ rfb.js:255
rfb.js:721 Failed when connecting: Connection closed (code: 1006)
_fail @ rfb.js:721
rfb.js:442 connecting to wss://ood.unity.rc.umass.edu:443/rnode/login-build001/14147/websockify
websock.js:185 WebSocket connection to 'wss://ood.unity.rc.umass.edu/rnode/login-build001/14147/websockify' failed: 
open @ websock.js:185
rfb.js:255 WebSocket on-error event
(anonymous) @ rfb.js:255
rfb.js:721 Failed when connecting: Connection closed (code: 1006)

But, if I go to Settings > WebSocket and I change Path from rnode/<hostname>/<port>/websockify
to
rnode/<hostname>.<domain-name>/<port>/websockify
or
node/<hostname>.<domain-name>/<port>/websockify
it works.
Why could that be?

I was reading about node vs rnode, and it says rnode is a relative URI. Is it the case that <hostname> is relative and <hostname>.<domain-name> is absolute?

I only installed dependencies on one node (called login-build001). And I made it so that Slurm will make sure my job goes to that one node:

# /etc/ood/config/apps/bc_desktop/submit/my_submit.yml.erb
---
script:
  native:
    - "-w"
    - "login-build001"
    - "-p"
    - "building"

(this node can only be scheduled via the building partition)

Is it possible that this -w nodelist specification could break the URL?

Also, is it a problem that output.log reports:

WebSocket server settings:
  - Listen on :29025
  - No SSL/TLS support (no cert file)
  - Backgrounding (daemon)

It says no SSL support, but when I connect, noVNC says that it’s encrypted.

Found the solution!
I had to change set_host from hostname to hostname.dnsdomainname

clusters/.yml

---
v2:
  batch_connect:
    basic:
      set_host: "host=$(hostname).$(dnsdomainname)"
    vnc:
      set_host: "host=$(hostname).$(dnsdomainname)"