# Websockify timeout?

**URL:** <https://discourse.openondemand.org/t/websockify-timeout/3389>\
**Category:** Get Help\
**Created:** [March 28, 2024, 9:38pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389 "2024-03-28T21:38:10Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![maestro7879](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/maestro7879/32/1865_2.png) [@maestro7879](https://discourse.openondemand.org/u/maestro7879)\
**Post date:** [March 28, 2024, 9:38pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/1 "2024-03-28T21:38:10Z")

</div>

OoD version - 3.1.1

The session will attempt to start the desktop, it will eventually timeout and change to completed.  
Clicking the arrows again on that same job to relaunch results in a successful desktop launch.

I’m seeing the following in the log.  
Launching desktop ‘mate’…  
No such schema “org.mate.screensaver”  
[websockify]: pid: 9270 (proxying 40636 ==\> localhost:5901)  
[websockify]: log file: ./websockify.log  
[websockify]: waiting …  
[websockify]: timed-out :(!  
Cleaning up…  
Killing Xvnc process ID 9218  
Xvnc seems to be deadlocked. Kill the process manually and then re-run  
/opt/TurboVNC/bin/vncserver -kill :1  
to clean up the socket files.

Is this indicating that websockify isn’t starting in time ?  
Since websockify never starts the websockify.log is empty.

Thank you.

---

<div class="post-metadata">

**Author:** ![maestro7879](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/maestro7879/32/1865_2.png) [@maestro7879](https://discourse.openondemand.org/u/maestro7879)\
**Post date:** [March 28, 2024, 10:32pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/2 "2024-03-28T22:32:35Z")

</div>

I’m sure there is a better way to fix this, but this seemed to work.  
Changed to 10seconds -/opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.1-1/gems/ood\_core-0.24.2/lib/ood\_core/batch\_connect/templates/vnc.rb

```
              elif [$counter -ge **10**]; then
                # timeout after ~5 seconds
                echo "[websockify]: timed-out :(!" >&2

```

---

<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:** [March 29, 2024, 1:32pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/3 "2024-03-29T13:32:18Z")

</div>

Thanks for taking the time to fix it on your side. I’ll take a look at the library and see what we can do.

---

<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:** [March 29, 2024, 2:04pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/4 "2024-03-29T14:04:21Z")

</div>

If 10 works for you, then I’ll just increase the timeout to 10 on our side too.

---

<div class="post-metadata">

**Author:** ![maestro7879](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/maestro7879/32/1865_2.png) [@maestro7879](https://discourse.openondemand.org/u/maestro7879)\
**Post date:** [March 29, 2024, 2:11pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/5 "2024-03-29T14:11:01Z")

</div>

It’s rare but I have found it would fail on 10 on slower servers.  
Maybe 15 or 20 is the way to go. Can’t hurt either way.

Thanks for the quick response and a fantastic tool!

---

<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:** [March 29, 2024, 2:14pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/6 "2024-03-29T14:14:50Z")

</div>

> [@maestro7879](#):
>
> It’s rare but I have found it would fail on 10 on slower servers.

I wonder if there’s more to this if it takes more than 10 seconds to boot up…

---

<div class="post-metadata">

**Author:** ![maestro7879](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/maestro7879/32/1865_2.png) [@maestro7879](https://discourse.openondemand.org/u/maestro7879)\
**Post date:** [March 29, 2024, 2:24pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/7 "2024-03-29T14:24:33Z")

</div>

The use case is a bit different here vs. physical servers.  
This is in AWS using EC2s so boot up time will be extended if the EC2 isn’t already up. EC2s are terminated after each job so generally speaking a new server is booting up each time.

---

<div class="post-metadata">

**Author:** ![mnakao](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mnakao/32/1001_2.png) [@mnakao](https://discourse.openondemand.org/u/mnakao)\
**Post date:** [April 21, 2024, 12:00pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/8 "2024-04-21T12:00:06Z")

</div>

I had the same issue with OOD 3.1.4.  
I solved the issue by setting the timeout to 10 seconds.  
This may be caused by using a slow ARM CPU.

---

<div class="post-metadata">

**Author:** ![kenny.hanson](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kenny.hanson](https://discourse.openondemand.org/u/kenny.hanson)\
**Post date:** [June 26, 2024, 4:05pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/9 "2024-06-26T16:05:23Z")

</div>

I’m getting timeouts across the board no matter what timeout value I use. These are not slow servers, dual AMD EPYC 7H12 64-Core Processor. I forced the submit to use an idle server. I tried values up to 90 seconds, the reset it to 30.

I turned off selinux and firewalld with same results. So none of my rules are blocking.

Remote desktop is the only app I can’t get to run on 3.1.1.

/opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.4-1/gems/ood\_core-0.25.0/lib/ood\_core/batch\_connect/templates/vnc.rb

> elif [$counter -ge 30]; then  
> # timeout after ~30 seconds  
> echo “[websockify]: timed-out :(!” \>&2  
> return 1

---

<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 26, 2024, 4:43pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/10 "2024-06-26T16:43:18Z")

</div>

Can you share your `output.log` and `vnc.log`. Seems like if you set to 30 or 60 seconds (or even 300) it’s enough time to ssh into the machine and see what’s going on.

---

<div class="post-metadata">

**Author:** ![kenny.hanson](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kenny.hanson](https://discourse.openondemand.org/u/kenny.hanson)\
**Post date:** [June 26, 2024, 5:13pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/11 "2024-06-26T17:13:08Z")

</div>

websockify version on compute node: websockify-0.10.0-py3.6.egg  
it’s in the /usr/local/bin/ folder, so it’s in default PATH.

output.log:

> Setting VNC password…  
> Starting VNC server…
> 
> Desktop ‘TurboVNC: tempest-epyc002:1 (w55c785)’ started on display tempest-epyc002:1
> 
> Log file is vnc.log  
> Successfully started VNC server on tempest-epyc002:5901…  
> Script starting…  
> Starting websocket server…  
> ERROR: Collection default cannot be found  
> Launching desktop ‘xfce’…  
> [websockify]: pid: 3763963 (proxying 54853 ==\> localhost:5901)  
> [websockify]: log file: ./websockify.log  
> [websockify]: waiting …  
> \_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root
> 
> (xfwm4:3763971): xfwm4-WARNING \*\*: 10:01:24.803: GLX extension missing, GLX support disabled.
> 
> (xfsettingsd:3763992): xfsettingsd-WARNING \*\*: 10:01:24.902: Unknown mode ‘1536x717 @ 60.0’ for output VNC-0, aborting.
> 
> \*\* (xfce4-screensaver:3764009): WARNING \*\*: 10:01:25.211: screensaver already running in this session
> 
> \*\* (wrapper-2.0:3764020): WARNING \*\*: 10:01:25.444: No outputs have backlight property
> 
> (wrapper-2.0:3764015): libnotify-WARNING \*\*: 10:01:25.459: Failed to connect to proxy
> 
> (wrapper-2.0:3764015): Gtk-WARNING \*\*: 10:01:25.488: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PulseaudioButton)
> 
> (wrapper-2.0:3764020): Gtk-WARNING \*\*: 10:01:25.491: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PowerManagerButton)
> 
> (wrapper-2.0:3764031): Gtk-WARNING \*\*: 10:01:25.548: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner XfceArrowButton)  
> [websockify]: timed-out after 90 seconds :(!  
> Cleaning up…  
> Killing Xvnc process ID 3763885  
> Desktop ‘xfce’ ended with 1 status…

vnc.log:

> TurboVNC Server (Xvnc) 64-bit v3.1 (build 20231117)  
> Copyright (C) 1999-2023 The VirtualGL Project and many others (see README.md)  
> Visit [http://www.TurboVNC.org](http://www.TurboVNC.org) for more information on TurboVNC
> 
> 26/06/2024 10:01:23 Using security configuration file /etc/turbovncserver-security.conf  
> 26/06/2024 10:01:23 Enabled security type ‘tlsvnc’  
> 26/06/2024 10:01:23 Enabled security type ‘tlsotp’  
> 26/06/2024 10:01:23 Enabled security type ‘tlsplain’  
> 26/06/2024 10:01:23 Enabled security type ‘x509vnc’  
> 26/06/2024 10:01:23 Enabled security type ‘x509otp’  
> 26/06/2024 10:01:23 Enabled security type ‘x509plain’  
> 26/06/2024 10:01:23 Enabled security type ‘vnc’  
> 26/06/2024 10:01:23 Enabled security type ‘otp’  
> 26/06/2024 10:01:23 Enabled security type ‘unixlogin’  
> 26/06/2024 10:01:23 Enabled security type ‘plain’  
> \_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root  
> 26/06/2024 10:01:23 Desktop name ‘TurboVNC: tempest-epyc002:1 (w55c785)’ (tempest-epyc002:1)  
> 26/06/2024 10:01:23 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t  
> 26/06/2024 10:01:23 Listening for VNC connections on TCP port 5901  
> 26/06/2024 10:01:23 Interface 0.0.0.0  
> 26/06/2024 10:01:23 Framebuffer: BGRX 8/8/8/8  
> 26/06/2024 10:01:23 New desktop size: 800 x 600  
> 26/06/2024 10:01:23 New screen layout:  
> 26/06/2024 10:01:23 0x00000040 (output 0x00000040): 800x600+0+0  
> 26/06/2024 10:01:23 Maximum clipboard transfer size: 1048576 bytes  
> 26/06/2024 10:01:23 VNC extension running!

---

<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 26, 2024, 5:20pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/12 "2024-06-26T17:20:10Z")

</div>

Sorry - it looks like I’d need the `websockify.log` as well. The expression in the shell script waits until is sees something like this in `websockify.log`. Somehow `grep` cannot find this?

```auto
  - proxying from :23437 to localhost:5908

```

---

<div class="post-metadata">

**Author:** ![kenny.hanson](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kenny.hanson](https://discourse.openondemand.org/u/kenny.hanson)\
**Post date:** [June 26, 2024, 6:27pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/13 "2024-06-26T18:27:23Z")

</div>

Websockify.log is 0 bytes, for every session that I have tried to start.

Kenny

---

<div class="post-metadata">

**Author:** ![kenny.hanson](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kenny.hanson](https://discourse.openondemand.org/u/kenny.hanson)\
**Post date:** [June 26, 2024, 7:04pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/14 "2024-06-26T19:04:02Z")

</div>

Upgrading my websockify to 0.12.0 did the trick. I’ll reset the timeout value back to 5.

The Xfce job started up in about 1 second.

Kenny

---

<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:** [December 23, 2024, 7:04pm UTC](https://discourse.openondemand.org/t/websockify-timeout/3389/15 "2024-12-23T19:04:23Z")

</div>

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