We had an interesting issue with the User Profile Service Application that was stuck on starting.
After double-checking Spencer Harbar’s post: “Stuck on Starting”: Common Issues with SharePoint Server 2010 User Profile Synchronization we still couldn’t get it to work.
The ULS logs didn’t show any information, and no events were logged to the Windows Event logs.
After opening a case with Microsoft, they provided me the actual error that they found after analyzing verbose logging data.
The error was:
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.
When starting the User Profile Synchronization Service, it tries to create a timer job (ProfileSynchronizationSetupJob) that will do part of the provisioning.
For some reason, this timer job already existed but was never run.
After deleting the timer job, I was able to start the User Profile Synchronization Service.