# Desktop app fails to connect

**URL:** https://discourse.openondemand.org/t/desktop-app-fails-to-connect/2954
**Category:** Get Help
**Tags:** question
**Created:** [September 11, 2023, 7:48pm UTC](https://discourse.openondemand.org/t/desktop-app-fails-to-connect/2954 "2023-09-11T19:48:35Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![badamifs](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/badamifs/32/954_2.png) [@badamifs](https://discourse.openondemand.org/u/badamifs)
#### Post date: [September 11, 2023, 7:48pm UTC](https://discourse.openondemand.org/t/desktop-app-fails-to-connect/2954/1 "2023-09-11T19:48:35Z")

</div>

Hello, I am working on a fresh install of OOD on Ubuntu 22.04 (migrating from CentOS 7). All dependencies seem to be installed but running into the following issue:

```auto
Setting VNC password...
Starting VNC server...

WARNING: n006.cluster.pssclabs.com:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server n006.cluster.pssclabs.com:1
Killing Xvnc process ID 754372
Xvnc process ID 754372 already killed
Xvnc did not appear to shut down cleanly. Removing /tmp/.X11-unix/X1
Xvnc did not appear to shut down cleanly. Removing /tmp/.X1-lock

Desktop 'TurboVNC: n006.cluster.pssclabs.com:1 (faizanbadami)' started on display n006.cluster.pssclabs.com:1

Log file is vnc.log
Successfully started VNC server on n006.cluster.pssclabs.com:5901...
Script starting...
Starting websocket server...
ERROR: Collection default cannot be found
Launching desktop 'xfce'...
WebSocket server settings:
  - Listen on :45376
  - No SSL/TLS support (no cert file)
  - Backgrounding (daemon)
Scanning VNC log file for user authentications...
Generating connection YAML file...

(xfwm4:754842): xfwm4-WARNING **: 12:44:37.223: Unsupported GL renderer (llvmpipe (LLVM 15.0.7, 256 bits)).

**(xiccd:754891): WARNING**: 12:44:38.010: EDID is empty

**(xiccd:754891): CRITICAL**: 12:44:38.028: failed to create colord device: failed to obtain org.freedesktop.color-manager.create-device auth

(polkit-gnome-authentication-agent-1:754884): polkit-gnome-1-WARNING **: 12:44:38.040: Unable to determine the session we are in: No session for pid 754884

**(xfce4-screensaver:754877): WARNING**: 12:44:38.064: screensaver already running in this session

```

---

<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: [September 11, 2023, 8:01pm UTC](https://discourse.openondemand.org/t/desktop-app-fails-to-connect/2954/2 "2023-09-11T20:01:20Z")

</div>

Those errors are hard to diagnose because I’m never quite sure if they matter or not and I don’t see anything there that’s really fatal.

I’d look for these 2 things:

- What is the behavior you see from the client?
- When you start this job up - get a shell session to the compute node if you can. Issue `ps` and so on to see if everything is infact up and running like `vncserver` and `xfwm4`,

---

<div class="post-metadata">

### Author: ![badamifs](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/badamifs/32/954_2.png) [@badamifs](https://discourse.openondemand.org/u/badamifs)
#### Post date: [September 11, 2023, 8:10pm UTC](https://discourse.openondemand.org/t/desktop-app-fails-to-connect/2954/3 "2023-09-11T20:10:30Z")

</div>

Hi Jeff,

Thank you for the quick response.

1. I see a “Failed to connect to server” message on the noVNC page
2. Here is the output I get on the node where this job is running:

```auto
root@n006:~# ps -aux |grep xfce
faizanb+ 755542 0.0 0.0 447784 79124 ? Sl 12:53 0:00 xfce4-session
faizanb+ 755559 0.0 0.0 231004 6448 ? Sl 12:53 0:00 /usr/lib/x86_64-linux-gnu/xfce4/xfconf/xfconfd
faizanb+ 755567 0.0 0.0 297120 27196 ? Sl 12:53 0:00 /usr/bin/xfce4-screensaver
faizanb+ 755593 0.0 0.0 262124 24928 ? Sl 12:53 0:00 xfce4-panel
faizanb+ 755618 0.0 0.0 256536 17516 ? Sl 12:53 0:00 /usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd
root 756238 0.0 0.0 4024 2132 pts/0 S+ 13:05 0:00 grep --color=auto xfce
root@n006:~# ps -aux |grep xfwm4
faizanb+ 755581 0.0 0.0 488348 96860 ? Sl 12:53 0:00 xfwm4
root 756246 0.0 0.0 4024 2168 pts/0 S+ 13:05 0:00 grep --color=auto xfwm4
root@n006:~# ps -aux |grep vncserver
root 756255 0.0 0.0 4024 2092 pts/0 S+ 13:05 0:00 grep --color=auto vncserver

```

---

<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: [September 11, 2023, 8:16pm UTC](https://discourse.openondemand.org/t/desktop-app-fails-to-connect/2954/4 "2023-09-11T20:16:08Z")

</div>

OK - before you do what I’ve laid out below I want do to this quick spot check.

- have you enabled `node_uri` and `rnod_uri` in `ood_portal.yml`. You need to if you haven’t.
- Be sure you’ve got the correct `host_regex` in `ood_portal.yml` too.

Once you’ve done those and it still isn’t working - we have to debug more in Chrome because you need to set this feature that only chrome has:

- Open up the developer tools in Chrome
- Navigate to the options (the cog near the top of the developer tools)
- check this box.

![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/7/7e96cce5959889b0a0004c377d74c029e576f384.png)

With this enabled

- open your dev tools on the interactive sessions page
- when you click the ‘connect to desktop’ button - dev tools should still be open on the new tab
- on the new tab (that presumably says ‘failed to connect to server’) look at the network tab for anything that’s failed.

---

<div class="post-metadata">

### Author: ![badamifs](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/badamifs/32/954_2.png) [@badamifs](https://discourse.openondemand.org/u/badamifs)
#### Post date: [September 11, 2023, 8:27pm UTC](https://discourse.openondemand.org/t/desktop-app-fails-to-connect/2954/5 "2023-09-11T20:27:41Z")

</div>

Hi Jeff,

here is what I have in the **ood\_portal.yml**

```auto
host_regex: '[\w.-]+\.cluster\.com'

#ONLY FOR TESTING
auth:
  - 'AuthType Basic'
  - 'AuthName "Open OnDemand"'
  - 'AuthBasicProvider PAM'
  - 'AuthPAMService ood'
  - 'Require valid-user'
user_map_cmd: "/opt/ood/ood_auth_map/bin/basic.mapfile"

node_uri: '/node'

rnode_uri: '/rnode'

```

After changing the chrome setting I see the following error on the “console” nothing for the “network” tab:

```auto
websock.js:231 WebSocket connection to 'ws://clusterhn.cluster.pssclabs.com/rnode/n006.cluster.pssclabs.com/50812/websockify' failed: 
open @ websock.js:231
rfb.js:607 WebSocket on-error event
_socketError @ rfb.js:607
rfb.js:831 Failed when connecting: Connection closed (code: 1006)
_fail @ rfb.js:831
vnc.html:1 The resource http://clusterhn.cluster.pssclabs.com/pun/sys/dashboard/noVNC-1.3.0/app/images/warning.svg was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
vnc.html:1 The resource http://clusterhn.cluster.pssclabs.com/pun/sys/dashboard/noVNC-1.3.0/app/images/info.svg was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.

```

---

<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: [September 11, 2023, 8:33pm UTC](https://discourse.openondemand.org/t/desktop-app-fails-to-connect/2954/6 "2023-09-11T20:33:54Z")

</div>

`n006.cluster.pssclabs.com` is the hostname, but your `host_regex`, (`'[\w.-]+\.cluster\.com'`) doesn’t account for the `pssclabs` portion.

---

<div class="post-metadata">

### Author: ![badamifs](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/badamifs/32/954_2.png) [@badamifs](https://discourse.openondemand.org/u/badamifs)
#### Post date: [September 11, 2023, 8:43pm UTC](https://discourse.openondemand.org/t/desktop-app-fails-to-connect/2954/7 "2023-09-11T20:43:28Z")

</div>

I changed the regex to:  
`host_regex: '[\w.-]+\.cluster\.pssclabs\.com'`

But I am still seeing the same error.

---

<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: [September 11, 2023, 8:45pm UTC](https://discourse.openondemand.org/t/desktop-app-fails-to-connect/2954/8 "2023-09-11T20:45:56Z")

</div>

Be sure to bounce apache for it to take affect. Plus in the network tab you should see `403 forbidden` for this request specifically (if it’s still the same issue).

---

<div class="post-metadata">

### Author: ![badamifs](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/badamifs/32/954_2.png) [@badamifs](https://discourse.openondemand.org/u/badamifs)
#### Post date: [September 11, 2023, 9:07pm UTC](https://discourse.openondemand.org/t/desktop-app-fails-to-connect/2954/9 "2023-09-11T21:07:18Z")

</div>

Ok great. That seems to have done the trick.

Thank you so much for your help.

---

<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: [March 9, 2024, 9:07pm UTC](https://discourse.openondemand.org/t/desktop-app-fails-to-connect/2954/10 "2024-03-09T21:07:40Z")

</div>

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