Websockets not available - Windows Server 2012 R2

693 views
Skip to first unread message

gar...@vidados.com

unread,
May 14, 2015, 11:44:22 AM5/14/15
to rav...@googlegroups.com
Raven keeps telling me websockets are not available even though it's on Windows Server 2012 R2.  The message is:

Connecting to web socket using url: ws://XXXX/databases/MarketplaceVidados/websocket/validate?singleUseAuthToken=853386a9-ea91-4c2a-bb47-1ebf66964237&id=test&coolDownWithDataLoss=1000&isMultyTenantTransport=false
Server doesn't support web sockets protocol
WebSocket disconnected in unclean way
I've tried removing and re-adding the websockets protocol to IIS.

Any ideas?

Chris Marisic

unread,
May 14, 2015, 2:19:00 PM5/14/15
to rav...@googlegroups.com
Have you tried using web sockets in a barebones test app running under the same app pool to verify it's not actually your box?

Gareth Thackeray

unread,
May 14, 2015, 4:39:06 PM5/14/15
to ravendb

I assume it probably is the box.. Just hoping someone might know what I'd need to do.

--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/rrDbUY1-L88/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Marisic

unread,
May 14, 2015, 6:04:07 PM5/14/15
to rav...@googlegroups.com
First thing is always start with a reduction. Stand up a nearly empty ASP.NET app that you want to connect over web sockets with (perhaps SignalR for example) and see if you can get better error information or success.

Chris Marisic

unread,
May 14, 2015, 6:04:25 PM5/14/15
to rav...@googlegroups.com
Or just nuke the box and use a new box.

Oren Eini (Ayende Rahien)

unread,
May 14, 2015, 11:59:37 PM5/14/15
to ravendb
Can you use a test web socket client to connect to the specified url? What do you get?


Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Gareth Thackeray

unread,
May 15, 2015, 7:12:55 AM5/15/15
to ravendb
I don't really know anything about web sockets, but I did this in the browser console:

failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET

websocket = new WebSocket("ws://xxx/databases/MarketplaceVidados/websocket/validate?singleUseAuthToken=a0a581e9-7526-4da9-9c34-ed1d8e2ef63a&id=test&coolDownWithDataLoss=1000&isMultyTenantTransport=false")

and I got

WebSocket connection to 'ws://xxx/databases/MarketplaceVidados/websocket/validate?singleUseAuthToken=a0a581e9-7526-4da9-9c34-ed1d8e2ef63a&id=test&coolDownWithDataLoss=1000&isMultyTenantTransport=false' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET

But that's just the same auth token as the studio used - I don't know how to get another if that's important.

--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/rrDbUY1-L88/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

cid:995505DB-77EC-41A1-989A-A3B4F8C53C25@clubworkspace

 

Gareth Thackeray
CTO

www: vidados.com
M: +44 (0) 7748 300359

skype: gareththackeray

This e-mail message is confidential and may contain privileged information. If you are not the above named addressee, it may be unlawful for you to read, copy, distribute, disclose or otherwise use the information in this e-mail message. If you are not the intended recipient of this e-mail message, please delete this message.

Oren Eini (Ayende Rahien)

unread,
May 15, 2015, 7:14:55 AM5/15/15
to ravendb
Do you have a proxy in the middle?

Gareth Thackeray

unread,
May 15, 2015, 7:16:53 AM5/15/15
to ravendb
No.  It's an Azure VM fwiw but I get the same error when I try it from a browser on the VM.

Oren Eini (Ayende Rahien)

unread,
May 15, 2015, 7:28:53 AM5/15/15
to ravendb
Hm... do you have websockets installed on that machine?

Gareth Thackeray

unread,
May 15, 2015, 7:38:15 AM5/15/15
to ravendb
I have the component of IIS installed - I assume that's it?  Under Application Development -> Web socket protocol.  I've also tried removing it and adding it back in.

Oren Eini (Ayende Rahien)

unread,
May 15, 2015, 7:40:32 AM5/15/15
to ravendb
Can you run RavenDB on the server as another instance, with no security, and try again (locally)?
I'm not really sure what is going on.

A web socket tester tool can probably tell us more.

Gareth Thackeray

unread,
May 15, 2015, 10:18:19 AM5/15/15
to ravendb
Did you mean running Raven as a service?  If so I got this:
Connecting to web socket using url: ws://localhost:8080/databases/Test/websocket/validate?singleUseAuthToken=7761203c-6e20-4edc-a371-48fe810db046&id=test&coolDownWithDataLoss=1000&isMultyTenantTransport=false
Connected to WebSocket
Got message from websocket. Status Code = 403, message = {
  "Error": "Unknown single use token, maybe it was already used?"
}
Closed WebSocket connection
Do you have a testing tool in mind?

Oren Eini (Ayende Rahien)

unread,
May 16, 2015, 12:58:02 PM5/16/15
to ravendb
Yeah, just do this without the singleUseAuthToken query string.

Gareth Thackeray

unread,
May 18, 2015, 5:47:12 AM5/18/15
to ravendb
I got what looks like a valid WebSocket object:

{
   [functions]: ,
   __proto__: { },
   binaryType: "blob",
   bufferedAmount: 0,
   CLOSED: 3,
   CLOSING: 2,
   CONNECTING: 0,
   extensions: "",
   onclose: null,
   onerror: null,
   onmessage: null,
   onopen: null,
   OPEN: 1,
   protocol: "",
   readyState: 0,
   url: "ws://localhost:8080/databases/Test/websocket/validate?id=test&coolDownWithDataLoss=1000&isMultyTenantTransport=false"
}

Oren Eini (Ayende Rahien)

unread,
May 19, 2015, 3:36:10 AM5/19/15
to ravendb
I'm not sure what the problem is, then. Do you have any way to trace what is happening on the server (Fiddler, for example)?

gar...@vidados.com

unread,
May 19, 2015, 7:58:27 AM5/19/15
to rav...@googlegroups.com
I worked it out - I was missing targettedFramework="4.5" from the httpRuntime tag in my web.config.  Thanks.
Reply all
Reply to author
Forward
0 new messages