Hello.
I am trying to upgrade from Update 41 to Update43 and everything works fine up to the point where the script is trying to publish the AXReports and Sync the Database.
This is the script that is ran :
C:\ProgramData\SF\AX7TAOS1\Fabric\work\Applications\AXSFType_Appxxxx\AXSF.Scripts.1.0.20211027132735\Reporting.psm1
It fails with this strange error > 'serviceName' cannot be null or empty.
[29-10-2021 11:44:08]: Start deploying reports ...
Publish-AXReport : Value cannot be null.
Parameter name: The value supplied for parameter 'serviceName' cannot be null or empty.
At C:\ProgramData\SF\AX7TAOS1\Fabric\work\Applications\AXSFType_App1074\AXSF.Scripts.1.0.20211027132735\Reporting.psm1:4
92 char:9
+ Publish-AXReport -MaxDegreeOfParallelism 1 -ErrorAction Conti ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (Microsoft.Dynam...shReportCommand:PublishReportCommand) [Publish-AXReport], Ar
gumentNullException
+ FullyQualifiedErrorId : Value cannot be null.
Parameter name: The value supplied for parameter 'serviceName' cannot be null or empty.,Microsoft.Dynamics.AX.Framework.
Management.Reports.PublishReportCommand
[29-10-2021 11:44:08]: 0,0312518 Seconds.
System.Management.Automation.RuntimeException: Errors occured during report deployment.
at Deploy-AxReport, C:\ProgramData\SF\AX7TAOS1\Fabric\work\Applications\AXSFType_App1074\AXSF.Scripts.1.0.20211027132735\Reporting.psm1: line 498
at <ScriptBlock>, C:\ProgramData\SF\AX7TAOS1\Fabric\work\Applications\AXSFType_App1074\AXSF.Scripts.1.0.20211027132735\AXDeployReports.ps1: line 21
[29-10-2021 11:44:08]: Error: Failed to Deploy AX Reports.
Inside the script there is a function that reads the serviceName variable like :
$serviceName = Get-SsrsServiceName
.....
Code :
################################################################################
# Get SSRS service name
################################################################################
function Get-SsrsServiceName
{
Import-Module "$PSScriptRoot\AosCommon.psm1" -DisableNameChecking
$productNamePath = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
$productNameItem = 'ProductName'
$ssrs2019ServiceName = 'SQLServerReportingServices'
$ssrs2016ServiceName = 'ReportServer'
$ssrsService = Get-Service -Name $ssrs2019ServiceName -ErrorAction SilentlyContinue
if ($ssrsService)
{
Write-Log "The SSRS 2019 reporting services name is set to $ssrsService"
$ssrsServiceName = $ssrsService.Name;
}
else
{
$ssrsService = Get-Service -Name $ssrs2016ServiceName -ErrorAction SilentlyContinue
if ($ssrsService)
{
Write-Log "The SSRS 2016 reporting services name is set to $ssrsService"
$ssrsServiceName = $ssrsService.Name;
}
}
if ($ssrsServiceName)
{
Write-Log "The SSRS service name from reporting services is $ssrsServiceName."
return $ssrsServiceName
}
else
{
Write-Log 'Looking up reporting services name from OS.'
if (Test-Path -Path $productNamePath -PathType Container)
{
$productNamePathItem = Get-ItemProperty -Path $productNamePath
$productNameMember = Get-Member -InputObject $productNamePathItem -Name $productNameItem
if($productNameMember)
{
$productName = (Get-ItemProperty -Path $productNamePath -Name $productNameItem).$productNameItem
Write-Log 'The product name is: ' + $productName
}
}
if (($productName -eq 'Windows Server 2016 Datacenter') -or ($productName -eq 'Windows Server 2016 Standard'))
{
return $ssrs2016ServiceName
}
if (($productName -eq 'Windows Server 2019 Datacenter') -or ($productName -eq 'Windows Server 2019 Standard'))
{
return $ssrs2019ServiceName
}
throw "The product name $productName is not a supported product"
}
}
..... Into the log files I get only the error I see :
[29-10-2021 11:44:08]: Microsoft.Dynamics.AX.AosConfig.AzureConfig.bindir: C:\ProgramData\SF\AX7TAOS1\Fabric\work\Applications\AXSFType_App1074\AXSF.Code.1.0.20211027132735\Packages
[29-10-2021 11:44:08]: Module:
[29-10-2021 11:44:08]: ReportName:
[29-10-2021 11:44:08]:
[29-10-2021 11:44:08]: Getting the protocol and port ...
[29-10-2021 11:44:08]: Protocol: http://; Port: 80
[29-10-2021 11:44:08]:
[29-10-2021 11:44:08]: Reporting Servers: 10.131.25.193
[29-10-2021 11:44:08]: Testing: 10.131.25.193:80/ReportServer ...
[29-10-2021 11:44:08]: Checking status of Report Server URL: 10.131.25.193:80/ReportServer
[29-10-2021 11:44:08]: Success! Status check of Report Server URL: 10.131.25.193:80/ReportServer
[29-10-2021 11:44:08]: Testing reporting services completed.
[29-10-2021 11:44:08]:
[29-10-2021 11:44:08]: Start deploying reports ...
Publish-AXReport : Value cannot be null.
Parameter name: The value supplied for parameter 'serviceName' cannot be null or empty.
At C:\ProgramData\SF\AX7TAOS1\Fabric\work\Applications\AXSFType_App1074\AXSF.Scripts.1.0.20211027132735\Reporting.psm1:4
92 char:9
+ Publish-AXReport -MaxDegreeOfParallelism 1 -ErrorAction Conti ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (Microsoft.Dynam...shReportCommand:PublishReportCommand) [Publish-AXReport], Ar
gumentNullException
+ FullyQualifiedErrorId : Value cannot be null.
Parameter name: The value supplied for parameter 'serviceName' cannot be null or empty.,Microsoft.Dynamics.AX.Framework.
Management.Reports.PublishReportCommand
[29-10-2021 11:44:08]: 0,0312518 Seconds.
System.Management.Automation.RuntimeException: Errors occured during report deployment.
at Deploy-AxReport, C:\ProgramData\SF\AX7TAOS1\Fabric\work\Applications\AXSFType_App1074\AXSF.Scripts.1.0.20211027132735\Reporting.psm1: line 498
at <ScriptBlock>, C:\ProgramData\SF\AX7TAOS1\Fabric\work\Applications\AXSFType_App1074\AXSF.Scripts.1.0.20211027132735\AXDeployReports.ps1: line 21
[29-10-2021 11:44:08]: Error: Failed to Deploy AX Reports.
I do not want to delete my Sandbox and re install from scratch as I have a feeling my Production environment will suffer from the same error and i would like to know how to fix this issue before I proceed with Production environment update.
Anyone faced similar issue ?