Azure bastion failing to connect to VM

1.1k Views Asked by At

I am trying to connect to a Linux VM with a network bastion in Azure. I am running the following command.

az network bastion ssh --name "<bastion-host>" --resource-group "<resource-group>" --target-resource-id "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Compute/virtualMachines/<vm-name>" --auth-type password --username azureuser

And getting the error in azure CLI

Exception in thread Thread-1 (_start_tunnel):
Traceback (most recent call last):
  File "threading.py", line 1009, in _bootstrap_inner
  File "threading.py", line 946, in run
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/network/custom.py", line 8482, in _start_tunnel
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/network/tunnel.py", line 184, in start_server
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/network/tunnel.py", line 117, in _listen
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/network/tunnel.py", line 104, in _get_auth_token
msrestazure.azure_exceptions.CloudError: Unexpected internal error
Terminate batch job (Y/N)? y ```
1

There are 1 best solutions below

0
On

I have contacted Microsoft support team about this issue and it seems, the network bastion is still under preview and it's an internal error. The response from Microsoft team was:

"Due to an improper cleanup of closed connections, this caused newer connections to fail"