noVNC Failed to connect to server (ondemand 3.0.1)

I have installed Ondemand 3.0.1 on one of my test cluster OOD servers and I am getting this error when launching an interactive desktop from that new OOD servers. I can launch it on another test server running Ondemand 2.0.31. What should I look for? I am using pretty much the same ood-portal.yml file as the previous version with the exception of the new server-aliases variable (thanks for that). I’ve looked at the “similar topics to” but they are not for 3.0.1 and this does work on 2.0.31.

Open your developer tools and see what the http response code is.

The older topics should still be valid. My guess is is that you don’t have node_uri and rnode_uri set in ood_portal.yml.

Here is what I have in the ood-portal.yml file:

 host_regex: 't-[isg]c-[1-5][0-9][0-9][0-9]'
 node_uri: '/node'
 rnode_uri: '/rnode'

and the error in the console is:

Failed when connecting: Connection closed (code: 1006) rfb.js:831:21

I’m looking for this status code. Do you have anything else in front of apache like a load balancer, etc?

400 Client must support ‘binary’ or ‘base64’ protocol

Sorry that isn’t it. I refreshed the noVNC and got that but I do not have an error under headers.

Is the response header 101 Switching Protocols or something different?

I cannot get the response header. I am not seeing how to do that in firefox and if I refresh the page with the network tab open it just gives me the 400 Client error that is above. Probably due to the vnc password no longer matching.

We do have an haproxy load balancer in front of the OOD servers.

I would confirm that you can use websockets through this load balancer. Does the shell app work on the 3.0 test system?

Websockets through the haproxy server works with the 2.0.31 version. The shell app does work but ssh does not go through the haproxy server.

Maybe there’s a websockify version mismatch. We run websockfiy 0.8.0 with no issue. Did the compute node you’re getting these jobs on change as well or are the compute nodes the same for OOD 3.0 and 2.0?

They are the same version. We have not upgraded the websockify version.

The version we are running is also 0.8.0 on the compute nodes.

Maybe there’s a cache issue? Can you try in a private window?

Same thing happens with a private window. I can see that the websocket is there in the haproxy log file when I try to connect to it.

Maybe it does have something to do with the response header I have above when I refresh the screen:

400 Client must support ‘binary’ or ‘base64’ protocol

I’ve modified the websock.js file to change:
open(uri, protocols) {
this.attach(new WebSocket(uri, protocols));
open(uri, protocols) {
this.attach(new WebSocket(uri, [‘binary’, ‘base64’]));
But I can’t seem to get the new code to run except in private window but it does start the websocket connection. What do I need to do in my regular browser to get the new javascript code to update?

Clear your browsers cache.

Yes I just did that.

So why do I have to modify the protocols to start a new websocket in 3.0.1 and not the earlier 2.0.x versions?

I am running the latest version of RHEL 8 with the latest OS updates as of two weeks ago and it is a fresh install of the OS and Open Ondemand 3.0.1.