Accueil > Blog > Billets > User Profile Synchronization Service do not restart
juin 10
User Profile Synchronization Service do not restart

Cet article est une traduction d'un billet de blog, l'article en français est visible ici : http://www.sosp.fr/blog/Lists/Billets/Post.aspx?ID=33

The Error

Have you ever seen, after a reboot (or just after a while), the User Profile Synchronization Service (UPS) moving into "Stopped" status. And when trying to start it again the following events appears in the ULS:

Provisioning service instance User Profile Synchronization Service.

The service instance User Profile Synchronization Service is successfully provisioned.

UserProfileApplication.SynchronizeMIIS: Begin setup for '<My_User_Profile_Service_application_Name>'.

ILM Configuration: The miissku.exe process exited with error code -2146232060. Error: .

ILM Configuration: The ValidateMiisEncryptionKey process returned False.

Synchronization database is already initialized. Importing the encryption key for the database into the registry

ILM Configuration: The miissku.exe process exited with error code -2146232060. Error: .

UserProfileApplication.SynchronizeMIIS: Failed to configure MIIS pre database, will attempt during next rerun. Exception: System.Configuration.ConfigurationErrorsException: Une exception de type 'System.Configuration.ConfigurationErrorsException' a été levée. à Microsoft.Office.Server.UserProfiles.Synchronization.ILMPostSetupConfiguration.ImportMiisEncryptionKey(String encryptionKeyFileName) à Microsoft.Office.Server.Administration.UserProfileApplication.RestoreMiisEncryptionKey(ILMPostSetupConfiguration psc) à Microsoft.Office.Server.Administration.UserProfileApplication.SetupSynchronizationService(ProfileSynchronizationServiceInstance profileSyncInstance).

We saw this with severals customers, running different Windows versions  (Windows 2008, Windows 2008R2), with different SQL Server versions (SQLServer 2008, SQLServer 2008R2) and even with different languages (French and English).

Common point to these SharePoint 2010 Farm : All of them uses an SQL alias to access SQL Server. It seems that FIM (Forefront Identity Manager) do not leverage this alias very well .

A workaround is to declare another SQL alias, on the client side. The idea id to access to the SQL instance with the default instance name.

We can achieve this with cliconfg.exe

Example 

For this farm, default database Server is called sqlmoss\MOSS (The real instance name is <sql_server_name>\MOSS, sqlmoss\MOSS is an alias of < sql_server_name >\MOSS define on the SQL Server).

Figure 1: Alias set on the SQL Server, with SQL Config Manager

We have to create an alias on the SharePoint front-end to access to the SQL instance via the alias sqlmoss  (without the \MOSS) :

Figure 2: Alias définit sur le serveur Frontal Sharepoint, avec cliconfg

Then all we got to do is start the UPS, et voilaaaa….

     

What the Hell …??

Weirdly, FIM write database configuration within the registry : HKLM\System\CurrentControlSet\services\FIMSynchronizationService\Parameters\

Here, there is a key called SQLInstance : Eureka ! All we got to do is configuring this key to make FIM query the right database … Well, it's not that easy ! On first UPS start attempt this key is flushed. Question is Why… Dunno..
Especially as once the SQL alias is set and the UPS started, the key has the right value !

To put it in a nutshell :

  1. If there is no Alias, FIM query the default instance name
  2. If an alias is set via cliconfg, FIM query the full instance name…Do you understand a thing ? I don't !

Figure 3 :SQLInstance key is flushed by FIM. But with an SQLAlias, this key obtains the right value.

To go further, I suggest you this amazing article of Spencer Harbar: http://www.harbar.net/articles/sp2010ups.aspx. Here is the article where I found the workaround : http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/50e92b07-66d5-4025-894b-efaf0e59330e/

     

   


© 2010 Solutions-pour-Sharepoint.fr. Tous droits réservés.