4

I am installing Sitecore Commerce 9 Update 2 and received this exception in " StartAppPool" task:

Install-SitecoreConfiguration : The service cannot accept control messages at this time. (Exception from HRESULT: 0x80070425) At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\Public\Install-SitecoreConfiguration.ps1:253 char:21 + & $entry.Task.Command @paramSet | Out-Default + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

This is what I can see in PowerShell:

enter image description here

What should I do?

2

I saw this message multiple time. The app pool is stopped, you need to restart the app pool for your website and run the installation again.

3

Actually, restarting my laptop did not solve the issue. Later when I tried to install the Sitecore Commerce again, it failed at the same task. Basically, I did find a workaround for this issue, which seems to work.

The Issue:
The script stops the sites AppPool and right away before the AppPool is released it tries to restart the AppPool. Since the AppPool is not available it fails to start. Restarting the AppPool or PC sometimes solves the issue but it may not solve it at all.

Workaround (Solution):
1) Navigate to this file:
C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.1.0\Public\Tasks\Invoke-ManageAppPoolTask.ps1

2) Insert a "Start-Sleep -s 60" before the starting the AppPool

switch ($Action) { 'start' { if(CheckAppPoolState -Name $Name -RequiredState "Started") { Start-Sleep -s 60 Write-Verbose "Starting App Pool Ercan Polat '$Name'" Start-WebAppPool -Name $Name } } 'stop' { if(CheckAppPoolState -Name $Name -RequiredState "Stopped") { Write-Verbose "Stopping App Pool Ercan Polat'$Name'" Stop-WebAppPool -Name $Name Start-Sleep -s 60 } }
Note:
I also added "Start-Sleep -s 60" after the "Stop-WebAppPool". I'm pretty sure you will not need to add the sleep script to both locations. Also, you may even decrease the sleep duration.

2

You have to start again site with Sitecore instance that you are trying to install Sitecore Commerce on through IIS Manager because it is probably stopped.

It has been stopped by Deployment script but it couldn't be started automatically after that. This is a known issue.

Look also into Application Pools whether also Application pool for this Site was not stopped and run it also manually.

When site and application pool is up and running again, just run the script once again and it should be fine now.

Best would be to restart the machine that you are installing to. Installation was much quicker after restart.

  • 1
    Restarting my machine seemed to do the trick for me as well, whereas an iisreset did not. – Matthew Dresser Jul 31 at 19:46
  • I'm installing Sitecore Commerce v9.2 and I was getting the same error. PowerShell stops the AppPool and the Website then makes some updates and restarts them back. However, it never gets restarted. I did manually restart the AppPool and Website and run the installation script and this did not solve the problem . I tried this several times. However, restarting my PC solved the issue. – Ercan Polat Aug 26 at 3:04

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.