Trying to start the “User Profile Synchronization Service” but would not start…

ULS logs error message:
=======================
03/31/2010 12:32:17.28        OWSTIMER.EXE (0x0810)        0x0944        SharePoint Foundation        Topology        8xqz        Medium        Updating SPPersistedObject ProfileSynchronizationSetupJob Name=ProfileSynchronizationSetupJob. Version: 10242 Ensure: False, HashCode: 48675423, Id: 805588d9-e8ac-429a-9942-dc9772c11ef6, Stack: at Microsoft.SharePoint.Administration.SPPersistedObject.BaseUpdate()
at Microsoft.SharePoint.Administration.SPJobDefinition.Update()
at Microsoft.Office.Server.Administration.ProfileSynchronizationSetupJob.Execute(SPJobState state)
at Microsoft.SharePoint.Administration.SPTimerJobInvokeInternal.Invoke(SPJobDefinition jd, Guid targetInstanceId, Boolean isTimerService, Int32& result)
at Microsoft.SharePoint.Administration.SPTimerJobInvoke.Invoke(TimerJobExecuteData& data, Int32& result)        39557aed-106d-4953-aa92-09fed7c7e6f0

03/31/2010 12:32:17.31        OWSTIMER.EXE (0x0810)        0x0944        SharePoint Foundation        Timer        6398        Critical        The Execute method of job definition Microsoft.Office.Server.Administration.ProfileSynchronizationSetupJob (ID 805588d9-e8ac-429a-9942-dc9772c11ef6) threw an exception. More information is included below. An update conflict has occurred, and you must re-try this action. The object UserProfileApplication Name=UPA was updated by SHAREPOINTO14\spfarmacc, in the OWSTIMER (2064) process, on machine O14MSSSRV. View the tracing log for more information about the conflict.        39557aed-106d-4953-aa92-09fed7c7e6f0

03/31/2010 12:32:17.31        OWSTIMER.EXE (0x0810)        0x0944        SharePoint Foundation        Timer        72ae        Unexpected        Exception stack trace: 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.SPIisWebServiceApplication.Update()
at Microsoft.Office.Server.Administration.UserProfileApplication.Update()
at Microsoft.Office.Server.Administration.UserProfileApplication.ResetILMFlags()
at Microsoft.Office.Server.Administration.ProfileSynchronizationSetupJob.Execute(SPJobState state)
at Microsoft.SharePoint.Administration.SPTimerJobInvokeInternal.Invoke(SPJobDefinition jd, Guid targetInstanceId, Boolean isTimerService, Int32& result)        39557aed-106d-4953-aa92-09fed7c7e6f0

Cause: It turned out that I had not logged in to the sharepoint server with the account which is used for User Profiles configuration.

Resolution: Make sure that the user account used for provisioning the User Profiles Sync Services is a Local admin on the SharePoint server and have logged in using that account while provisioning the UP services.