Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

axbuild failing -

Posted on by Microsoft Employee

On our dev AOS, I have a powershell script that runs the following command:

cmd /c 'axbuild.exe xppcompileall /s=01'

When I run this locally on the server, it runs fine. However, I am trying to set this all up through a build server. When I call this remotely from our build server, it fails. This is the command I am using from the build server:

Invoke-Command -ComputerName $Script:MachineName -ScriptBlock {& "C:\Compile\Compile.ps1"}

I log into each server with the same user account.

It reports back "Compile all failed". It also specifies where the log files are, but none of the log files are actually updated. When I look at the AOS machine's event viewer, I see this:

Application popup: Windows - Application Error : The instruction at 0x712614e6 referenced memory at 0x00000000. The memory could not be read.

I tried adding a few parameters to see if that would help, but I am unable to figure it out. I tried changing the number of worker processes, I tried a different /log path, I tried the /altbin, but all the same results.

'axbuild.exe xppcompileall /v /s=01 /log="C:\Compile\Output\" /altbin="C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin"'

I added the /verbose and can see this:

-console 01 -aol=USR -noauto -build=deploy

*** Deploy worker started - waiting for process to exit...

*** Deploy worker completed with result 'Success'

*** Compile all starting at 1/29/2015 3:48:31 PM.

*** Kicking off header compilation (pass 1) with 6 workers.

-console 01 -aol=USR -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp

67A2.tmp,badlist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp67A7.tmp,logfile_C:\Users\dev_hudson_\AppData\Local\Temp\tmp67A8.tmp,compile_pass1

-console 01 -aol=USR -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp

67A4.tmp,badlist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp67A9.tmp,logfile_C:\Users\dev_hudson_\AppData\Local\Temp\tmp67BA.tmp,compile_pass1

-console 01 -aol=USR -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp

67A5.tmp,badlist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp67BB.tmp,logfile_C:\Users\dev_hudson_\AppData\Local\Temp\tmp67BE.tmp,compile_pass1

-console 01 -aol=USR -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp

67A6.tmp,badlist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp67BC.tmp,logfile_C:\Users\dev_hudson_\AppData\Local\Temp\tmp67BF.tmp,compile_pass1

-console 01 -aol=USR -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp

67A3.tmp,badlist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp67BD.tmp,logfile_C:\Users\dev_hudson_\AppData\Local\Temp\tmp67C0.tmp,compile_pass1

*** Worker started - waiting for process to exit...

*** Worker started - waiting for process to exit...

*** Worker started - waiting for process to exit...

*** Worker started - waiting for process to exit...

*** Worker started - waiting for process to exit...

-console 01 -aol=USR -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp

7789.tmp,badlist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp778A.tmp,logfile_C:\Users\dev_hudson_\AppData\Local\Temp\tmp778B.tmp,compile_pass1

*** Worker started - waiting for process to exit...

*** Worker completed with result 'Error -1073741819: unknown failure reason'

*** Worker completed with result 'Error -532462766: unknown failure reason'

*** Worker completed with result 'Error -1073741571: unknown failure reason'

*** Worker completed with result 'Error -1073741819: unknown failure reason'

*** Worker completed with result 'Success'

*** Worker completed with result 'Success'

*** Compile execution for first pass with 6 workers ran from 1/29/2015 3:48:31 PM to 1/29/2015 3:51:03 PM (00:02:31.4300732).

*** Compile all failed at 1/29/2015 3:51:03 PM. Total duration was 00:02:31.4800750.

I tried using some of the community scripts as well, such as this:

Compile-AXXpp -ConfigPath "$Script:DBSyncAxc"

But I get this error:

Error: There is more than one AOS configuration available. Please provide the AOS instance number to obtain the proper configuration using the /s option.

I'm not sure how to append the /s onto this as I believe it is actually calling the same command I am using and would expect the same results.

We are using AX 2012 R2. The AOS is Windows Server 2012.

I do not think it is corrupt memory as it does compile fine when I run locally. Anyone have any ideas? Much appreciated!!!

