Azure / azure-cli

Azure Command-Line Interface
MIT License
3.98k stars 2.96k forks source link

RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded Caused by ResponseError('too many 500 error responses',)) #15717

Closed prohand closed 3 years ago

prohand commented 3 years ago

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug

Error in command SQL DATABASE Only

UNKNOWN: Command error: ClientRequestError: Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/xxxxxxx/providers/microsoft.insights/metrics?timespan=2020-10-29T10%253A43%253A54%252B00%253A00%252F2020-10-29T10%253A53%253A54%252B00%253A00&interval=PT1M&metricnames=dtu_consumption_percent&aggregation=Average&top=10&api-version=2018-01-01 (Caused by ResponseError('too many 500 error responses',))

To Reproduce

/usr/lib/centreon/plugins/centreon-plugins/centreon_plugins.pl --plugin=cloud::azure::management::monitor::plugin --custommode='azcli' --mode='get-metrics' --tenant='xxxxxx' --resource='xxxxxxx' --metric 'dtu_consumption_percent' --warning-metric 40 --critical-metric 90 --timeout 60 --environment="AZURE_CORE_ONLY_SHOW_ERRORS=True" Expected behavior

Environment summary

yum install azcli

azure-cli                         2.14.0

core                              2.14.0
telemetry                          1.0.6

Python location '/usr/bin/python3'
Extensions directory '/home/elcia/.azure/cliextensions'

Python (Linux) 3.6.8 (default, Apr  2 2020, 13:34:55)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

OS Operating System: CentOS Linux 7 (Core)

Additional context

Thank you

ghost commented 3 years ago

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

yonzhan commented 3 years ago

SQL

prohand commented 3 years ago

This problem is solved by itself.

Thank you

bgoradia commented 3 years ago

I wasn't seeing this until today but looks like this issue is occuring now.

ClientRequestError: Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/XXXXXXXXXXXXXXXXXXX/resourceGroups/bgoradia-idw/providers/Microsoft.IndustryDataLifecycle/derivedModels/targetmodeldw?api-version=2020-09-08-preview (Caused by ResponseError('too many 500 error responses',))

Absolutely no additional message providing details of the error

devsheoran commented 3 years ago

@yonzhan - I am facing similar issue intermittently today while fetching azure activity event logs using azure api.

HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/xxxx-xxxxxx-xxxxxxxx-xxxxx-xxx/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%20'2021-04-26T15:00:01.0000000Z'%20and%20eventTimestamp%20le%20'2021-04-26T22:59:59.0000000Z'%20and%20eventChannels%20eq%20'Admin,%20Operation'%20and%20resourceTypes%20eq%20'Microsoft.Compute/VirtualMachines'%20and%20levels%20eq%20'Informational'&api-version=2017-03-01-preview&$skipToken=US0:0637550467420832500;EU0:0637550487583104874 (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
##vso[task.logissue type=error] Failed to retrieve activity log events for the 'xxxx-xxxxxx-xxxxxxxx-xxxxx-xxx' subscription.

@bgoradia - Did you find solution for the similar issue you were facing?

Mimetis commented 3 years ago

Same issue here when play with "az role assignement" I tried in my default WSL2 Ubuntu 20.04, then I tried in a new WSL2 distro Ubuntu 18.04, same results. Of course, with the last version of Azure CLI.

Unfortunately, very random results, sometimes it's working as expected, sometimes, not. Sometimes I have an error output, sometimes, nothing appears.


$ az role assignment list --assignee xxxxxxx-xxxx-xxxx-xxxx-xxxxxx --role "Contributor"
[
  {
    "id": "/subscriptions/XXXXXX/providers/Microsoft.Authorization/roleAssignments/xxxxx",
    "name": "xxxxx",
    "principalId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaa",
    "principalName": "https://dddddddd.onmicrosoft.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxx",
    "principalType": "ServicePrincipal",
    "roleDefinitionName": "Contributor",
    "type": "Microsoft.Authorization/roleAssignments"
  }
]

$ az role assignment list --assignee xxxxxxx-xxxx-xxxx-xxxx-xxxxxx --role "Contributor"
Error occurred in request., ConnectionError: HTTPSConnectionPool(host='management.azure.com', port=443): Read timed out.
bgoradia commented 3 years ago

@yonzhan - I am facing similar issue intermittently today while fetching azure activity event logs using azure api.

HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/xxxx-xxxxxx-xxxxxxxx-xxxxx-xxx/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%20'2021-04-26T15:00:01.0000000Z'%20and%20eventTimestamp%20le%20'2021-04-26T22:59:59.0000000Z'%20and%20eventChannels%20eq%20'Admin,%20Operation'%20and%20resourceTypes%20eq%20'Microsoft.Compute/VirtualMachines'%20and%20levels%20eq%20'Informational'&api-version=2017-03-01-preview&$skipToken=US0:0637550467420832500;EU0:0637550487583104874 (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
##vso[task.logissue type=error] Failed to retrieve activity log events for the 'xxxx-xxxxxx-xxxxxxxx-xxxxx-xxx' subscription.

@bgoradia - Did you find solution for the similar issue you were facing?

This was a while ago however, from what I can recollect, this was an issue related to permissions assigning role. I believe the subscription admin provided me the permissions and I was able to work through the issue.

jiasli commented 3 years ago

@devsheoran, the error you are see is caused by SSLError certificate verify failed:

HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/xxxx-xxxxxx-xxxxxxxx-xxxxx-xxx/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%20'2021-04-26T15:00:01.0000000Z'%20and%20eventTimestamp%20le%20'2021-04-26T22:59:59.0000000Z'%20and%20eventChannels%20eq%20'Admin,%20Operation'%20and%20resourceTypes%20eq%20'Microsoft.Compute/VirtualMachines'%20and%20levels%20eq%20'Informational'&api-version=2017-03-01-preview&$skipToken=US0:0637550467420832500;EU0:0637550487583104874 (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

It is another issue rather than the original one. Please see Work behind a proxy for the solution.

jiasli commented 3 years ago

@Mimetis, is this issue still happening now? If so, could you create a support ticket and route this issue to ARM service team to investigate? You may provide the --debug log in the ticket. Thanks for understanding.

vara2504 commented 1 year ago

i had the same issue.. it resolved once i deleted the az group which i created for previous project setup.

kumarsh8483 commented 1 year ago

having similar issue

SSLError: HTTPSConnectionPool(host='nnunet-model-08041339590634.southcentralus.inference.ml.azure.com', port=443): Max retries exceeded with url: /score (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2426)')))