# Failed to establish a websocket connection

**URL:** <https://discourse.openondemand.org/t/failed-to-establish-a-websocket-connection/691>\
**Category:** Get Help\
**Created:** [January 24, 2020, 7:28am UTC](https://discourse.openondemand.org/t/failed-to-establish-a-websocket-connection/691 "2020-01-24T07:28:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ltarbox](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@ltarbox](https://discourse.openondemand.org/u/ltarbox)\
**Post date:** [January 24, 2020, 7:28am UTC](https://discourse.openondemand.org/t/failed-to-establish-a-websocket-connection/691/1 "2020-01-24T07:28:39Z")

</div>

Trying to install Open OnDemand on a Centos 7 server.

Yesterday, shell access was working but job submission was not. I corrected directory locations in the cluster’s .yaml config file. Now job submission works fine, but attempting to launch a shell gives the error, “Failed to establish a websocket connection. Be sure you are using a browser that supports websocket connections.” I had added websockify 0.9 between yesterday and today. Could that be causing the problem? (Tried to hide websockify - no change.)

Not sure if I’m looking at the correct logs. The httpd24 and ondemand-nginx logs do not shed light.

---

<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:** [January 24, 2020, 4:20pm UTC](https://discourse.openondemand.org/t/failed-to-establish-a-websocket-connection/691/2 "2020-01-24T16:20:42Z")

</div>

Hi and welcome!

I think the websockify is a red herring for this use case. It’s not invoked. What’s happening is we’re creating a websocket to the server and the server is opening an ssh session to the other login.

Here’s the flow to help us debug a bit.  
you —(web socket)—\> open ondemand —(ssh)—\> the login node

I’m kind of surprised there’s nothing in `/var/log/ondemand-nginx/$USER/error.log` but there could be something on the client side. Open up the developer tools in your browser and see the network and console tabs. Maybe there’s something there?

Also just as a sanity check, be sure that you can ssh from the open ondemand webnode to the destination login manually.

---

<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:** [February 5, 2020, 9:24pm UTC](https://discourse.openondemand.org/t/failed-to-establish-a-websocket-connection/691/3 "2020-02-05T21:24:04Z")

</div>

Same question being asked over here, once we figure out one, we’ll solve both.

> [@Websocket Connections Error](https://discourse.openondemand.org/t/websocket-connections-error/707):
>
> I have a new build of Open OnDemand and everything seems to be working as it should such as Files, Jobs, Job Monitor. The one thing that is not working is the ‘Clusters’ terminal access. We built this up in a lab environment and all was working fine, but after installing on the corporate network, the terminal access gives an error of “Failed to establish a websocket connection. Be sure you are using a browser that supports websocket connections.” I’m suspecting this might be a setting on the web…

---

<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:** [February 12, 2020, 6:41pm UTC](https://discourse.openondemand.org/t/failed-to-establish-a-websocket-connection/691/4 "2020-02-12T18:41:16Z")

</div>

@ltarbox what is the response you’re getting? You see in the other thread 302 is from being cached somewhere. Can you tell me the response code you see (either through apache logs like them or from the client browser)?

---

<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:** [April 23, 2020, 5:31pm UTC](https://discourse.openondemand.org/t/failed-to-establish-a-websocket-connection/691/5 "2020-04-23T17:31:32Z")

</div>

Hey any updates on your issue?

---

<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 23, 2020, 6:45pm UTC](https://discourse.openondemand.org/t/failed-to-establish-a-websocket-connection/691/6 "2020-09-23T18:45:55Z")

</div>

Hi there, sorry for the delay in circling back. Are you still having issues with this?

---

<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:43pm UTC](https://discourse.openondemand.org/t/failed-to-establish-a-websocket-connection/691/7 "2022-05-26T15:43:05Z")

</div>

Closed on May 26, 2022, 3:43pm UTC


