-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
az network bastion tunnel --name vnet-adec-access-bastion --resource-group rg-adec-access --target-resource-id /subscriptions/025a356c-1868-4a48-90ef-47f999a99c53/resourceGroups/rg-adec-opslab/providers/Microsoft.Compute/virtualMachines/vm-adec-ops-t01 --resource-port 22 --port 22
Preview version of extension is disabled by default for extension installation, enabled for modules without stable versions.
Please run 'az config set extension.dynamic_install_allow_preview=true or false' to config it specifically.
The command requires the extension bastion. Do you want to install it now? The command will continue to run after the extension is installed. (Y/n): Y
Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt.
The command failed with an unexpected error. Here is the traceback:
[Errno 13] Permission denied
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.69.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.69.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.69.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.69.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.69.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.69.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/Users/sunilangane/.azure/cliextensions/bastion/azext_bastion/custom.py", line 470, in create_bastion_tunnel
tunnel_server = _get_tunnel(cmd, bastion, bastion_endpoint, target_resource_id, resource_port, port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sunilangane/.azure/cliextensions/bastion/azext_bastion/custom.py", line 429, in _get_tunnel
tunnel_server = TunnelServer(cmd.cli_ctx, "localhost", port, bastion, bastion_endpoint, vm_id, resource_port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sunilangane/.azure/cliextensions/bastion/azext_bastion/tunnel.py", line 64, in init
self.sock.bind((self.local_addr, self.local_port))
PermissionError: [Errno 13] Permission denied
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
Related command
az network bastion tunnel --name vnet-adec-access-bastion --resource-group rg-adec-access --target-resource-id /subscriptions/025a356c-1868-4a48-90ef-47f999a99c53/resourceGroups/rg-adec-opslab/providers/Microsoft.Compute/virtualMachines/vm-adec-ops-t01 --resource-port 22 --port 22
Errors
az network bastion tunnel --name vnet-adec-access-bastion --resource-group rg-adec-access --target-resource-id /subscriptions/025a356c-1868-4a48-90ef-47f999a99c53/resourceGroups/rg-adec-opslab/providers/Microsoft.Compute/virtualMachines/vm-adec-ops-t01 --resource-port 22 --port 22
Preview version of extension is disabled by default for extension installation, enabled for modules without stable versions.
Please run 'az config set extension.dynamic_install_allow_preview=true or false' to config it specifically.
The command requires the extension bastion. Do you want to install it now? The command will continue to run after the extension is installed. (Y/n): Y
Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt.
The command failed with an unexpected error. Here is the traceback:
[Errno 13] Permission denied
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.69.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.69.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.69.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.69.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.69.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.69.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/Users/sunilangane/.azure/cliextensions/bastion/azext_bastion/custom.py", line 470, in create_bastion_tunnel
tunnel_server = _get_tunnel(cmd, bastion, bastion_endpoint, target_resource_id, resource_port, port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sunilangane/.azure/cliextensions/bastion/azext_bastion/custom.py", line 429, in _get_tunnel
tunnel_server = TunnelServer(cmd.cli_ctx, "localhost", port, bastion, bastion_endpoint, vm_id, resource_port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sunilangane/.azure/cliextensions/bastion/azext_bastion/tunnel.py", line 64, in init
self.sock.bind((self.local_addr, self.local_port))
PermissionError: [Errno 13] Permission denied
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
Issue script & Debug output
az network bastion tunnel --name vnet-adec-access-bastion --resource-group rg-adec-access --target-resource-id /subscriptions/025a356c-1868-4a48-90ef-47f999a99c53/resourceGroups/rg-adec-opslab/providers/Microsoft.Compute/virtualMachines/vm-adec-ops-t01 --resource-port 22 --port 22
Expected behavior
Tunnel should create
Environment Summary
azure-cli 2.69.0
Additional context
Please help