Search This Blog

Saturday, May 14, 2016

SharePoint Solution stuck on deploying, retracting and many other related issues

I recently came across very strange and frustrating issue related to timer job. The timer job is responsible for majority of scheduled task within SharePoint. Any solution which is deployed also get scheduled to be deployed across farm with the help of timer job.

The issue started after updating the SharePoint 2010 farm with Service Pack 1. Any deployment or retraction action cannot complete thereafter. If you are deploying a solution the status will forever remain as deploying. Same is the case with retracting and any other timer dependent activity.

I did all troubleshooting as suggested in various forums:
  1. Cleared SharePoint cache
  2.  Performed all suggestion on these blog posts:
    1. SharePoint 2010 Troubleshooting: Solution deployment stuck on deploying
    2. SharePoint 2010: Solution Package Deployment stuck in Deploying status
    3. http://blog.degree.no/2012/08/sharepoint-2010-solution-stuck-retracting-deploying/
However; the problem still persisted. 

Later, I got a solution from MSDN blog by Tehnoon Raza - SharePoint Server 2010: Timer Jobs not Functioning After Applying Updates. I ran the powershell script and all problems were fixed. I have mentioned the powershell script for easy reference:

$farm  = Get-SPFarm 
$disabledTimers = $farm.TimerService.Instances | where {$_.Status -ne "Online"} 
if ($disabledTimers -ne $null) 

    foreach ($timer in $disabledTimers) 
    { 
        Write-Host "Timer service instance on server " $timer.Server.Name " is not Online. Current status:" $timer.Status 
        Write-Host "Attempting to set the status of the service instance to online" 
        $timer.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online 
        $timer.Update() 
    } 

else 

    Write-Host "All Timer Service Instances in the farm are online! No problems found" 
}

1 comment:

Sitecore by Satya said...

Thanks for your valuable post, We also faced some times this issue and fixed same way.