Solvedazure cli 'az aks browse' doesn't work. Error listening on port 8001

Describe the bug
This command used to work for me, but not recently even after I restarted the machine. This is the error message:

Proxy running on http://127.0.0.1:8001/
Press CTRL+C to close the tunnel...
Unable to listen on port 8001: All listeners failed to create with the following errors: Unable to create listener: Error listen tcp4 127.0.0.1:8001: bind: An attempt was made to access a socket in a
way forbidden by its access permissions., Unable to create listener: Error listen tcp6: address [[::1]]:8001: missing port in address
error: Unable to listen on any of the requested ports: [{8001 9090}]

The 8001 port seems to be occupied by the "System" process with process id 4. But I can't kill the process or close the connection.

To Reproduce
Simply run the command and it gives me the error.

Expected behavior
There are other available ports among [{8001 9090}], it should choose an available port or let me specify the port to use.

Environment summary
I'm using azure-cli (2.0.25) on Windows 10 Version 1709

12 Answers

✔️Accepted Answer

Found a workaround,
instead of az aks browse run:
kubectl proxy --port 8002
then navigate to:
http://127.0.0.1:8002/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/

Other Answers:

Use "--listen-port" to specify a customized port other than the default 8001.

Related Issues:

42
azure cli az aks list - No module named '_cffi_backend'
Same here Update: python3 -m pip install cffi fixed it for me. Command Ran: az aks list Fixed issue ...
38
azure cli zsh autocompletion on OSX/macOS
I also just encountered this Every time I launch my terminal I get the following error: /Users/blake...
27
azure cli 'az aks browse' doesn't work. Error listening on port 8001
Found a workaround Describe the bug This command used to work for me but not recently even after I r...
12
azure cli az ad app permission grant not working or usable as expected
az ad app permission admin-consent is the old way of granting all Application Permissions and Delega...
12
azure cli unable to update cli using homebrew
I ran brew reinstall python3 to fix this I tried to install the latest CLI from the docs: https://do...
11
azure cli DLL load failed while importing win32file: The specified module could not be found.
I was able to solve it by reinstalling pywin32 with a terminal Run as Administrator: Though the root...
7
azure cli az container create fails with AttributeError: 'ResourcesOperations' object has no attribute 'create_or_update'
Ubuntu hosted agents were updated to azure-cli 2.24.0 today Describe the bug Command Name az contain...
96
sops Cannot decrypt with GPG 2.2.5 and SOPS 3.0.0
The problem suddenly re-occured.. I think it has to do with the gpg-agent For the moment this solved...
33
azure quickstart templates resourceId() support for multi-segment sub-resources?
I think I figured this out: funny how none of the quick-start examples do this ...
18
terraform provider azurerm key vault soft-delete causing failure when updating secrets or certificates
I'm seeing exactly the same issue key vault soft-delete causing failure when updating secrets and ce...
16
azure powershell 'az account get-access-token' equivalent in Azure PowerShell
Get-AzAccessToken is available in Az.Accounts 2.2.0 which will be released on Nov 17 please have a t...
14
terraform provider azurerm Azurerm_frontdoor with v2.24.0 breaks when azure frontdoor is edited in portal.
Same issue here but on another level: Error: flattening frontend_endpoint: ID was missing the frontD...
13
acs engine Pods are uanble to resolve DNS for any of Azure service or other external sites.
Here is a quick status update: There are two problems happening concurrently Is this a request for h...
13
terraform provider azurerm r/application_insights: support for the Workspace model
Until this is supported natively by terraform This issue was originally opened by @klainn as hashico...
13
azuredatastudio Connecting to remote SQL Server from Ubuntu 20.04
hello i am so happy to tell you that i have a solution i tested and works perfectly is a downgrade o...
13
pulumi Resource Adoption
I have a workaround until this feature is shipped While pondering #1654 ...
12
azure sdk for net ClientServerCredential equivalent for simple apiKey authentication?
Here is my version of the ServiceClientCredentials for apiKey Is there support for swagger's concept...
11
terraform provider azurerm TF apply/plan have different constraints for "Consumption" tier for API Management
Looks like there's a bit more to this than just the capacity tier of zero Community Note Please vote...
10
terraform provider azurerm multi-tenant deployment using Azure shared image gallery via terraform
@nicethomaslearngit I was having the same issue as you and seem to have figured it out ...
6
terraform provider azurerm Failed to destroy azurerm_key_vault and associated azurerm_key_vault_access_policy (30 minute timeout)
@katbyte given that you've just updated the CHANGELOG.md for the v2.50.0 release (b74f30f) and there...
6
terraform provider azurerm conflict between azurerm_subnet_route_table_association and azurerm_subnet route_table_id
hey @steve-hawkins As a workaround I use a lifecycle in azurerm_subnet : I don't know if this is the...
6
terraform provider azurerm Terraform loses access token and requires az login
At least update the error message from terraform to include the workaround using az account get-acce...
5
spark [BUG]: Trying to follow the "Getting Started" guide step by step
One temporary work-around to avoid seeing the spark temporary files error is to add the following tw...
3
acs engine The cluster-internal DNS server cannot be used from Windows containers
The DNS issue does not seem unique to Windows (#2999 #2880) as of a few days ago ...
3
azure sdk for net [BUG] Enabling VisualStudioCodeCredential on macOS crashes dotnet
Why is this bug closed? This workaround breaks on Windows it feels a bit crispy to add this to every...
3
caprover 502 Bad Gateway error with REST API
If you can reproduce the issue with an open source project I can look into it Hello! I really enjoy ...
3
terraform provider azurerm v1.0.0 checksum mismatch error
Hey @aoggz Thanks for opening this issue - apologies about this This was due to a re-release ...
3
pulumi Python Outputs to string do not work as documented
Thanks for the clarifications and feedback I agree we can definitely work toward making the document...
3
pulumi Grpc.Core.RpcException: "Failed to deserialize response message." when using "cert-manager.crds.yaml" for ConfigFile
Here is the draft of the forking plan: Fork protocolbuffers/protobuf to Pulumi org (done): https://g...
480
aws cli Invalid Syntax Error when running any AWS command.
Leaving this here in case someone comes across this via google like me: I had the same issue with th...
232
passenger passenger-install-apache2-module fails with OpenSSL development headers not found on OSX El Capitan
After upgrading to El Capitan I'm unable to install the Apache module by running passenger-install-a...
219
aws cli aws s3api create-bucket throws error for us-east-2
For those of you looking to create a bucket via the CLI run this: aws s3api create-bucket --bucket d...
171
aws cli aws ssm put-parameter performs an HTTP GET request when the value param is an url
Just kill this 'feature' seriously Even apart from security concerns it certainly violates the princ...
159
terraform Ability to zip AWS Lambda function on the fly
For anyone else who finds this issue I found a good solution to this using the archive_file data sou...
153
terraform Feature request: Allow using lists and maps with conditionals
BTW I did find one workaround: I'm using join to turn the lists into strings to get past the type ch...
120
aws cli How to describe instances from all regions?
For people arriving here from Google here's one way to list all your instances across all regions wi...
115
terraform for_each attribute for creating multiple resources based on a map
Hi @mirogta! Thanks for this feature request and your detailed use-case This is definitely a request...
113
terraform "Warning: Value for undeclared variable"
I wrote about my objections to this feature in #19424 (comment) but that issue was locked ...
108
che event-stream-3.3.6.tgz not found in Yarnpkg.
this is due to : https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident to...
101
generator jhipster Uncaught Error: Module build failed: Error: ENOENT: no such file or directory, scandir '**\node_modules\node-sass\vendor'
@lancurtis run npm rebuild node-sass Hi There was an error occured in my chrome on windows 10 x64 wh...
94
server Upgrade fails with - Column name "oc_flow_operations.entity" is "NotNull", but has empty string or null as default
I just got this error while upgrading from 17.0.10 to 18.0.10 Also with me the column entity did not...
63
terraform Allow aws_acm_certificate to lookup certificates in different region
Hi @kifbv! Currently the answer to doing anything in multiple regions is to instantiate the aws prov...
62
terraform Improving perception of changes when showing diff
Hi all! Sorry for the long silence here When I make a change to a large list of values (for example)...
60
aws cli Can't install / configure aws cli
Interesting It looks like it's failing to parse ~/.aws/config Can you try putting in fake values? He...
55
terraform Enable support for Google Cloud SQL Postgres
Haha I just figured out that the custom tier actually encodes the amount of CPU and memory The first...
51
aws cli Code Deploy - Unhandled exception - ZIP does not support timestamps before 1980
eb deploy gave me find -mtime +10950 -print -exec touch {} \; solved the problem. ...
50
aws cli PyYAML requires python-dev dependency
We have had some success here by running Hi It seems the latest release of awscli requires PyYAML as...
50
terraform How do i add tag variables to aws_autoscaling_group resource?
to convert regular tags map to asg tags map (sorry forgot who I stole this snippet from!) ...
49
terraform "Referencing Attributes from Resources with count = 0" change in Terraform 0.11 should be a warning!
@danhart The workaround is to use this ugly idiom: Finding all the places where this needs to be fix...