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

az iot dps certificate create fails with "too many 500 error responses"

Open jokarl opened this issue 7 years ago • 9 comments

az version information:

azure-cli                         2.0.76

command-modules-nspkg              2.0.3
core                              2.0.76
nspkg                              3.0.4
telemetry                          1.0.4

Extensions:
find                               0.3.0
azure-cli-iot-ext                  0.7.1

Command:

az iot dps certificate create --dps-name xxx -g xxx -n xxx -p xxx

Fails with:

request failed: Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Devices/provisioningServices/xxx/certificates/xxx?api-version=2018-01-22 (Caused by ResponseError('too many 500 error responses',))

Verified that the same certificate works when uploading through the portal to the same DPS, with the same name for the uploaded certificate.

jokarl avatar Nov 06 '19 13:11 jokarl

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

ghost avatar Nov 07 '19 03:11 ghost

@iluican can you take a look?

jlian avatar Dec 11 '19 00:12 jlian

@digimaun.

iluican avatar Dec 11 '19 03:12 iluican

@hochas Can you please share some details about the failing request? For example regarding the cert, is it a .pem or .cer file? How is the contend encoded? base64, binary, etc?

digimaun avatar Dec 12 '19 01:12 digimaun

I'm having the exact same issue - the problem seems only to occur if you provide a PEM certificate that includes the full chain.

If I provide a PEM or DER encoded certificate that includes only the leaf certificate, then it works OK.

This is a bug, as it works just fine in the Azure Portal if you provide a PEM cert containing the full chain.

cocowalla avatar May 14 '20 10:05 cocowalla

I'm having the exact same issue - the problem seems only to occur if you provide a PEM certificate that includes the full chain.

If I provide a PEM or DER encoded certificate that includes only the leaf certificate, then it works OK.

This is a bug, as it works just fine in the Azure Portal if you provide a PEM cert containing the full chain.

We tried the same and the verification certificate is uploaded fine from the portal however it doesn't do it via cli command

az iot dps certificate verify --certificate-name xxxxx --dps-name xxxxxx --etag XXXXXXX --path D:/github/icore-iot-backend/static-files/certificates/A66324F5EC0E245BA141738366F57477B5BB0E55362F2A04_fullchain.cert.pem --resource-group xxxxx --subscription xxxxxx

but it gives error

ClientRequestError: Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/8eb3fd4e-882d-4c04-88e4-5b13add00779/resourceGroups/rg-rtfs-eus2-sandbox-iot/providers/Microsoft.Devices/provisioningServices/dps-rtfs-eus2-sandbox-internal/certificates/cert-rtfs-eus2-sandbox-internal/verify?api-version=2018-01-22 (Caused by ResponseError('too many 500 error responses',))

azhar-iot avatar May 31 '21 10:05 azhar-iot

I get exactly the same error while following the documentation https://docs.microsoft.com/en-us/cli/azure/iot/dps/certificate?view=azure-cli-latest

Please let us know if there is a workaround for this our or any solution

azhar-iot avatar May 31 '21 10:05 azhar-iot

Hey @azhar-iot - can you try this again with a more current version of the Azure CLI? I believe this should work as expected after some fixes that went in to a release earlier this year (2.27 I believe).

c-ryan-k avatar Dec 09 '21 18:12 c-ryan-k

Closing since there have been no replies recently. Feel free to reopen if you have any other issues.

vilit1 avatar May 13 '24 16:05 vilit1