none
User Profile Synchronization Service stuck on starting

    Question

  • Hi all,

    I am trying to provision  User profile synchronization service in production from last two days..but there is no improvement.

    I have1 WFE, 1 App Server and 1 SQL server in farm with sharepoint 2010 sp1 installed in it(version 14.0.6029.1000).

    I have two accounts.

    SPFarmAdmin :member of local administratorgroup , with"allow local log on access", Account used for Sharepoint Timer Job and CA App pool,member of all FIM groups, all WSP groups.

    SPUPS:account which has "replicate directory access" in active directly.Till now not used for any other activity in the farm.

    steps which I followed was from below articles

    http://myspexp.com/2011/04/28/user-profile-synchronization-servicehangs-on-starting-i-fixed-it/

    http://www.harbar.net/articles/sp2010ups2.aspx

    At a high Level

    1.Logged in in to App server with SPFarmAdmin and started "user profile service" from CA on the App server instance in the farm. followed by IISRESET.

    2.Deleted the existing User Profile service application and  Created "User Profile service application"  successfully . followed by IISreset .

    3.Started "user profile Synchronization service"  for the service list .

    waited for almost 30 minutes still the the status is in starting mode.

    going throught ULS log...found error that

    ====================================================

    User Profile Application: SynchronizeMIIS encounters an exception: Microsoft.SharePoint.Administration.SPDuplicateObjectException: An object of the type Microsoft.Office.Server.Administration.ProfileSynchronizationSetupJob named "ProfileSynchronizationSetupJob" already exists under the parent Microsoft.SharePoint.Administration.SPTimerService named "SPTimerV4". Rename your object or delete the existing object. at Microsoft.SharePoint.Administration.SPConfigurationDatabase.StoreObject(SPPersistedObject obj, Boolean storeClassIfNecessary, Boolean ensure) at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Microsoft.SharePoint.Administration.ISPPersistedStoreProvider.PutObject(SPPersistedObject persistedObject, Boolean ensure) at Microsoft.SharePoint.Administration.SPPersistedObject.BaseUpdate() at Microsoft.SharePoint.Administration.SPJobDefinition.Update() at Microsoft.Office.Server.Administration.UserProfileApplication.StartSynchronizationServiceSetupTimer(String strSyncMachineAddress) at Microsoft.Office.Server.Administration.UserProfileApplication.SynchronizeMIIS() at Microsoft.Office.Server.Administration.ILMProfileSynchronizationJob.Execute()

    ====================================================

     

    Any ideas regarding this will be appreciated.

    let me know if any other details are required for understanding the the problem.

    Thanks in Advance

     

     


    ragava_28

    Monday, December 26, 2011 9:31 PM

Answers

  • Hi all ,

    Thanks for all responce.All your comments helped me a lot in understanding user profile synchronization of sharepoint 2010.

    Solution

    I have Installed December CU in Farm and tried starting the User profile synchronization Service,which again ended up with same error.Finally thought of taking risk and deleted the "ProfileSynchronizationSetupJob" listed the Timer Job List and restarted App server. then reprovisened  User profile Synchronization Service which worked this time perfectly.


    ragava_28
    Thursday, January 19, 2012 6:37 PM

