AKS create fails reporting error responses from management.azure.com
Running this az cli command from script.
az aks create \
--resource-group ${RG} \
--name ${CLUSTER} \
--node-count ${COUNT} \
--node-vm-size ${SIZE} \
--enable-addons monitoring \
--admin-username ${USER} \
--ssh-key-value ${PUBKEY} \
--node-osdisk-size 100 \
--kubernetes-version 1.12.7
We've been using this script for a few months; without any problems. Today it's failing with this error.
The command failed with an unexpected error. Here is the traceback:
Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/42e12bff-9125-4a9a-987d-685e9c480b0a/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-42e12bff-9125-4a9a-987d-685e9c480b0a-eus?api-version=2015-11-01-preview (Caused by ResponseError('too many 500 error responses'))
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/urllib3/connectionpool.py", line 731, in urlopen
body_pos=body_pos, **response_kw)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/urllib3/connectionpool.py", line 731, in urlopen
body_pos=body_pos, **response_kw)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/urllib3/connectionpool.py", line 731, in urlopen
body_pos=body_pos, **response_kw)
[Previous line repeated 1 more time]
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/urllib3/connectionpool.py", line 711, in urlopen
retries = retries.increment(method, url, response=response, _pool=self)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/42e12bff-9125-4a9a-987d-685e9c480b0a/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-42e12bff-9125-4a9a-987d-685e9c480b0a-eus?api-version=2015-11-01-preview (Caused by ResponseError('too many 500 error responses'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/msrest/universal_http/requests.py", line 137, in send
**kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/requests/adapters.py", line 507, in send
raise RetryError(e, request=request)
requests.exceptions.RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/42e12bff-9125-4a9a-987d-685e9c480b0a/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-42e12bff-9125-4a9a-987d-685e9c480b0a-eus?api-version=2015-11-01-preview (Caused by ResponseError('too many 500 error responses'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 351, in execute
raise ex
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 409, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 402, in _run_job
six.reraise(*sys.exc_info())
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 379, in _run_job
result = cmd_copy(params)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 171, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/core/__init__.py", line 451, in default_command_handler
return op(**command_args)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/command_modules/acs/custom.py", line 1544, in aks_create
_ensure_container_insights_for_monitoring(cmd, addon_profiles['omsagent'])
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/command_modules/acs/custom.py", line 2114, in _ensure_container_insights_for_monitoring
resource = resources.get_by_id(workspace_resource_id, '2015-11-01-preview')
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/mgmt/resource/resources/v2018_05_01/operations/resources_operations.py", line 1290, in get_by_id
response = self._client.send(request, stream=False, **operation_config)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/msrest/service_client.py", line 336, in send
pipeline_response = self.config.pipeline.run(request, **kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/msrest/pipeline/__init__.py", line 197, in run
return first_node.send(pipeline_request, **kwargs) # type: ignore
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/msrest/pipeline/__init__.py", line 150, in send
response = self.next.send(request, **kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/msrest/pipeline/requests.py", line 72, in send
return self.next.send(request, **kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/msrest/pipeline/requests.py", line 137, in send
return self.next.send(request, **kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/msrest/pipeline/__init__.py", line 150, in send
response = self.next.send(request, **kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/msrest/pipeline/requests.py", line 193, in send
self.driver.send(request.http_request, **kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/msrest/universal_http/requests.py", line 328, in send
return super(RequestsHTTPSender, self).send(request, **requests_kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/msrest/universal_http/requests.py", line 140, in send
raise_with_traceback(ClientRequestError, msg, err)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
raise error.with_traceback(exc_traceback)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/msrest/universal_http/requests.py", line 137, in send
**kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/requests/adapters.py", line 507, in send
raise RetryError(e, request=request)
msrest.exceptions.ClientRequestError: Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/42e12bff-9125-4a9a-987d-685e9c480b0a/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-42e12bff-9125-4a9a-987d-685e9c480b0a-eus?api-version=2015-11-01-preview (Caused by ResponseError('too many 500 error responses'))
To open an issue, please visit: https://aka.ms/azcli/issues
Can't delete Resource Group Either.
az group delete --name fx0502 --yes
Deployment failed. Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/42e12bff-9125-4a9a-987d-685e9c480b0a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1GWDA1MDItRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2018-05-01 (Caused by ResponseError('too many 500 error responses'))
The resource groups I was trying to delete; finally deleted.
I am now able to create aks again using Azure CLI.
Will test again tomorrow to verify.
My script output this error message this morning; however, the AKS appeared to create.
Deployment failed. Correlation ID: 8193a0e0-c866-4640-a138-cacd57f78ff2. Operation failed with status: 'Not Found'. Details: 404 Client Error: Not Found for url: https://management.azure.com/subscriptions/42e12bff-9125-4a9a-987d-685e9c480b0a/providers/Microsoft.ContainerService/locations/westus2/operations/f9e0dc94-6593-470b-b20f-45e1c7a84103?api-version=2016-03-30
I was able to get-credentials and use kubectl commands.
aks
@david618 Apologies for the late reply. Could you please use the most recent version of the Azure CLI and test the behavior again ? If you are still encountering the issue, please share the recent time stamp of the issue (in UTC), correlation id and the region of your AKS cluster. Awaiting your reply.
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!