Web Socket does not work with https upon using StreamServer

5579
11
11-08-2016 01:45 AM
MiriEshel
New Contributor III

Hi,

I have a StreamService that works fine when ArcGIS Server is configuted with HTTP.

When I change it to HTTPS,  it gives an error.

Upon Subscribe:

A web socket connection to the stream service running at https://mirie-pc.stltd.co.il/arcgis/rest/services/cars_Feed/StreamServer could not be established. Please inform the GIS Administrator.

Upon watching service in JavaScript:

Stream service url: https://mirie-pc.stltd.co.il/arcgis/rest/services/cars_Feed/StreamServer

A web socket connection to the stream service running at https://mirie-pc.stltd.co.il/arcgis/rest/services/cars_Feed/StreamServer could not be established. Please inform the GIS Administrator.
The Firewall is turned off. My browser supports WebSocket.
How do I fix this problem? It is urgent....
Thanks a lot,
Miri
Tags (1)
11 Replies
MarkBramer
Occasional Contributor II

Are all your SSL certificates fully valid and in place?  Can you navigate to https://mirie-pc.stltd.co.il/arcgis/rest/services/cars_Feed/StreamServer in a browser without any secure connection warnings, and get a 'green' notification (i.e. padlock, green 'http:', etc) that everything is good? 

0 Kudos
MichalGrinvald
Esri Contributor

Yes All the SSL certificates are fully valid and in place:

0 Kudos
AlexanderBrown5
Occasional Contributor II

Michal,

Go to your url for your stream service: https://mirie-pc.stltd.co.il/arcgis/rest/services/cars_Feed/StreamServer 

At the bottom where it says Web Socket URLs, copy "ws://yourserver:6180" -- I assume "ws://mirie-pc.stltd.co.il:6180."

Depending on your security method (https only or http/https), you might have to grab "wss://" or "ws://". I would try "ws://" first.

Log into your arcgis server admin https://hostname:6443/arcgis/admin  -- https://mirie-pc.stltd.co.il:6443/arcgis/admin 

Go to System-> Properties

Update your server properties with this format:

{"WebSocketContextURL": "ws://yourserver:6180"}

or if the url is correct from above:

{"WebSocketContextURL": "ws://mirie-pc.stltd.co.il:6180"}

Hit update.

Let me know if that works for you, I had a similar issue on an amazon server and that fixed it for me.

~Alex

MiriEshel
New Contributor III

Hi Alex,

Thank you for your reply. I tried it but it did not work. I think it is because it works fine with http, only https causes problems.

So I tried {"WebSocketContextURL": "wss://yourserver:6143"} but that did not help either.

My client has a problem also with http so I'll try it there and let you know.

Thanks,

Miri

0 Kudos
AlexanderBrown5
Occasional Contributor II

Miri,

Did you ever resolve your issue?  

~Alex

0 Kudos
BrianHjort_Nielsen
New Contributor III

Hi Alex.

I found this trying to figure out why my streamserver services don't work outside our internal domain(Iphones, ipad or external computers).

Our external domain is geoevent.hoganas.se, but when i look at our streamserver services the url for the websocket is "machinename".hoganas.se/arcgis/... and i cant fint where to change that.

When i look at the webadaptor the external domainname is added (setup by an esri employee)

WebSocketContextUrl :wss://geoevent.hoganas.se/arcgis/

 

And our other services using websocket (Receive JSON on a WebSocket) works just fine using wss://geoevent.hoganas.se/"path".

We are running on Geoevent server / ArcGIS server 10.8.1. 

0 Kudos
WillHughes2
New Contributor III

Any resolution for HTTPS? Thank you. 

0 Kudos
AlexanderBrown5
Occasional Contributor II

Will,

I have successfully implemented this using HTTPS in amazon.

{"WebSocketContextURL": "wss://negeoevt.esri.com:6143"}

I have also helped a few organizations to get HTTPS to work.  It is usually related to a firewall rule that is blocking TCP 6143.

Give me a call if you want to discuss.

~Alex

0 Kudos
ADPOPEELAADPOPEELA
New Contributor

HI Alex, 

I faced the same problem and couldn't rectify the problem. Tried to update the websocketcontexturl using both ports. Was there anything else you have done to solve it aside from the update in the arcgis server admin > System > properties > update?

Thanks,

Michael 

0 Kudos