All replies

  • Ideally, the farm account used to start the "User Profile Sync Service" (UPS) needs to be a local admin on the Server that will host this service followed by restarting the "SharePoint 2010 timer service" on the same server. Then only attempt to start the UPS. So, the question is: "Have you restarted the SharePoint 2010 timer service after granting the farm account local admin privileges"?
    Joseph Saad - SharePoint 2010 MCITP, SharePoint 2010 MCPD, MCSE, CCIE RS 20243
    Tuesday, December 27, 2011 9:39 AM
  • Hi Raghu,

    your log shows "ProfileSynchronizationSetupJob" already exists in your farm. please check for these timer jobs, delete them and then try provisioning sync service again.

    below is helpfull link you can refere to but make sure you take an assistance from microsoft before doing major changes to your live production environment. 

    http://blogs.msdn.com/b/spses/archive/2010/12/02/guide-to-user-profile-service-application-upa-part-2-setting-up-the-user-profile-service-application.aspx

     

    -Amol Meshe

    Tuesday, December 27, 2011 10:19 AM
  • Hi,

    Run the following command with Administrator privileges.

    Get-spserviceinstance

    Note the ID and run

    stop-spserviceinstance <ID>                      Note - Without angular brackets

    Run this command and then delete the User profile sync service application, reboot the machine and create a new service application. If still the issue is not resolved, you can check the link -

    http://myspexp.com/2011/04/28/user-profile-synchronization-servicehangs-on-starting-i-fixed-it/

    http://technet.microsoft.com/en-us/library/gg750257.aspx

    http://technet.microsoft.com/en-us/library/ee721049.aspx

    http://blogs.technet.com/b/meamcs/archive/2011/08/09/user-profile-synchronization-service-stuck-on-quot-starting-quot-and-quot-security-token-service-is-unavailable-quot.aspx

    Tuesday, December 27, 2011 11:52 AM
  • Hi Joseph ,

    Thanks for the response.

    As suggested I have taken care of those points.

    I have added farm account to Administrator group of Server and Provided "Log on locally access" in Local syatem policies and

    then restarted the App server which is hosting user profile synchronization service.created UPS followed by Issreset and restart of Timer job.

    and the started the "user profile synchronization service" ...

    which ended in above message.

    any other ideas will be very much appreciated.

     

     

     

     


    ragava_28
    Tuesday, December 27, 2011 3:21 PM
  • Hi Amol

    Thanks for responce.

     I am not able to find duplicate instances of  ProfileSynchronizationSetupJob .I can see only one instance of ProfileSynchronizationSetupJob which is disabled.

    please let me know how can find the time job and delete the same.

    Regards

    Raghu


    ragava_28
    Tuesday, December 27, 2011 3:39 PM
  • Hi,

    Your farm version tells us that you have SP1 installed (revision no 1000 means Service pack). You should consider installing June CU, according to Micrsosoft product team, you shouldn't install SP1 without at least June CU (the refreshed one). What you are experiencing is that you sync database can't be upgraded. What you need to do is to first of all take a print screen of user profile service application settings, every single line of it. Then you need to stop user profile service application. When it's done, delete your user profile service application, WITHOUT deleting the databases! Then go to your SQL box and delete your sync database ONLY! Back to your SharePoint box, create the user profile service application and write exactly same database names as you took a print screen of. SharePoint won't create existing databases, but will create sync DB. Don't forget to add mysite information too. When the sync db is added, Sharepoint will try to upgrade the database to same level as the farm. Check also that your farm account is member of local administrators group in your application server (the server you have the service running at).

    Good luck!


    Regards
    Henrik A. Halmstrand
    sharepointrevealed.com
    getspconfig.codeplex.com
    Please click Mark As Answer; if a post solves your problem or Vote As Helpful; if a post has been useful to you.
    Tuesday, December 27, 2011 9:20 PM
  • Hi Raghu,

    Is your User profiles have any important information stored i.e. some information edited by users in their user profile which you dont want to loose ?

    If no, you can delete existing UPSA and As said by Henrik, I would also recommend to install June CU 2011 re-released along with SP1 and then recreated a UPSA again.

    Before Recreating UPSA again, please delete the certificates related Forefront Identity Manager from MMC as stated in above link I provided previously.

    If you dont want to loose any of user profile data at this point, then Stop the sync service from powershell using Stop-SpServiceInstance cmdlet, delete all the certificated as stated in the article, Create a new UPSA and start sync service. This will start your sync service.

     

    -Amol Meshe

    • Marked as answer by Seven M Wednesday, January 4, 2012 6:38 AM
    • Unmarked as answer by Raghu Vayu Nandana K Saturday, January 7, 2012 8:23 AM
    Wednesday, December 28, 2011 6:19 AM
  • thanks for all responses

    As suggested I have installed latest CU (Dec) in Farm environment.Even after that when I try to start user profile Synchronization service  it stuck on starting and ULS log shows the same message.

    So finally thought of taking risk by deleting "ProfileSynchronizationSetupJob" timer job as suggested by "Amol Meshe" and  recreated the User profile application again which worked.

    so now User profile synchronization got started.

    but now I ran into another problem.

    When  I am trying to creating connection to Active Directory(Synchronization Connection) I get message stating

    ===========================================

    An error has occurred while accessing the SQL Server database or the SharePoint Server Search service. If this is the first time you have seen this message, try again later. If this problem persists, contact your administrator.

    ============================================

    any help regarding this would be appreciated.


    ragava_28
    Saturday, January 7, 2012 9:16 PM
  • Hi,

    Be sure that Service Pack1 and cumulative updates are installed.

    Mare sure that once you've updated hotfix for SharePoint 2010, you must use the command "psconfig -cmd upgrade -inplace b2b -wait" and then check product and patch installation status (Central Administration >Upgrade and Migration > Check product and patch installation status)
    For User Service Profile service account perspective, you must configure the following for this service account:

    • A member of Farm Administrator group
    • A member of Local Administrator group in the server you are running SharePoint 2010 as application server (Server Manager >Configuration > Local Users and Groups > Groups. R-click Administrators group and then select Add to Group. In the Administrator Properties windows, clickAdd and then select your User profile service account)
    • Log on locally policy in the server you are running SharePoint 2010 as application server (Start> Administrative Tools > Local Security Policy >Local Policies > User Right Assignment. R-clickAllow log on locally and select Properties. You will then do a few easily steps to complete configuration). Using the commandgpupdate /force to confirm the changes.

    You will then need to use the following command to stop User Profile Service Application due to "Starting" forever.
    Get-SPServiceInstance
    Stop-SPServiceInstance -Identity “service application GUID”
    Delete the existing User Profile service application and then re-provision one.
    After completely configuring properly permission for User Service Profile service account as well as re-provisioning a new User Profile service application, you start new User Profile service application and need to check FIM service. Make sure that two FIM services are started automatically. Don't force it to start because let User profile service automatically does.


    Founder of SharePoint CookBook: http://www.GokanOzcifci.be
    Microsoft Certified Technology Specialist: SharePoint 2010, Configuring
    Microsoft Certified Personal
    Saturday, January 7, 2012 11:01 PM
  • Hi all ,

    Thanks for all responce.All your comments helped me a lot in understanding user profile synchronization of sharepoint 2010.

    Solution

    I have Installed December CU in Farm and tried starting the User profile synchronization Service,which again ended up with same error.Finally thought of taking risk and deleted the "ProfileSynchronizationSetupJob" listed the Timer Job List and restarted App server. then reprovisened  User profile Synchronization Service which worked this time perfectly.


    ragava_28
    Thursday, January 19, 2012 6:37 PM
  • Hi,

    Very happy for you. Please mark your question as answered and if any post helped you please vote as helpful. This will help other people searching for answers in the community.

    Cheers

     


    Regards
    Henrik A. Halmstrand
    sharepointrevealed.com
    getspconfig.codeplex.com
    Please click Mark As Answer; if a post solves your problem or Vote As Helpful; if a post has been useful to you.
    Thursday, January 19, 2012 6:42 PM
  • Hoping this will help someone. We had quite a few problems with the User profile service recently. We fixed most of them by re-creating the User Profile Service application. However, nothing seemed to fix the issue we saw below in our logs when we tried to start the User Profile Synchronization Service on one of our farms. 

    UserProfileApplication.SynchronizeMIIS: Failed to configure MOSS initial MAs, will attempt during next rerun. Exception: System.Management.ManagementException: Generic failure      at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)     at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()     at Microsoft.Office.Server.UserProfiles.Synchronization.ManagementAgent.ManagementAgentCollection.ManagementAgentEnumerator.MoveNext()     at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager.IsMossMaConfigured(UserProfileApplication application)     at Microsoft.Office.Server.Administration.UserProfileApplication.SetupSynchronizationService(ProfileSynchronizationServiceInstance profileSyncInstance). 00db214c-6a1d-4479-bfd8-7446e130213e

    This solution worked for us in the end:

    Grant Read permissions to the 'Network Service' account on the folder C:\Program Files\Microsoft Office Servers\14.0.


    Friday, May 25, 2012 3:48 PM
  • we also faced the same problem in SP 2013. The solution is availble at

    http://sharepointbybasva.blogspot.com/2013/12/user-profile-synchronization-service.html


    Thanks Ba$va

    Tuesday, December 3, 2013 8:31 PM
  • we also faced the same problem in SP 2013. The solution is availble at

    http://sharepointbybasva.blogspot.com/2013/12/user-profile-synchronization-service.html


    Thanks Ba$va

    I would not follow the advice of that blog post. By giving WSS_WPG and WSS_ADMIN_WPG Full Control over the Private Keys of the machine, you're significantly decreasing the security of the machine.

    Trevor Seward, MCC

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Tuesday, December 3, 2013 8:38 PM
    Moderator
  • we removed that. It was part of our troubleshooting step.

    we saw that madata folder is missing on our app server. we created the folder manually and later created the text file inside that folder as specified in the blog which fixed our issue.


    Thanks Ba$va

    Thursday, December 5, 2013 7:42 PM