Hi Sarah
Below issue
Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006)
Occurs when accessing Azure ML notebooks in VS Code because of following regions.
- Network restrictions or firewall configurations blocking WebSocket communication.
- Outdated Azure ML extension in VS Code.
- DNS resolution on Storage FQDN is not happening
Check DNS resolution of storage and other FQDN from private endpoint
nslookup <fqdnofhosturlin DNS records> should resolve to private IPs
Check outbound network settings
- Allow traffic to:
-
*.vscode.dev -
raw.githubusercontent.com
These domains are required for VS Code’s WebSocket communication.
-
Verify Networking configuration
Review Network Security Group (NSG) settings to confirm changes.
- Use Azure Monitor to validate connectivity to the above domains.
Firewall and proxy whitelisting
Please whitelist below VS code URLs
Configure firewall ports
- Ensure ports 8704–8710 are open.
VS Code server uses these ports dynamically.
Enable WebSocket communications
Confirm your network supports WebSocket connections.
- Reference: https://docs.microsoft.com/azure/machine-learning/how-to-access-azureml-behind-firewall?tabs=ipaddress.
Update Azure AML extension
- Install the latest version of the Azure Machine Learning extension in VS Code.
- If outdated, update or reinstall.
Follow up questions
- Are you on a private network? Any recent firewall changes?
- Can you connect to other services, or is it only Azure ML notebooks?
- Have you tried switching networks (e.g., Wi-Fi → mobile hotspot)?
Reference
- https://free.blessedness.top/azure/machine-learning/how-to-secure-workspace-vnet
- https://docs.microsoft.com/azure/machine-learning/how-to-access-azureml-behind-firewall?tabs=ipaddress
- https://free.blessedness.top/azure/machine-learning/how-to-secure-training-vnet
Thank you.