azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Issue while creating aks cluster from azure cli

Open royca opened this issue 6 years ago • 5 comments

Describe the bug

Command Name az aks create

Errors:

400 Client Error: Bad Request for url: http://localhost:50342/oauth2/token
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 631, in execute
    raise ex
cli/core/commands/__init__.py, ln 695, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
...
python3.6/site-packages/msrestazure/azure_active_directory.py, ln 486, in get_msi_token
    result.raise_for_status()
python3.6/site-packages/requests/models.py, ln 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://localhost:50342/oauth2/token

To Reproduce:

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

  • pre-requisite steps...
  • az aks create --resource-group $RESOURCE_GROUP --name $AKS_CLUSTER_NAME --vm-set-type VirtualMachineScaleSets --load-balancer-sku standard --location $REGION_NAME --kubernetes-version 1.16.7 --network-plugin azure --vnet-subnet-id $SUBNET_ID --service-cidr 10.2.0.0/24 --dns-service-ip 10.2.0.10 --docker-bridge-address 172.17.0.1/16 --generate-ssh-keys

Expected Behavior

Environment Summary

Linux-4.15.0-1082-azure-x86_64-with-debian-stretch-sid
Python 3.6.5
Installer: DEB

azure-cli 2.5.1 *

Additional Context

royca avatar May 25 '20 06:05 royca

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/aks-pm.

ghost avatar May 25 '20 10:05 ghost

aks

yonzhan avatar May 25 '20 10:05 yonzhan

@royca - this is a known issue with Cloud Shell. Available workarounds include running az login before your command or using az cli from your local machine. ref: https://github.com/Azure/azure-cli/issues/11749#issuecomment-570975762

bpdohall avatar May 29 '20 23:05 bpdohall

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @maertendMSFT.

ghost avatar May 30 '20 21:05 ghost

This should be fixed now. I cannot repro, please close.

maertendMSFT avatar Jul 07 '20 22:07 maertendMSFT