Views: 23485
Number of votes: 6
Average rating:

Fixing the WebSocket Protocol Support issue when upgrading to EPiServer UI 9.4.0

I experienced a small but annoying error today when I installed a brand new CMS website with latest updates and also upgraded a website to the latest version of episerver cms.

The error occurred inside edit mode but did not show in Internet Explorer. The error message in episerver was:

“A real-time connection could not be established with the server. This may be caused by incorrect configuration. Please see the User interface section in the user guide for further information.”

So something must have happened in the latest release since I did not have this message last week. Firebug did the trick and help with finding the error:

Firefox can't establish a connection to the server at wss://yoursite.com/EPiServer/Shell/socket/endpoint/.
socket = new WebSocket(this._path);

 

Fixing the problem is to install websocket support like below.

For Windows Server 2012

server_thumb3

 

And for Windows 8 and above:

win8_thumb3

 

Update (Thanks Stephan):

If you are using an older system IIS 7.5 or below you will need to disable WebSockets to get rid of the error message.

<add key="Epi.WebSockets.Enabled" value="false" />

You can find more information at:

http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/9/User-interface/websocket-support/

http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support

Feb 23, 2016

Arild Henrichsen
(By Arild Henrichsen, 2/23/2016 11:53:31 PM)

The release notes for Update 100 also states that in CMS.UI 9.4, Websockets is required on the server because of the Instant UI updates in the Projects feature.

(AFAIK, Projects is still disabled by default until it's activated in Admin > Settings, so it's a bit strange that Websockets is required up front.)

Good writeup nonetheless!

KennyG
(By KennyG, 2/24/2016 12:00:40 AM)

I saw it was a beta feature, so if your account isn't in the beta admin group will you even see the message?

KennyG
(By KennyG, 2/24/2016 12:01:23 AM)

FWIW, I just got done adding the websocket protocol. :)

eric.pettersson
(By eric.pettersson, 2/24/2016 12:16:03 AM)

Yes it was beta feature I got the message for user belonging to the groups webadmins and webeditors and administrators for an alloy website upgraded to the latest and also for the upgraded website from 8.x to this version.

And I have not enabled the projects features but was planning to for the alloy website since it will be a demo for a customer :) 

d_ovaska
(By d_ovaska, 2/24/2016 12:40:59 AM)

Thx for sharing. That will be something a lot of us will run into and scratch our head about I think :)

Stephan Lonntorp
(By Stephan Lonntorp, 2/24/2016 9:37:00 AM)

I had this issue too, and found out it pays to read release notes for major versions. So if you're going to run a CMS 9 site on older versions of IIS, disable WebSockets



http://world.episerver.com/documentation/Items/Upgrading/EPiServer-CMS/9/Breaking-changes/

"Note: System Requirements have changed for CMS 9. Windows Server 2008/2008 R2 and Windows 7 are no longer supported due to missing websocket support."

Petra Liljecrantz
(By Petra Liljecrantz, 2/24/2016 10:01:02 AM)

The most annoying thing is that if you're using DXC where using Edgecast CDN is required, then WebSockets isn't supported (by Edgecast) so you will need to turn off WebSockets to get rid of the error message.

Well done, EPiServer.

Stephan Lonntorp
(By Stephan Lonntorp, 2/24/2016 2:16:39 PM)

@Petra, that could be circumvented if you set up your DXC environment with different domain for edit, and not route that through EdgeCast. Funnily enough, that would also circumvent the issues with upload file size that EdgeCast has.

Petra Liljecrantz
(By Petra Liljecrantz, 2/24/2016 2:38:18 PM)

Sure, that would be a workaround for live sites. In development or testing where that wouldnt be setup yet it's quite annoying though. I'm just fascinated that a feature is released (in beta and on by default) that's not supported fully by the services that DXC uses.

Stephan Lonntorp
(By Stephan Lonntorp, 2/24/2016 2:53:00 PM)

I'm entirely with you, I think it's unacceptable. However, a separate edit domain could be acheived in DXC Integration environments as well, it would just mean an extra strange domain to remember, instead of a regular strange domain :)

