Skip to main content
Participant
September 3, 2015
Question

websockets in CF11

  • September 3, 2015
  • 1 reply
  • 1835 views

Hello, I have been trying to get websockets working in our CF 11 update 6/IIS8 server to no success.  I would love to use SSL, but as part of my testing I have even tried non-ssl with no luck. The instructions I have followed are these, Using WebSocket with ColdFusion 11 | Adobe Developer Connection.

Using Chrome I see that I receive this for standard proxy configuration on a non-SSL connection, "Error during WebSocket handshake: Unexpected response code: 200." This does show as a ws connection.

If I configure the builtin server and use SSL the error is WebSocket connection to 'wss://name.of.server:8543/cfusion/cfusion' failed: Error in connection establishment: net::ERR_TIMED_OUT."  The name of server is correct just removed here since I've been testing at times without firewall to eliminate that problem. I don't get where the cfusion/cfusion is derived from however. I am not sure why it isn't using cfws there that the non-ssl ones do. Port 8543 is open (even when the firewall is on).

If I set secure = false and redo the builtin server without SSL, I get "failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT" and it is for ws.

I have seen a different page discuss changes needing made to server.xml. When I try them, I cannot get CF to restart.

IIS has websockets on, and I see the cfws directory in the IIS manager.

Thanks for any ideas as to what I might be missing.

This topic has been closed for replies.

1 reply

Inspiring
September 9, 2015

Did you name any websocket channels in your Application.cfc?  Like this:

this.wschannels = [{name="stocks"},{name="chat"}];

Rick WAuthor
Participant
September 15, 2015

Thank you for the reply, the code we have has this in it:

<cfcomponent>

  <cfset this.name = "Cf11Examples">

  <cfset this.wschannels = [{name="chat"}]>

</cfcomponent>

Inspiring
September 15, 2015

That does your cfwebsocket call look like?  Are you then using JS after defining the endpoint in cfwebsocket?  If so can you also include that code?