JulianHayward / Azure-MG-Sub-Governance-Reporting

Azure Governance Visualizer aka AzGovViz is a PowerShell script that captures Azure Governance related information such as Azure Policy, RBAC (a lot more) by polling Azure ARM, Storage and Microsoft Graph APIs.
MIT License
817 stars 295 forks source link

Storage Analysis section with 'Unexpected Error' / 'Connection timed out' #145

Closed JulianHayward closed 1 year ago

JulianHayward commented 1 year ago
    Not sure wheter this is in the same script context, but sometimes I get fatal error on this in the Storage Analysis section with `Unexpected Error`

.......... careblob get restype=service&comp=properties #1 'Unexpected Error' occurred (trying 10 times); sleep 2 seconds Connection timed out careblob get restype=service&comp=properties #2 'Unexpected Error' occurred (trying 10 times); sleep 3 seconds Connection timed out careblob get restype=service&comp=properties #3 'Unexpected Error' occurred (trying 10 times); sleep 5 seconds Connection timed out Forced DEBUG: careblob get restype=service&comp=properties -> attempt#4 processing: careblob get restype=service&comp=properties uri: 'https://careblob.blob.core.windows.net/?restype=service&comp=properties' Forced DEBUG: careblob get restype=service&comp=properties -> unexpectedError: true careblob get restype=service&comp=properties #4 'Unexpected Error' occurred (trying 10 times); sleep 7 seconds ......... Connection timed out Forced DEBUG: careblob get restype=service&comp=properties -> attempt#11 processing: careblob get restype=service&comp=properties uri: 'https://careblob.blob.core.windows.net/?restype=service&comp=properties' Forced DEBUG: careblob get restype=service&comp=properties -> unexpectedError: true careblob get restype=service&comp=properties #11 'Unexpected Error' occurred (tried 5 times)/exit Exception: /home/runner/work/azure-governance-visualizer/azure-governance-visualizer/tools/pwsh/AzGovVizParallel.ps1:11310 Line | 11310 | $storageAccounts | ForEach-Object -Parallel *** | ~~~~~~~~~ | Error - check the last console output for details

Originally posted by @MarcelHeek in https://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting/issues/144#issuecomment-1301761614

JulianHayward commented 1 year ago

@MarcelHeek

JulianHayward commented 1 year ago

@MarcelHeek pls check the branch

MarcelHeek commented 1 year ago

@JulianHayward I did a test run (with the v6_major_20221108_1 branch) against a tenant that experienced this issue, and the result was that the script does not any longer quit with fatal error. So looks better now.

Hope this gets GA soon, so I can get all my tenants on the same version again 👍

JulianHayward commented 1 year ago

merged