1

Background Info: I am trying to install Sitecore 9.1 initial release with SIF. I want to install it on my development machine with the XP0 topology. I have been trying to use the XP0-SingleDeveloper.ps1 script that came with the 9.1 installation package from dev.sitecore.net. I've modified the variables to match my environment, but have not made any significant changes.

The issue I'm having: When I run the installation script, it runs for about 5 minutes and gets to task 65 where it tries to start the MarketingAutomationService. It spends about a minute or two waiting for the service, but eventually throws an error saying it was unable to start, which causes the script to exit.

What I've tried: My issue seems to match exactly what the poster of this question had - WARNING: Waiting for service sc910.xconnect-MarketingAutomationService I tried the suggested actions listed in that question, but they did not fix my problem. I will post them here:

  1. Try to start the service manually from the Windows Services window. I was not able to start the service manually however the second time that I try to start the service manually is usually successful.
  2. Check the Windows Event Log. When services fail, it logs a message in the Application Log which is usually helpful enough to understand what's going. I see a few errors regarding maengine.exe which correspond with the exceptions thrown in the MarketingAutomation logs (in the pastebin below)
  3. Ensure that you are using a PowerShell window as An Administrator. The SIF process installs Windows Services, which needs administrator access to the machine. I double-checked that I was running it as administrator.
  4. Look at the xConnect Marketing Automation Engine logs. These are my logs https://pastebin.com/DTziKR5N It looks to me like the timeout is happening when the MarketingAutomation engine tries to initialize the xconnect client. I don't know how to debug this further to confirm or deny my guess.
  5. Ensure that Local Service account has full control over the c:\inetpub\wwwroot\*.xconnect folder and its subfolders and files I did not have this account initially, so I added it (with subfolders and files) and full permissions, but continued to receive the same error after trying to reinstall.

In addition to these, I have tried uninstalling the things installed by the script and then ran the install script again. This includes, removing the SQL databases, solr cores, certificates, webroot files, and hosts file entry. I have tried reinstalling 10+ times and gotten the same results each time.

I also saw a blogpost mentioning the need to add a collectionuser user to a few of the SQL databases, but it seems to me this applied to a previous version of Sitecore and/or SIF as it looks like this user was created correctly for me.

Behavior I don't understand: In an effort to debug this issue, I ran maengine.exe in a command prompt to see if it would give me any more information (and also save time) and I found that it almost always starts successfully the second time that I try to start it. For example, if I run the install script until it fails, then run maengine.exe manually, it will fail the first time then succeed the second time. If I do nothing else, then restart my computer, then run maengine.exe again, it will fail the first time, but succeed the second time almost always. If I then terminate it then try to run it again, it will work again.

So for a reason I have yet to understand, the first time maengine.exe is run, it seems to wake up some process that enables it to work the second time it's executed.

The fact that the MarketingAutomation engine will eventually work tells me that I don't have any problems with certificates or user permissions.

I've been spending a lot of time trying to figure this out and don't know what I can try next. If anybody has any ideas or experienced this themselves before and can offer any advice, I would really appreciate it!

  • I had a similar problem and what in the end worked for me was getting latest Windows updates. – Hos Mar 7 at 5:21
  • Have you checked the DB(SQL ) credentials are correct in the script. – Mona Mar 8 at 10:03
  • What do you have if right after the fail you try to access the xconnect website? I'm wondering if maybe this website is taking too long to load, and for a given reason the service creation is timing out because of that. You can try to load the website and then run maengine.exe as soon as the website is loaded to confirm that. – Hugo Santos Mar 8 at 14:12
1

Not sure if you are still having this issue but if you do, you can try the below steps:

Root cause: This error occurs when the marketing service tries to connect to xConnect but xConnect do not start up properly. Hence, the marketing service fails, and thus the installation. This can happen for several reasons in which the most common are:

  1. Untrusted certificates installed under the Trusted folder.
  2. Issue related to custom user that is created in the script and the identityType set to “ApplicationPoolIdentity” on the application pool of xConnect Solution & Resources:

To remove the untrusted certificates, run the following two commands in another PowerShell which runs as administrator

Get-Childitem cert:\LocalMachine\root -Recurse | Where-Object {$_.Issuer -ne $_.Subject}

Get-Childitem cert:\LocalMachine\root -Recurse |  Where-Object {$_.Issuer -ne $_.Subject} | Move-Item -Destination Cert:\LocalMachine\CA

Source: HTTP error 403.16 – client certificate trust issue | Sitecore 9, xConnect, SSL and that 403 Forbidden

This issue can be resolved by “LoadUserProfile” field to false in each of the following files Xconnect-xp0.json Sitecore-xp0.json Identityserver.json

Source: WARNING: Waiting for service sc910.xconnectMarketingAutomationService

Hope this helps. I have written two blog posts on Sitecore 9.1 installation using SIF with a list of common issues that comes up which might be helpful as well. Let me know if you have any question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.