Petra Liljecrantz
(By Petra Liljecrantz, 2/24/2016 3:06:52 PM)

Haha, yeah. Another weird URL, just what we need :)

daos
(By daos, 2/24/2016 4:20:33 PM)

Hi,

Adding some information to the thread.

We are working on resolving the issue with websockets in DXC as we speak. We have earlier conducted a proof of concept that was successful and we are working on ticking off the final boxes right now. This will be introduced as soon as possible and we will let you know.

We will make sure to coordinate these type of releases going forward.

Please feel free to e-mail me or support if you have questions.


-Daniel

magnus.baneryd
(By magnus.baneryd, 2/24/2016 4:26:36 PM)

Hi,

The features included in CMS UI 9.4 are not in beta, we missed removing the beta from the names before releasing, which is why WebSockets is enabled by default in the UI.

We are using the underlying socket implementation inside the Projects gadget even though Project Mode may not be enabled. But the system will still work (except you will get no live updates in the projects components) if sockets are disabled on the server.

And as Daniel said we will make sure to coordinate these types of releases better in the future.

-Magnus

Thomas Schmidt
(By Thomas Schmidt, 3/8/2016 11:22:36 AM)

I must say I am abit concerned about the choice of websockets for this feature. This makes it very hard to make high availability sites as websockets have to make a persistent connection to a specific server, meaning rolling updgrades of servers with no downtime for the endusers is going to be extremely hard.

That is unless the client script using websockets has built in retry/reconnection functionality, is this in place? Also how does this affect servers that are not load balanced with sticky load balancing(imho you should never use that because of HA requirements) but using round robin or least connection load balancing? 

This also puts a new requirement for the load balancers or reverse proxies in use not to mention that not all CDNs support websockets.

Some of our clients require very high uptime SLA requirements so you don't just take all servers in a farm offline for code deploy or windows patches, you do rolling upgrades for zero downtime for the end user if at all possbile.

eric.pettersson
(By eric.pettersson, 3/11/2016 11:49:24 AM)

That was a great comment. Could @episerver or @magnus respond to this maybe? I will try to ping Magnus on skype so that we get an answer :)

Johan Kronberg
(By Johan Kronberg, 3/12/2016 12:36:23 AM)

If you're running on Azure there's an On/Off switch for Web sockets under General -> Application settings for your Web app.

erik.karrsgard
(By erik.karrsgard, 3/15/2016 6:09:05 PM)

Hi Tomas,
Let's see if I can help with some of the questions:

1. The client does have reconnection functionality. It will try to reconnect at an increasing interval, warn about trying to reconnect after three attempts and finally give up after eight.

2. Should be ok with any load balancing strategy as long as long as remote events and session state is setup among the load balanced servers.

3. Yes, whatever is in front of the servers needs to be able to handle websockets.

/Erik

erik.karrsgard
(By erik.karrsgard, 3/16/2016 6:48:14 AM)

And an update to answer 2... Session state is NOT needed for the websocket functionality. So no change in setup is needed for this.

/Erik

daniel
(By daniel, 3/31/2016 3:43:09 PM)

Enyoing this thread!

There is one way of finding out if your infrastructure is supporting WebSocket before an upgrade.

http://www.websocket.org/echo.html

Ours did not =( so it will be  FTW untill I can convince IT dep to allow it to pass through the proxy.

/Daniel

Guest
(By Guest, 6/6/2016 6:51:17 PM)

@Daniel Österhof: Can you provide an update to the resolution you mentioned for the DxC?

We would prefer to not have to disable features of the product in order to use the hosting provided by EPiServer.

Thanks!

Chris

Chris Magee
(By Chris Magee, 6/6/2016 6:55:58 PM)

@Petra Liljecrantz: I'm very interested in your comment mentioning a file upload size when using Edgecast CDN via DxC. Can you provide more information? I cannot find any documented limitations online.

Thanks!

Mattias Örtenblad
(By Mattias Örtenblad, 9/13/2016 5:39:44 PM)

My app is writing socket errors to log even though I set in web.config. How can I make epi stop trying?

Please login to comment.