Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

D365 upgrade from Platform version Update41 to Platform version Update43 fails at Publish-AXReport

(1) ShareShare
ReportReport
Posted on by 48

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 ?

  • GeorgeSas Profile Picture
    48 on at
    RE: D365 upgrade from Platform version Update41 to Platform version Update43 fails at Publish-AXReport

    The "New-D365FOGMSAAccounts" will check if the accounts exist and skip it if the account exists. So it is safe to run it , it will create only the missing account.

    I think this is my 3rd installation but my first installation on Update43. Since then the ConfigTemplate.xml has changed the structure as I see and the config must be "migrated" from old template to the new.

    Thanks again for pointing the thing out ..I've spent 2 days trying to figure out the problem as the documentation does not point out the changes.

  • Michael Holzheimer Profile Picture
    30 on at
    RE: D365 upgrade from Platform version Update41 to Platform version Update43 fails at Publish-AXReport

    You are most welcome.  Interestingly we had the correct version of the infrastructure scripts, but running the Complete-PreReqs.ps1 for a second time fixed it for us.

    I'm too sure about your other question about the gMSA accounts though, we only started our initial sandbox deployment last Friday so I'm pretty new to all this.

  • GeorgeSas Profile Picture
    48 on at
    RE: D365 upgrade from Platform version Update41 to Platform version Update43 fails at Publish-AXReport

    @Michael Holzheimer  - Issue resolved. Thanks for pointing it to me .. don't know how I did not saw that on the troubleshooting guide.

  • GeorgeSas Profile Picture
    48 on at
    RE: D365 upgrade from Platform version Update41 to Platform version Update43 fails at Publish-AXReport

    Looks like I've run into another issue ... as I can see the config template has changed a bit since my first install.

    A new gMSA account has been added for the reporting services , the "svc-ReportSvc$".

    I migrated my old config and all seems to be fine exporting certificates, VM's and so long.

    Now my initial install did not had this account and I must run the following power shell :

    New-D365FOGMSAAccounts -ConfigurationFilePath .\ConfigTemplate.xml

    I tried first with the "Update-D365FOGMSAAccounts -ConfigurationFilePath .\ConfigTemplate.xml" ... which tells me:

    WARNING: Skipping user svc-ReportSvc$ as it does not exists

    Which is true ...

    Question is : If I run the New-D365FOGMSAAccounts , how will this affect the already existing accounts ? Will it alter them somehow ? I am thinking if I run this and the service accounts are re-created , might break the whole installation if some SID changes or passwords.

    Thanks in advance.

  • GeorgeSas Profile Picture
    48 on at
    RE: D365 upgrade from Platform version Update41 to Platform version Update43 fails at Publish-AXReport

    HOW did I miss that ?????????? Omg , and I was looking through this troubleshooting pages all day :(

    That seems to be the issue ! Thanks. I will try and come back with the results.

  • Verified answer
    Michael Holzheimer Profile Picture
    30 on at
    RE: D365 upgrade from Platform version Update41 to Platform version Update43 fails at Publish-AXReport

    Check out the following known issue

    docs.microsoft.com/.../troubleshoot-on-prem

  • Suggested answer
    Nya Profile Picture
    29,058 on at
    RE: D365 upgrade from Platform version Update41 to Platform version Update43 fails at Publish-AXReport

    Hi,

    It is recommended to post your issue to the forum of AX for further help.

    (+) Microsoft Dynamics AX - Forums, Blogs, Support

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,979 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans