# Initial setup Desktop noVNC not working - Failed to connect to server

**URL:** <https://discourse.openondemand.org/t/initial-setup-desktop-novnc-not-working-failed-to-connect-to-server/1546>\
**Category:** Get Help\
**Tags:** question\
**Created:** [June 17, 2021, 3:21pm UTC](https://discourse.openondemand.org/t/initial-setup-desktop-novnc-not-working-failed-to-connect-to-server/1546 "2021-06-17T15:21:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![keithOSU](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/keithosu/32/731_2.png) [@keithOSU](https://discourse.openondemand.org/u/keithOSU)\
**Post date:** [June 17, 2021, 3:21pm UTC](https://discourse.openondemand.org/t/initial-setup-desktop-novnc-not-working-failed-to-connect-to-server/1546/1 "2021-06-17T15:21:21Z")

</div>

New install via puppet.

Job submits and reserves node.

Launch Desktop-\> Web page for noVNC comes up and errors “Failed to connect to server”

Any help appreciated.

Thanks  
Keith

output.log =

```nohighlight
Lmod has detected the following error: User module collection: "module" does
not exist.
  Try "module savelist" for possible choices.

Setting VNC password...
Starting VNC server...

Desktop 'TurboVNC: u125.unity:2 (stewart.358)' started on display u125.unity:2

Log file is vnc.log
Successfully started VNC server on u125.unity:5902...
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 'xfce'...
WebSocket server settings:
  - Listen on :22543
  - Flash security policy server
  - No SSL/TLS support (no cert file)
  - Backgrounding (daemon)
Scanning VNC log file for user authentications...
Generating connection YAML file...
generating cookie with syscall
generating cookie with syscall
generating cookie with syscall
generating cookie with syscall

(xfce4-session:20438): xfce4-session-WARNING **: 10:56:58.653: xfsm_manager_load_session: Something wrong with /home/stewart.358/.cache/sessions/xfce4-session-u125.unity:2, Does it exist? Permissions issue?

(xfwm4:20445): xfwm4-WARNING **: 10:56:58.785: Error opening /dev/dri/card0: Permission denied

```

/usr/local/share/lmodfiles/base/websockify/0.8.0.lua

```nohighlight
setenv("WEBSOCKIFY_CMD", "/usr/bin/websockify")

```

puppet file

```nohighlight
openondemand::clusters:
  unity:
    cluster_title: 'Unity Cluster'
    login_host: unity.asc.ohio-state.edu
    job_adapter: slurm
    job_conf: /etc/slurm/slurm.conf
    job_debug: true
    batch_connect:
      basic:
        script_wrapper: "module restore\n%s"
      vnc:
        script_wrapper: "module restore\nmodule load turbovnc\nmodule load websockify\n%s"

```

[root@u125 log]# which websockify  
/usr/bin/websockify

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [June 17, 2021, 3:37pm UTC](https://discourse.openondemand.org/t/initial-setup-desktop-novnc-not-working-failed-to-connect-to-server/1546/2 "2021-06-17T15:37:38Z")

</div>

Hi a fellow buckeye! I didn’t realize OSU had another deployment of OnDemand?!

In any case, looks like everything went well on the backend. What are the logs from the browser? Chrome will let you open dev tools on a new window.

I’m looking for this and any errors relate to it. Basically I want to be sure that you’ve setup to allow websocket upgrades. Again, everything looks good on the backend so I’m wondering if it’s a client issue. You also may want to try a different browser.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/1X/86952e5a7a7394b114b49b5658e186eec981e235.png)

---

<div class="post-metadata">

**Author:** ![keithOSU](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/keithosu/32/731_2.png) [@keithOSU](https://discourse.openondemand.org/u/keithOSU)\
**Post date:** [June 17, 2021, 10:53pm UTC](https://discourse.openondemand.org/t/initial-setup-desktop-novnc-not-working-failed-to-connect-to-server/1546/3 "2021-06-17T22:53:14Z")

</div>

Here’s my output:

(As for another install at OSU, there’s not a public one yet. Production at the end of July)

 ![Screen Shot 2021-06-17 at 6.47.29 PM](https://us1.discourse-cdn.com/flex015/uploads/osc/original/1X/adaf92d46823f541b39177dd09e103e8efeea032.png)

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [June 17, 2021, 11:16pm UTC](https://discourse.openondemand.org/t/initial-setup-desktop-novnc-not-working-failed-to-connect-to-server/1546/4 "2021-06-17T23:16:57Z")

</div>

Thanks! Though I’m looking for the response code which I can’t see there. I’m looking to ensure you can 101 upgrade.

---

<div class="post-metadata">

**Author:** ![keithOSU](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/keithosu/32/731_2.png) [@keithOSU](https://discourse.openondemand.org/u/keithOSU)\
**Post date:** [June 18, 2021, 7:39pm UTC](https://discourse.openondemand.org/t/initial-setup-desktop-novnc-not-working-failed-to-connect-to-server/1546/5 "2021-06-18T19:39:11Z")

</div>

I’ve found a fix.

My puppet file was…

> openondemand::host\_regex: ‘(u)\d+’

the CORRECT value should be:

> openondemand::host\_regex: ‘u\d+.unity’

My noVNC URL is:  
[https://ondemand-dev.asc.ohio-state.edu/pun/sys/dashboard/noVNC-1.1.0/vnc.html?utf8=✓&autoconnect=true&path=rnode%2Fu125.unity%2F34822%2Fwebsockify&resize=remote&password=REMOVED&compressionsetting=6&qualitysetting=2&commit=Launch+Unity+VDI](https://ondemand-dev.asc.ohio-state.edu/pun/sys/dashboard/noVNC-1.1.0/vnc.html?utf8=%E2%9C%93&autoconnect=true&path=rnode%2Fu125.unity%2F34822%2Fwebsockify&resize=remote&password=REMOVED&compressionsetting=6&qualitysetting=2&commit=Launch+Unity+VDI)

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:42pm UTC](https://discourse.openondemand.org/t/initial-setup-desktop-novnc-not-working-failed-to-connect-to-server/1546/6 "2022-05-26T15:42:53Z")

</div>


