none
User Profile Service Synchronization Service Stuck in "Stopping" State

    Question

  • Have a customer who's UPS Synchronization service is stuck in a "Stopping State"

    The UPS service Application has been deleted.  A Stop-SPServiceInstance command has been run and the Get_SPServiceInstance command shows the service is "unprovisioning"

    Any ideas on what can be done next to get the service in a stopped state?

    Saturday, October 23, 2010 8:05 PM

Answers

  • I ran the following commands:

    1.  stsadm -o enumservices > c:\services.txt - Those gave me a list of services and showed me what the name of the service I need to stop is.

    2.  stsadm -o provisionservice  -action stop -servicetype "Microsoft.Office.Server.Administration.ProfileSynchronizationService, Microsoft.Office.Server.UserProfiles, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" -servicename FIMSynchronizationService

    The second command stopped the service. 

    I'll create a new User Profile Service Application tonight or tomorrow and attempt to start this sync service again.  I'll update the post with a status afterwards.

    • Marked as answer by Stanfford Liu Thursday, November 04, 2010 3:06 AM
    Wednesday, October 27, 2010 7:33 PM
  • just after posting this, I tried the command with nothing after -servicename and viola it worked!

     

    • Marked as answer by Stanfford Liu Thursday, November 04, 2010 3:06 AM
    Wednesday, November 03, 2010 5:08 PM

