# Websockify novnc - failed to connect to server - 400 error

**URL:** <https://discourse.openondemand.org/t/websockify-novnc-failed-to-connect-to-server-400-error/3489>\
**Category:** Get Help\
**Created:** [May 15, 2024, 9:11pm UTC](https://discourse.openondemand.org/t/websockify-novnc-failed-to-connect-to-server-400-error/3489 "2024-05-15T21:11:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vallerul](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/vallerul/32/963_2.png) [@vallerul](https://discourse.openondemand.org/u/vallerul)\
**Post date:** [May 15, 2024, 9:11pm UTC](https://discourse.openondemand.org/t/websockify-novnc-failed-to-connect-to-server-400-error/3489/1 "2024-05-15T21:11:48Z")

</div>

Hello,

We are using ondemand-3.1 in RHEL 8.6  
We are trying to setup a desktop app, and when i click connect - novnc complains with “failed to connect to server”

All the logs seem to be fine, except websockify :  
WebSocket server settings:

- Listen on :63002
- Flash security policy server
- No SSL/TLS support (no cert file)
- proxying from :63002 to localhost:5901  
WARNING: no ‘numpy’ module, HyBi protocol will be slower  
[isvood002.mskcc.org](http://isvood002.mskcc.org) - - [15/May/2024 14:44:54] code 400, message Client must support ‘binary’ or ‘base64’ protocol  
[isvood002.mskcc.org](http://isvood002.mskcc.org) - - [15/May/2024 14:44:54] code 405, message Method Not Allowed

May i know if anyone else saw similar issue?  
i am using the following rpms from OOD repo.

[https://yum.osc.edu/ondemand/latest/compute/el8/x86\_64/turbovnc-3.1.1-1.el8.x86\_64.rpm](https://yum.osc.edu/ondemand/latest/compute/el8/x86_64/turbovnc-3.1.1-1.el8.x86_64.rpm)  
[https://yum.osc.edu/ondemand/latest/compute/el8/x86\_64/python3-websockify-0.11.0-1.el8.noarch.rpm](https://yum.osc.edu/ondemand/latest/compute/el8/x86_64/python3-websockify-0.11.0-1.el8.noarch.rpm)  
or  
[https://yum.osc.edu/ondemand/latest/compute/el8/x86\_64/python3-websockify-0.10.0-1.el8.noarch.rpm](https://yum.osc.edu/ondemand/latest/compute/el8/x86_64/python3-websockify-0.10.0-1.el8.noarch.rpm)

Other log outputs:

Setting VNC password…  
Starting VNC server…

Warning: [isvstc02.mskcc.org:1](http://isvstc02.mskcc.org:1) is taken because of /tmp/.X1-lock  
Remove this file if there is no X server [isvstc02.mskcc.org:1](http://isvstc02.mskcc.org:1)  
Killing Xvnc process ID 3483844  
Xvnc process ID 3483844 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: [isvstc02.mskcc.org:1](http://isvstc02.mskcc.org:1) (vallerul)’ started on display [isvstc02.mskcc.org:1](http://isvstc02.mskcc.org:1)

Log file is vnc.log  
Successfully started VNC server on isvstc02:5901…  
Script starting…  
Starting websocket server…  
Launching desktop ‘gnome’…  
cat: /etc/xdg/autostart/gdu-notification-daemon.desktop: No such file or directory  
[websockify]: pid: 3501733 (proxying 63002 ==\> localhost:5901)  
[websockify]: log file: ./websockify.log  
[websockify]: waiting …  
[websockify]: started successfully (proxying 63002 ==\> localhost:5901)  
Scanning VNC log file for user authentications…  
Generating connection YAML file…

TurboVNC Server (Xvnc) 64-bit v2.2.3 (build 1.el7)  
Copyright (C) 1999-2019 The VirtualGL Project and many others (see README.txt)  
Visit [http://www.TurboVNC.org](http://www.TurboVNC.org) for more information on TurboVNC

15/05/2024 14:44:43 Using security configuration file /opt/TurboVNC/etc/turbovncserver-security.conf  
15/05/2024 14:44:43 Enabled security type ‘tlsvnc’  
15/05/2024 14:44:43 Enabled security type ‘tlsotp’  
15/05/2024 14:44:43 Enabled security type ‘tlsplain’  
15/05/2024 14:44:43 Enabled security type ‘x509vnc’  
15/05/2024 14:44:43 Enabled security type ‘x509otp’  
15/05/2024 14:44:43 Enabled security type ‘x509plain’  
15/05/2024 14:44:43 Enabled security type ‘vnc’  
15/05/2024 14:44:43 Enabled security type ‘otp’  
15/05/2024 14:44:43 Enabled security type ‘unixlogin’  
15/05/2024 14:44:43 Enabled security type ‘plain’  
\_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root  
15/05/2024 14:44:43 Desktop name ‘TurboVNC: [isvstc02.mskcc.org:1](http://isvstc02.mskcc.org:1) (vallerul)’ ([isvstc02.mskcc.org:1](http://isvstc02.mskcc.org:1))  
15/05/2024 14:44:43 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t  
15/05/2024 14:44:43 Listening for VNC connections on TCP port 5901  
15/05/2024 14:44:43 Interface 0.0.0.0  
15/05/2024 14:44:43 Framebuffer: BGRX 8/8/8/8  
15/05/2024 14:44:43 New desktop size: 800 x 600  
15/05/2024 14:44:43 New screen layout:  
15/05/2024 14:44:43 0x00000040 (output 0x00000040): 800x600+0+0  
15/05/2024 14:44:43 Maximum clipboard transfer size: 1048576 bytes  
15/05/2024 14:44:43 VNC extension running!  
15/05/2024 14:44:45 New desktop size: 800 x 600

Thank you.

---

<div class="post-metadata">

**Author:** ![vallerul](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/vallerul/32/963_2.png) [@vallerul](https://discourse.openondemand.org/u/vallerul)\
**Post date:** [May 15, 2024, 9:46pm UTC](https://discourse.openondemand.org/t/websockify-novnc-failed-to-connect-to-server-400-error/3489/2 "2024-05-15T21:46:20Z")

</div>

I realized that the turbovnc and websockify that i am using are from within a container, and not the operating system.  
It could be that this container that i made for CentOS7 is not compatible with RHEL 8.  
May i know if anyone has accomplished making a singularity container for desktop app, with RHEL 8/EL8?

---

<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 12, 2024, 1:47pm UTC](https://discourse.openondemand.org/t/websockify-novnc-failed-to-connect-to-server-400-error/3489/3 "2024-06-12T13:47:31Z")

</div>

Yes, in 3.0 (and 3.1 with some extra options) we added the `vnc_container` template type to support things like this.

[https://osc.github.io/ood-documentation/latest/reference/files/submit-yml/vnc-container-bc-options.html](https://osc.github.io/ood-documentation/latest/reference/files/submit-yml/vnc-container-bc-options.html)

---

<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 12, 2024, 1:47pm UTC](https://discourse.openondemand.org/t/websockify-novnc-failed-to-connect-to-server-400-error/3489/4 "2024-06-12T13:47:45Z")

</div>

There’s also a starter .def file on that page.

---

<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 9, 2024, 1:48pm UTC](https://discourse.openondemand.org/t/websockify-novnc-failed-to-connect-to-server-400-error/3489/5 "2024-12-09T13:48:37Z")

</div>

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