Freigeben über


SharePoint 2013 - User Profile Service Stuck on Starting

There are really fantastic and well known articles on User Profile Configuration and Stuck on Starting issues. (These are applicable to SP2010 and SP2013)

These are listed below but can be located on Spencer Harbar's Site https://www.harbar.net https://www.harbar.net/articles/sp2010ups.aspx (User Profile Configuration)

https://www.harbar.net/articles/sp2010ups2.aspx (Stuck on Starting - detailing why and how to reset it)

https://www.harbar.net/articles/sp2010ups2.aspx#ups14 (How to reset the Sync status)

You need to follow his reset procedure first and as He has also stated, it is best to delete the User Profile Service application and create a new one from scratch.

Make sure that if you have installed Updates that all updates have been applied successfully on all servers before you create the new User Profile Service Application.

I decided to write up a very basic script as even after running the reset script detailed in Spencer's article the service still remained stuck on "Starting" and the status of the Service Instance remained as "Provisioning".

This therefore blocked starting the service on any other server and left the server I tried to start it on in a partial state as the Sync Service can only be started on 1 server in a farm.

The details below simply get a reference to your server and service instance and force it to be un-provisioned.

Copy out the following code below and run it in an Administrative PowerShell or PowerShell ISE window. (NB: This code is sample code and is run at your own risk - test on Dev and QA environments first)

########################################

Add-PSSnapin Microsoft.SharePoint.Powershell
$TypeName = "User Profile Synchronization Service"
$ServerName = "SERVERNAME" #Replace with your server name where the service is stuck on Starting
$Serviceinstance = Get-SPServiceInstance | where-object {$_.TypeName -eq $TypeName -and $_.Server.Address -eq $ServerName}
$Serviceinstance.Unprovision()

#######################################

Make sure that the user you are logged in as is a Farm Administrator.

Comments

  • Anonymous
    January 01, 2003
    Hi Aben, thanks for the link. It looks like you had some issues with SQL 2014 and requiring a CU. The particular issue I had was that the service was stuck on starting and even with all of the de-provisioning completed it still remained stuck on Starting. The important thing was to follow Spencer's reset and then run the above script. Thanks for the feedback.
  • Anonymous
    January 01, 2003
    Louis, use the email blog author link above and I will then get hold of you directly. I am traveling quite a bit but will try and respond quickly.
  • Anonymous
    October 30, 2014
    The comment has been removed
  • Anonymous
    May 05, 2015
    Scott how can i get in contact with you? I really need advice.
  • Anonymous
    June 10, 2015
    Good job, pal.
  • Anonymous
    June 11, 2015
    Thanks it worked perfect. :)
  • Anonymous
    October 06, 2015
    But how to start it again .....
  • Anonymous
    October 29, 2015
    The comment has been removed
  • Anonymous
    November 23, 2015
    I did that but still stuck on starting when i tried to Start again.
  • Anonymous
    March 14, 2016
    Thanks this worked for me.
  • Anonymous
    August 01, 2016
    It worked for me, Thanks!
  • Anonymous
    October 31, 2016
    it worked for me great!
  • Anonymous
    January 05, 2017
    Perfect! thanks! Worked for me!
  • Anonymous
    February 06, 2017
    Awesome, worked like a charm!
  • Anonymous
    March 02, 2017
    Recently had this issue occur on my SP 2013 installation that was using SQL 2014.I had gotten in working in the past on a SQL 2012 database backend by ensuring the farm admin account had admin privileges on the web front end responsible for doing the user profile synchronization when configuring it.This alone did not work with SQL 2014. The article referenced below mentioned that you have to install the cumulative update for SP 2013 to get it to run when using SQL 2014. After installing the cumulative update and running the SP Products and Technology tool to update the installation on all web front ends, I was quite relieved when the User Profile Synchronization service started up without a problem.https://blogs.msdn.microsoft.com/ianragusa/2014/06/23/sharepoint-2013-unable-to-start-the-user-profile-synchronization-service/