# noVNC only works with full hostname

**URL:** <https://discourse.openondemand.org/t/novnc-only-works-with-full-hostname/2420>\
**Category:** Get Help\
**Created:** [January 2, 2023, 7:57pm UTC](https://discourse.openondemand.org/t/novnc-only-works-with-full-hostname/2420 "2023-01-02T19:57:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)\
**Post date:** [January 2, 2023, 7:57pm UTC](https://discourse.openondemand.org/t/novnc-only-works-with-full-hostname/2420/1 "2023-01-02T19:57:02Z")

</div>

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

output.log:

> **[Setting VNC password...Starting VNC server...WARNING: login-build001:1 is -...](https://pastebin.com/FkP4Cg9a)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

f12 console:

```auto
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:

```auto
# /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?

---

<div class="post-metadata">

**Author:** ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)\
**Post date:** [January 2, 2023, 7:59pm UTC](https://discourse.openondemand.org/t/novnc-only-works-with-full-hostname/2420/2 "2023-01-02T19:59:23Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)\
**Post date:** [January 2, 2023, 8:50pm UTC](https://discourse.openondemand.org/t/novnc-only-works-with-full-hostname/2420/3 "2023-01-02T20:50:35Z")

</div>

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

clusters/.yml

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

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [July 1, 2023, 8:51pm UTC](https://discourse.openondemand.org/t/novnc-only-works-with-full-hostname/2420/4 "2023-07-01T20:51:22Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
