web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Error when deploy prod environment first time "Module AOS failed with error code 255"

(1) ShareShare
ReportReport
Posted on by 220

Hello, 

  I am deploying D365 on-premises prod environment, Getting error on Orch event log with "Module AOS failed with error code 255" no any other error massages.

On SF, deployment got stuck on 4Tth application as shown in screen. 

I have tested successfully all nodes with ".\Test-D365FOConfiguration.ps1"  and 

Can anyone suggest me for this?

pastedimage1584011180169v1.png

pastedimage1584011180171v2.png

I have the same question (0)
  • veejay Profile Picture
    55 on at
    RE: Error when deploy prod environment first time "Module AOS failed with error code 255"

    Hello Akshaya, you able to resolve the issue?. I'm also facing same issue in UAT. Please provide steps on resolution. Tks.

  • Jahangir Raza Profile Picture
    4 on at
    RE: Error when deploy prod environment first time "Module AOS failed with error code 255"

    Hi Akshay

    1st Repair the Microsoft Visual C++ Redistributable Package for Visual Studio 2013 on All AOS and Restart the VM

    2nd Run below command on all AOS VMs to rebuild the Performance Counter and Restart the VMs and Retry the Deployment.

    C:\Windows\system32\lodctr.exe /R
    C:\Windows\SysWOW64\lodctr.exe /R
    C:\Windows\System32\wbem\winmgmt.exe /RESYNCPERF
    C:\Windows\SysWOW64\wbem\winmgmt.exe /RESYNCPERF
    lodctr /T:TermService

    Thanks me later :)

  • MDeeb Profile Picture
    90 on at
    RE: Error when deploy prod environment first time "Module AOS failed with error code 255"

    Hi Akshay,

    how did you solve this error  may you please share the solution ?

    Thank you,

  • Akshay Pujari Profile Picture
    220 on at
    RE: Error when deploy prod environment first time "Module AOS failed with error code 255"

    ok then, I have tried by installed it again and I run Configure-PreReqs.ps1 and Test-D365FOConfiguration.ps1 with newer scripts on each node. Still no luck.

  • Oscar Faixat Profile Picture
    on at
    RE: Error when deploy prod environment first time "Module AOS failed with error code 255"

    no, only x64 should be necessary.

  • Akshay Pujari Profile Picture
    220 on at
    RE: Error when deploy prod environment first time "Module AOS failed with error code 255"

    I am installing x64 version of VC++ 2013. Should I install x86 too?

  • Akshay Pujari Profile Picture
    220 on at
    RE: Error when deploy prod environment first time "Module AOS failed with error code 255"

    Hello Oscar, Yes I have downloaded VC++ 2017 from the LCS shared asset library. I have cross checked with Credentials.json it is okay. I have deployed my prod server by randomly reinstall VC++ 2013 and firing below commands AOS many times.

    lodctr /R

    cd c:\windows\sysWOW64

    lodctr /R

    Now same issue I am facing with my UAT environment while certificate rotation process. It was working fine before update local agent.

  • Oscar Faixat Profile Picture
    on at
    RE: Error when deploy prod environment first time "Module AOS failed with error code 255"

    Where did you get the VC++ 2017 version from? The LCS shared asset library or did you get it from another Microsoft site? Only the version located in the LCS shared asset library should be used. In any case from your screenshot it appears like the problem is with installing the Gateway which does not depend on this.

    However, i think the problem may not even be related to the Gateway as you only have 4 applications. So the AOSSetupHybridCloud is unable to deploy it which means the issue is happening before that. Since it is an InvalidOperationException i am really tempted to say that the problem is with your Credentials.json. Have you changed the file recently? Please double check that file to ensure it has a correct json format.

  • Akshay Pujari Profile Picture
    220 on at
    RE: Error when deploy prod environment first time "Module AOS failed with error code 255"

    Hello Oscar, Yes I need to open a ticket for this issue.

    Hi Martin, Yes I have downloaded newer version of VC ++ 2013 and 2017 as per requirement, Even I have download new scripts from LCS and run .\Test-D365FOConfiguration.ps1. I am surprized that same error has coming on SAT after update Local Agent which I was facing on newly created Prod. Before updating Local Agent it was working fine from last year.

  • Community Member Profile Picture
    on at
    RE: Error when deploy prod environment first time "Module AOS failed with error code 255"

    If I recall correctly, you need a never version of Microsoft Visual Studio, a version you can download at LCS Shared Asset Library or LCS Asset Library.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,206

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 847 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 596 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans