-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While creating tunnel using az cli, getting below error #30821
Comments
Thank you for opening this issue, we will look into it. |
Here are some similar issues that might help you. Please check if they can solve your problem. Possible solution (Extracted from existing issue, might be incorrect; please verify carefully) Could you please let me know if you have any proxy in your corporate network? If Yes, could you try to bypass it and check if that helps? Also could you please test the same command using the Azure Cloud Shell TryIt option and check if that works? Reference: Powered by issue-sentinel |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @isamorris, @bastionsuppgithub. |
1 similar comment
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @isamorris, @bastionsuppgithub. |
When tried with Azure Cloud Shell, gives below error. sunil [ ~ ]$ 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 |
Other team members from my team are able to connect through their Windows but members who are using MacBook facing this issue. |
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
The text was updated successfully, but these errors were encountered: