cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4047
Views
1
Helpful
1
Replies

ACI - Websocket - Connection Refused or Handshake Error

Harish.Kamath
Level 1
Level 1

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.

1 Reply 1

nyadunan
Cisco Employee
Cisco Employee

Use wss, instead of ws

Thanks