deis/workflow

Azure: cannot get credentials: Name or service not known

bacongobbler opened this issue · 6 comments

When I run az acs kubernetes get-credentials --resource-group=$AZURE_RG_NAME --name=$AZURE_SERVICE_NAME, I see the following error:

[Errno -2] Name or service not known
Traceback (most recent call last):
  File "/home/bacongobbler/bin/azure-cli/local/lib/python2.7/site-packages/azure/cli/main.py", line 37, in main
    cmd_result = APPLICATION.execute(args)
  File "/home/bacongobbler/bin/azure-cli/local/lib/python2.7/site-packages/azure/cli/core/application.py", line 157, in execute
    result = expanded_arg.func(params)
  File "/home/bacongobbler/bin/azure-cli/local/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 343, in _execute_command
    raise ex
gaierror: [Errno -2] Name or service not known

Flipping on --debug does not show any further information on the issue either.

FYI this is with the v2.0.0 CLI:

><> az --version
azure-cli (2.0.0)

acs (2.0.0)
appservice (0.1.1b5)
batch (0.1.1b4)
cloud (2.0.0)
component (2.0.0)
configure (2.0.0)
container (0.1.1b4)
core (2.0.0)
documentdb (0.1.1b2)
feedback (2.0.0)
iot (0.1.1b3)
keyvault (0.1.1b5)
network (2.0.0)
nspkg (2.0.0)
profile (2.0.0)
redis (0.1.1b3)
resource (2.0.0)
role (2.0.0)
sql (0.1.1b5)
storage (2.0.1)
vm (2.0.0)

Python (Linux) 2.7.9 (default, Jun 29 2016, 13:08:31) 
[GCC 4.9.2]

I have a feeling this is because I created the resource group in canadaeast, but then had to create the acs cluster in westus because canadaeast is not a valid region for acs. I'm just creating another resource group and cluster to verify.

that was indeed the issue. Creating a new resource group in westus, then creating the acs cluster in that resource group fixes things. Closing!

cc @vdice, does this fix the issue for you as well?

vdice commented

thanks @bacongobbler ; it didn't appear to help (had the same idea as mentioned in #755 (comment)) but will give it a fresh try today and respond w/ any new info.

vdice commented

Still hitting issues with bootstrapping an acs cluster, but with a different error that was originally written here; Filed an issue in azure-cli#2405.