Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article explains how to mitigate the "Web socket is closed or couldn't be opened" error. This error occurs when connecting to containers in a virtual network.
Symptoms
When you try to connect to your container from the Azure portal, you receive the following error message:
The following web socket error occurred: error: Web socket is closed or couldn't be opened. Please validate your network connection and retry the attempt.
Cause
Your firewall or corporate proxy blocks access to port 19390. This port is required to connect to Container Instances from the Azure portal when container groups are deployed in virtual networks.
Solution
To resolve this error, allow ingress to TCP port 19390 in your firewall. At a minimum, make sure that your firewall gives access to that port for all public client IP addresses that the Azure portal has to connect to.
In some scenarios where the corporate proxy blocks port 19390, allow this port for corporate proxy, and then verify the traffic by using the Network tab in the browser developer tools.
For more information on reserved ports, see Does the ACI service reserve ports for service functionality?.