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!

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.