All replies

  • Hi,

    try an IISReset

    Daniel Bugday


    Daniel Bugday

    Web: SharePoint Forum
    Blog: SharePoint By Bugday
    Twitter: Follow me on Twitter
    Technet: My Ask The Exert Area On Technet

    Sunday, October 24, 2010 9:35 AM
  • I've tried that.  I've also restarted the SharePoint box. 

    It appears the chain of events was this:

    1.  An attempt to delete the UPS Application was made.

    2.  The deletion stayed in a stopping state.  Additionally the service stayed in a stopping state.

    3.  Then, the Remove-SPServiceApplication was run. 

    4.  The service application was removed but the sync service is still there, still in a "stopping" state.

     

    I've attempted to run the Stop-SPServiceInstance command but that hasn't worked.  Now, I can't run that command more than once.  It throws an error stated that the service job instance already exists.....

    I'm stuck at this point, having already restarted a multitude of services and the server itself.

    Sunday, October 24, 2010 3:50 PM
  • Something similar to Spencer Harbars Powershell for How to reset the Sync Machine Instance should help:

    Add-PSSnapin Microsoft.SharePoint.Powershell 
    # these will only work if there is one DB and one SA on the box. 
    # If more than one, then use Get-SPDatabase and Get-SPServiceApplication 
    # to grab the GUID and pass that in instead of the pipebind 
    $syncDBType = "Microsoft.Office.Server.Administration.SynchronizationDatabase" 
    $upaSAType = "User Profile Service Application" 
    $syncDB = Get-SPDatabase | where-object {$_.Type -eq $syncDBType} 
    $upa = Get-SPServiceApplication | where-object {$_.TypeName -eq $upaSAType} 
    $syncDB.Unprovision() 
    $syncDB.Status = "Offline" 
    $upa.ResetSynchronizationMachine() 
    $upa.ResetSynchronizationDatabase() 
    $syncDB.Provision() 
    # we MUST restart the timer service for the state to be reflected in 
    # Services on Server and Manage UPA restart-service SPTimerV4 
    # at this stage we MUST add the Farm account to the SyncDB (the above 
    # steps remove the user) remember the default schema must be 'dbo'. 
    # If we don't do this, UPS provisioning will fail. 
    

     Spence's article focuses on 'stuck on starting', but it does refer to a problem where the state is persisted after reboot, so this may help in the stuck on stopping case, too.


    Tom Resing, Microsoft Certified Master in SharePoint 2007 - http://tomresing.com
    Sunday, October 24, 2010 8:00 PM
  • Tom's suggestion is good and you should try that.

    One other thing that you can try is checking the timer job for the service in Central Admin, maybe the deletion job got stuck there and you manually need to run it.

    Daniel


    Daniel Bugday

    Web: SharePoint Forum
    Blog: SharePoint By Bugday
    Twitter: Follow me on Twitter
    Technet: My Ask The Exert Area On Technet

    Sunday, October 24, 2010 9:59 PM
  • Daniel, which timer job is it?
    Tuesday, October 26, 2010 2:17 PM
  • I wanted to use Harbar's scripts but the pickle I found myself in is that the UPS Application has already been deleted.  There is no Sync DB anymore because the associated databases were deleted with the service application.
    Tuesday, October 26, 2010 2:36 PM
  • I ran the following commands:

    1.  stsadm -o enumservices > c:\services.txt - Those gave me a list of services and showed me what the name of the service I need to stop is.

    2.  stsadm -o provisionservice  -action stop -servicetype "Microsoft.Office.Server.Administration.ProfileSynchronizationService, Microsoft.Office.Server.UserProfiles, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" -servicename FIMSynchronizationService

    The second command stopped the service. 

    I'll create a new User Profile Service Application tonight or tomorrow and attempt to start this sync service again.  I'll update the post with a status afterwards.

    • Marked as answer by Stanfford Liu Thursday, November 04, 2010 3:06 AM
    Wednesday, October 27, 2010 7:33 PM
  • Brilliant! this works great for the  FIMSynchronizationService, so at the least the user profile sync service is now stopped so that I can have a prayer of restarting. Only problem remains is that the user profile service is still in stopping state.

    I tried applying the same logic to that, found the service, but it's servicename is blank. The command requires a servicename to function... any hints?

    /Robin

    Wednesday, November 03, 2010 5:06 PM
  • just after posting this, I tried the command with nothing after -servicename and viola it worked!

     

    • Marked as answer by Stanfford Liu Thursday, November 04, 2010 3:06 AM
    Wednesday, November 03, 2010 5:08 PM
  • @Steamroller024 : The commands you mentioned helped me. My UPS was stuck at starting. So, I used Get-SPServiceInstance and then stop-spserviceinstance and that did the magic. I was able to stop the service successfully.

    Thanks

    Vishwas


    Vishwas MCTS, MCITP SharePoint 2010

    Wednesday, May 16, 2012 3:40 PM
  • Thanks Steamroller024.  I've ran several commands to get it to stop, but the FIMSyncService was the one that kept the User Profile Synchronization service stuck at 'Starting...'


    -JH

    Wednesday, August 01, 2012 8:00 PM
  • This commands worked for me too

    Ayman Saleh

    Wednesday, August 08, 2012 8:28 AM
  • Thank you Robin4 & Streamroller04!  The method above also works for SharePoint 2013 services where the databases have been deleted.  I had the issue stuck on stopping for both Machine Translation Service and User Profile Service.  Leaving stsadm command line blank after -service was a great idea.  In my case Remove-SPServiceApplication with the -RemoveData option had already been run and the Service Applications no longer appeared under Manage Service Applications.

    --John

    Friday, August 15, 2014 5:25 PM
  • Restart the SharePoint Timer Service to resolve this isssue.
    • Proposed as answer by Frankie Linford Thursday, December 22, 2016 10:22 PM
    Wednesday, April 29, 2015 5:57 AM
  • Restarting the Timer Service solved the issue for me.
    Thursday, December 22, 2016 10:23 PM
  • Make sure Timer Service is Running on all Farm servers.

    Run this below command  and delete UPS manually.

    stsadm -o provisionservice -action stop -servicetype “Microsoft.Office.Server.Administration.ProfileSynchronizationService, Microsoft.Office.Server.UserProfiles, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” -servicename FIMSynchronizationService


    nitin patil

    Thursday, April 06, 2017 8:42 AM