DeploySsrs icon indicating copy to clipboard operation
DeploySsrs copied to clipboard

Deploy reports error: error downloading asmx file happening intermittently

Open thunt999 opened this issue 1 year ago • 3 comments

deploying ssrs fails with "downloading asmx file" first run each day, immediate redeploy and it works . it would appear not to be permissions related as it works second time, so any ideas ?

thunt999 avatar Jun 08 '23 11:06 thunt999

I have the same issue. Lots of 503s too, but I get the intermittent asmx download quite often. This task is running against an Azure VM.

mwhisler avatar Jun 21 '23 15:06 mwhisler

Could we try obtaining that proxy in a way that is more resilient to connection issues? I have been troubleshooting this issue for years and can't seem to find a solution other than a redeploy.

function Get-SSRSProxyWithRetries { param ( [Parameter(Mandatory=$true)] [string]$Url, [Parameter(Mandatory=$true)] [string]$AuthScheme, [string]$Username, [string]$Password, [int]$RetryCount = 3, [int]$RetryDelaySeconds = 5 )

$proxy = $null

for ($retry = 1; $retry -le $RetryCount; $retry++)
{
    try
    {
        if ($AuthScheme -eq "windowsAuthentication")
        {
            $proxy = New-WebServiceProxy -Uri $Url -Namespace SSRS.ReportingService2010 -UseDefaultCredential -Class "SSRS"
        }
        else
        {
            $securePassword = ConvertTo-SecureString -String $Password -AsPlainText -Force
            $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Username, $securePassword
        
            $proxy = New-WebServiceProxy -Uri $Url -Namespace SSRS.ReportingService2010 -Credential $credential -Class "SSRS"
        }

        # Connection succeeded, break out of the retry loop
        break
    }
    catch
    {
        Write-Host "Failed to connect to the SSRS server. Retrying in $RetryDelaySeconds seconds..."
        Start-Sleep -Seconds $RetryDelaySeconds
    }
}

if (-not $proxy)
{
    throw "Failed to establish a connection to the SSRS server after $RetryCount retries."
}

return $proxy

}

mwhisler avatar Jun 22 '23 20:06 mwhisler

Gents, I have no time/resources to support this. In case you have improvements/fixes, you would like to share, I would be more than happy to merge a PR and publish a new version or assist you in any other way.

Cheers

mmajcica avatar Jun 23 '23 05:06 mmajcica