azure-cli: msrestazure.azure_exceptions.CloudError: Tunneling is disabled

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az network bastion rdp

Errors: Exception in thread Thread-1: Traceback (most recent call last): File “threading.py”, line 932, in _bootstrap_inner File “threading.py”, line 870, in run File “D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/network/custom.py”, line 8074, in _start_tunnel File “D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/network/tunnel.py”, line 182, 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: Tunneling is disabled

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • az network bastion rdp --name "bxadVNET-bastion" --resource-group "binxAD" --target-resource-id "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/binxClients/providers/Microsoft.Compute/virtualMachines/COMPUTERNAME"

Expected Behavior

Connect via RDP

Environment Summary

Windows-10-10.0.22000-SP0
Python 3.8.9
Installer: MSI

azure-cli 2.31.0

Additional Context

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 21 (4 by maintainers)

Most upvoted comments

I’ve noticed that I changed my Bastion resource from Basic to Standard and checked the [X] preview feature flag and saved both changes in a same operation. But that combined action might not be working well…

So what I did now was to turn off the Preview flag and then turn it on again (IT Crowd way) and the “Tunneling is disabled” issue went away!

Disabling and re-enabling the tunneling option with the Terraform pipeline worked.

@AndrewRobie I am still seeing this issue. I had an old (more than a year ago) Bastion instance deployed with Basic SKU via Terraform, and just updated it in-place to Standard with tunneling enabled. When I look in the Azure portal, Native client support is enabled and it doesn’t say it’s in preview. But the CLI is still showing this error that tunneling is disabled. I confirmed I have the latest version of CLI installed. My assigned role doesn’t allow me to make configuration changes, so I can’t simply uncheck/check the option in the portal as others have done. In trying to do that via CLI with the role that Terraform uses, there’s no update subcommand.

I’ve noticed that I changed my Bastion resource from Basic to Standard and checked the [X] preview feature flag and saved both changes in a same operation. But that combined action might not be working well… So what I did now was to turn off the Preview flag and then turn it on again (IT Crowd way) and the “Tunneling is disabled” issue went away!

I had this exact issue. I disabled and reenabled the native client support feature and this resolved my “Tunneling is disabled” error. Thank you!

Same. First it didnt work but found some patience and waited the 10 minutes it took to disable. Tip: keep an eye on the activity log and wait for the job to complete successful before trying to enable the feature again.

I’ve noticed that I changed my Bastion resource from Basic to Standard and checked the [X] preview feature flag and saved both changes in a same operation. But that combined action might not be working well…

So what I did now was to turn off the Preview flag and then turn it on again (IT Crowd way) and the “Tunneling is disabled” issue went away!

I had this exact issue. I disabled and reenabled the native client support feature and this resolved my “Tunneling is disabled” error. Thank you!

Is this not the expected result if Bastion is not enabled for Native client support? image