SharePoint Service Provisioning - the service stuck on starting

When I tried to run SharePoint service - Manage Metadata Web Service on the Central Admin ... I wait and still Staring (Stuck)...


So again I ran the command (From SharePoint PowerShell)


Get-SPServiceInstance -Server SERVERNAME| where-object  {$_.TypeName -eq "Managed Metadata Web Service"} | Start-SPServiceInstance -confirm:$false > $null

And I got the Error


Start-SPServiceInstance : An object of the type Microsoft.SharePoint.Administration.SPServiceInstanceJobDefinition named "job-service-instance-ba7339e3-fb42-49c4-ac66-ab08e84eae0f" already exists under the parent Microsoft.SharePoint.Administration.SPTimerService named "SPTimerV4".  Rename your object or delete the existing object. At line:1 char:111 + ... eb Service"} | Start-SPServiceInstance -confirm:$false > $null +                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidData: (Microsoft.Share...ServiceInstance:    SPCmdletStartServiceInstance) [Start-SPServiceInstance], SPDuplicateObject   Exception     + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletStartSer    viceInstance

I deleted the job

$jobToDelete = Get-SPTimerJob | ? { $_.name -eq "job-service-instance-ba7339e3-fb42-49c4-ac66-ab08e84eae0f" }
 $jobToDelete.Delete()


You tried to stop again

Stop-SPServiceInstance -Identity ba7339e3-fb42-49c4-ac66-ab08e84eae0f

But I also got the job stuck - Deleting it again 

$jobToDelete = Get-SPTimerJob | ? { $_.name -eq "job-service-instance-ba7339e3-fb42-49c4-ac66-ab08e84eae0f" }
$jobToDelete.Delete()

I stopped timerJob on the server 

Then I tried a different way


$service = Get-SPServiceInstance -Identity ba7339e3-fb42-49c4-ac66-ab08e84eae0f


$service.unprovision()
$service.update()
iisreset /noforce




I was waiting to see that he was really disabled


$service.provision()
$service.update()
iisreset /noforce


I turned on the TimerJob

And It works :)

Comments

Popular posts from this blog

A sharepoint list view of the current month

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters

Export SharePoint 2010 List to Excel with PowerShell