Azure Cloud Shell error while deploying powershell scripts

Shivangi Devgun 31 Reputation points
2022-04-11T06:11:13.003+00:00

I'm trying to create resources in azure using ARM templates via Powershell scripts and I'm trying to run the script in Azure Cloud Shell it used to successfully deploy previously, but currently I'm facing this issue frequently & there were no code changes. Can someone please suggest what can I do?

191679-error.png

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
642 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,382 questions
{count} vote

Accepted answer
  1. kobulloc-MSFT 23,491 Reputation points Microsoft Employee
    2022-04-17T17:11:22.207+00:00

    Hello, @Shivangi Devgun !

    For the timeout error you are seeing there are a couple recommendations. If you are seeing an issue with an AzureRm command then consider updating to Az PowerShell scripts as Azure Cloud Shell has its own retirement timeline with a preference for using the most recent modules. Additionally, you can look at the HttpClient.Timeout Property to adjust the timeout.

    Azure Cloud Shell feature support and AzureRM PowerShell modules retirement
    Azure Cloud Shell has its own retirement timeline with a preference for using the most recent modules. This means that even though the current retirement date for the AzureRM PowerShell modules is February 29th, 2024, Azure Cloud Shell will not necessarily support AzureRM commands up until that date. Instead, update your scripts to use Az PowerShell modules:

    HttpClient.Timeout property
    If you exceed the value of the HttpClient.Timeout property, you'll get a timeout error:

    The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.

    The default value of the HttpClient.Timeout property is 100,000 milliseconds or 100 seconds. The following example sets the Timeout property to 10 minutes:

    https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.timeout?view=net-6.0

    HttpClient httpClient = new HttpClient();  
    httpClient.Timeout = TimeSpan.FromMinutes(10);  
    

0 additional answers

Sort by: Most helpful