*This post is locked for comments

  • Suggested answer
    Matze Profile Picture
    Matze 120 on at
    RE: axbuild failing -

    I had the same error today and was able to get around it by starting the command box as an administrator. Hope this helps.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: axbuild failing -

    Hi,

    I've succeeded with running AxBuild remotely - I've added Overcoming Double Hop Issues with PowerShell Remoting part and also change Max Memory Limit parameter of Power Shell. Final script is following:

    Run as admin in PS on AOS (4000Mb seems to be not enough, 8000 - ok):

    Enable-WSManCredSSP -Role Server
    Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 8000
    Set-Item WSMan:\localhost\Plugin\Microsoft.PowerShell\Quotas\MaxMemoryPerShellMB 8000
    Restart-Service winrm
    

    Run on client (input password in dialog and confirm CredSSP authentication):

    $pwd = Read-Host -AsSecureString
    $user = "<username>"
    $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $user, $pwd
    Enable-WSManCredSSP -Role Client -DelegateComputer <* for all or only specific AOS>
    $session = New-PSSession -ComputerName <AOS> -Credential $Credential -Authentication CredSSP
    Invoke-Command -Session $session -ScriptBlock {& <AxBuild>}


    With this script compilation was finished without any AOS process crash.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: axbuild failing -

    That's what I was afraid of :)

    I will plug away at it. Thanks again!

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,104 Most Valuable Professional on at
    RE: axbuild failing -

    No new idea, but I think you only scratched the surface of the previous ideas. Overcoming Double Hop Issues with PowerShell Remoting could be your next attempt.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: axbuild failing -

    Thanks for the help, Martin. I think you are on the right track after reading that article. What I did now was log onto the AOS machine with the service account. I created one Powershell script named CompileAOT.ps1. This is the entire script:

    Set-Location "C:\Program Files\Microsoft Dynamics AX\60\Server\DAX_Dev\bin"

    cmd /c 'axbuild.exe xppcompileall /s=01 /v'

    If I run this as is, it works fine. I then created another script named Compile.ps1. Here is the script that runs the other ps1:

       $SPAdmin = "met\dev_hudson_"

       $Password = Get-Content "C:\Compile\Hudson.txt" | ConvertTo-SecureString

       $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $SPAdmin, $Password

       Set-Location $Script:ServerBin

       Invoke-Command -FilePath "C:\Compile\CompileAOT.ps1" -Credential $Credential -ComputerName localhost

    When I run this script (Compile.ps1), it fails. It is using the service account credentials. I even tried using a different account for the credentials ($SPAdmin and $Password) to see if that would change anything, but that failed as well.

    Here is the output:

    Microsoft (R) Dynamics AX Build Utility 6.2.1000.8500

    Copyright (C) Microsoft Corporation.  All rights reserved.

    -console 01 -aol=USR -noauto -build=deploy

    *** Deploy worker started - waiting for process to exit...

    *** Deploy worker completed with result 'Success'

    *** Compile all starting at 1/30/2015 2:19:19 PM.

    *** Kicking off header compilation (pass 1) with 6 workers.

    -console 01 -aol=USR  -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\dev_hud

    son_\AppData\Local\Temp\tmp489.tmp,badlist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp48D.tmp,logfile_C:\Users\dev_hudson_\AppData\Local\Temp\t

    mp48E.tmp,compile_pass1

    -console 01 -aol=USR  -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\dev_hud

    son_\AppData\Local\Temp\tmp486.tmp,badlist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp48B.tmp,logfile_C:\Users\dev_hudson_\AppData\Local\Temp\t

    mp48C.tmp,compile_pass1

    -console 01 -aol=USR  -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\dev_hud

    son_\AppData\Local\Temp\tmp48A.tmp,badlist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp49F.tmp,logfile_C:\Users\dev_hudson_\AppData\Local\Temp\t

    mp4A0.tmp,compile_pass1

    -console 01 -aol=USR  -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\dev_hud

    son_\AppData\Local\Temp\tmp488.tmp,badlist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp48F.tmp,logfile_C:\Users\dev_hudson_\AppData\Local\Temp\t

    mp4A2.tmp,compile_pass1

    -console 01 -aol=USR  -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\dev_hud

    son_\AppData\Local\Temp\tmp487.tmp,badlist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp4A1.tmp,logfile_C:\Users\dev_hudson_\AppData\Local\Temp\t

    mp4A3.tmp,compile_pass1

    *** Worker started - waiting for process to exit...

    *** Worker started - waiting for process to exit...

    *** Worker started - waiting for process to exit...

    *** Worker started - waiting for process to exit...

    *** Worker started - waiting for process to exit...

    -console 01 -aol=USR  -skipdbsync "-altbin=C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" -noauto -build=nodelist_C:\Users\dev_hud

    son_\AppData\Local\Temp\tmp145D.tmp,badlist_C:\Users\dev_hudson_\AppData\Local\Temp\tmp145E.tmp,logfile_C:\Users\dev_hudson_\AppData\Local\Temp

    \tmp145F.tmp,compile_pass1

    *** Worker started - waiting for process to exit...

    *** Worker completed with result 'Error -1073741819: unknown failure reason'

    *** Worker completed with result 'Error -1073741571: unknown failure reason'

    *** Worker completed with result 'Error -1073741571: unknown failure reason'

    *** Worker completed with result 'Error -1073741819: unknown failure reason'

    *** Worker completed with result 'Success'

    *** Worker completed with result 'Success'

    *** Compile execution for first pass with 6 workers ran from 1/30/2015 2:19:19 PM to 1/30/2015 2:21:52 PM (00:02:33.0763842).

    *** Compile all failed at 1/30/2015 2:21:52 PM. Total duration was 00:02:33.1263875.

    Log files are located at 'C:\Program Files\Microsoft Dynamics AX\60\Server\DAX_Dev\Log'

    The log files are not updated, however. I see a number of these in the event viewer:

    Application popup: Windows - Application Error : The instruction at 0x712614e6 referenced memory at 0x00000000. The memory could not be read.

    Any more ideas on what to try now?

  • Martin Dráb Profile Picture
    Martin Dráb 230,104 Most Valuable Professional on at
    RE: axbuild failing -

    Regarding the community module, it really runs the same thing in background. And "There is more than one AOS configuration available" means that you should specify the AOS config, but I didn't bother to implement the support to Compile-AXXpp. I can do it, if needed.

    My guess it's that it caused by double-hop authentication, or maybe it has something to do with loading of the user profile. Look at PowerShell Remoting, User Profiles, Delegation and DPAPI for some details. But don't forget it's just a guess.

    Also try to call Invoke-Command locally on the server. I assume it will fail, but it will help to exclude some possible reasons (it would mean that the problem is not caused by communication between servers, but it's rather caused by the remoting infrastructure, even on a single machine).

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,104 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans