01-06-2017 11:22 AM
Hi,
I can successfully login to APIC node via HTTPS. I am now trying to open a Websocket connection to this node from JavaScript via web socket supported Chrome browser.
I have tried to open a Websocket session via "ws:" and "wss:" resulting into different errors.
"ws:" – failed with connection refused error
"wss:" - failed: Error during WebSocket handshake: Unexpected response code: 404
Suspecting issues with my SSL, TLS configurations I have tried disabling SSL 3.0 and enabling TLS versions on my laptop. But the results did not differ.
Case 1
var ws = new WebSocket("ws://<APIC URL>/socketBgZjfnCmXdwq/1Sebi0sbWfOU1d+uzO9heyMMvOeugrXlnfdapX1p0LRsBEvoVmhOAqeBdqJ0lFZVEpoAEjHAOZfdfX2Mb6PVW/DgTH6yVH21fIoUvKPudG8mvkU+/1Q3qM0j0mtQxcY22JMOz8Y5Ahdw2uIizAGSe7NcJglIG2FKwbUj5bEmNUToadMgy83");
WebSocket connection to
'ws://<APIC URL> /socketBgZjfnCmXdwq/1Sebi0sbWfOU1d+uzO9heyMMvOeugrXlnfdapX1p0LRsBEvoVmhOAqeBdqJ0lFZVEpoAEjHAOZfdfX2Mb6PVW/DgTH6yVH21fIoUvKPudG8mvkU+/1Q3qM0j0mtQxcY22JMOz8Y5Ahdw2uIizAGSe7NcJglIG2FKwbUj5bEmNUToadMgy83' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
Case 2
var ws = new WebSocket("wss://<APIC URL>/socketBgZjfnCmXdwq/1Sebi0sbWfOU1d+uzO9heyMMvOeugrXlnfdapX1p0LRsBEvoVmhOAqeBdqJ0lFZVEpoAEjHAOZfdfX2Mb6PVW/DgTH6yVH21fIoUvKPudG8mvkU+/1Q3qM0j0mtQxcY22JMOz8Y5Ahdw2uIizAGSe7NcJglIG2FKwbUj5bEmNUToadMgy83");
WebSocket connection to
'wss://<APIC URL>/socketBgZjfnCmXdwq/1Sebi0sbWfOU1d+uzO9heyMMvOeugrXlnfdapX…G8mvkU+/1Q3qM0j0mtQxcY22JMOz8Y5Ahdw2uIizAGSe7NcJglIG2FKwbUj5bEmNUToadMgy83' failed: Error during WebSocket handshake: Unexpected response code: 404
I verified that the APIC_COOKIE is correctly concatenated with “/socket”.
I have tried looking for any possible policy enablement on APIC for Websocket but could not figure out any configurable policies.
Any guidance will unblock my task.
Thanks,
-Harish Kamath.
08-01-2017 08:22 AM
Use wss, instead of ws
Thanks
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide