Showing posts with label User Profile. Show all posts
Showing posts with label User Profile. Show all posts

Wednesday, October 12, 2011

SharePoint 2010: User Profile Service not starting, remains in Stopped state

Issue:Not able to start User Profile Synchronization Service from “Services on Servers” page in Central Administration.

Symptoms:You have created a User Profile Service Application and now would like the User profile synchronization service to start only on specific servers. So, you go to Central Administration –> Application Management –> Services on Server.
On this page, you try to start the “User Profile Synchronization Service”. It stalls on “Starting” state for a minute or two and then reverts back to “Stopped” state.

Error Messages(s):When the status of the service returns to “Stopped” state following errors are logged in event viewer.

Log Name:      Application
Source:        Microsoft Resource Management Service
Date:          xx/xx/xxxx x:xx:xx xx
Event ID:      0
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer: xxxxxxxx
Description:
Service cannot be started. System.Data.SqlClient.SqlException: Could not find stored procedure 'RegisterService'.
   at Microsoft.ResourceManagement.WindowsHostService.OnStart(String[] args)
   at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)


Log Name:      Application
Source:        Forefront Identity Manager
Date:          xx/xx/xxxx x:xx:xx xx
Event ID:      3
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      xxxxxxxx
Description:
.Net SqlClient Data Provider: System.Data.SqlClient.SqlException: Could not find stored procedure 'RegisterService'.
   at Microsoft.ResourceManagement.Utilities.ExceptionManager.ThrowException(Exception exception)
   at Microsoft.ResourceManagement.Data.Exception.DataAccessExceptionManager.ThrowException(SqlException innerException)
   at Microsoft.ResourceManagement.Data.DataAccess.RegisterService(String hostName)
   at Microsoft.ResourceManagement.Workflow.Hosting.HostActivator.RegisterService(String hostName)
   at Microsoft.ResourceManagement.Workflow.Hosting.HostActivator.Initialize()
   at Microsoft.ResourceManagement.WebServices.ResourceManagementServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
   at Microsoft.ResourceManagement.WindowsHostService.OnStart(String[] args)


Log Name:      Application
Source:        Microsoft.ResourceManagement.ServiceHealthSource
Date:          xx/xx/xxxx x:xx:xx xx
Event ID:      2
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      xxxxxxxx
Description:
The Forefront Identity Manager Service could not bind to its endpoints.  This failure prevents clients from communicating with the Web services.

A most likely cause for the failure is another service, possibly another instance of Forefront Identity Manager Service, has already bound to the endpoint.  Another, less likely cause, is that the account under which the service runs does not have permission to bind to endpoints.

Ensure that no other processes have bound to that endpoint and that the service account has permission to bind endpoints.  Further, check the application configuration file to ensure the Forefront Identity Manager Service is binding to the correct endpoints.


Log Name:      Application
Source:        Microsoft.ResourceManagement.ServiceHealthSource
Date:          xx/xx/xxxx x:xx:xx xx
Event ID:      26
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      xxxxxxxx
Description:
The Forefront Identity Manager Service was not able to initialize a timer necessary for supporting the execution of workflows.

Upon startup, the Forefront Identity Manager Service must initialize and set a timer to support workflow execution.  If this timer fails to get created, workflows will not run successfully and there is no recovery other than to stop and start the Forefront Identity Manager Service. Restart the Forefront Identity Manager Service.


Cause:Incorrect permissions and configuration of the account that is used to run the Profile Synchronization Service.

Resolution:
  1. Add the account to local administrator’s group on the server where you are trying to start the service
  2. Restart the “SharePoint 2010 Timer Service” on the server.
  3. Ensure that you do not start the “Forefront Identity Manager” service manually. Although, if you want, you can change the service start up type to “Automatic (Delayed)”.
  4. Now, try to start the service from Central Administration –> Application Management –> Services on Server.

Friday, August 5, 2011

"An unexpected error has occurred" on all the SharePoint Server 2010 sites.

Issue:
All SharePoint sites throw the following error:
"An unexpected error has occurred."

Errors:
In ULS logs, something similar can be found

An exception occurred when trying to issue security token: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.. 

Exception occured while connecting to WCF endpoint: System.ServiceModel.FaultException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs. 
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.ReadResponse(Message response) 
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr) 
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst) 
at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForContext(Uri context, Boolean bearerToken, SecurityToken onBehalfOf, SecurityToken actAs, SecurityToken delegateTo) 
at Microsoft.SharePoint.SPSecurityContext.<>c__DisplayClass7.b__6() 
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) 
at Microsoft.SharePoint.SPSecurityContext.GetProcessSecurityTokenForServiceContext() 
at Microsoft.SharePoint.SPChannelFactoryOperations.CreateChannelAsProcess[TChannel](ChannelFactory`1 factory, EndpointAddress address, Uri via) 
at Microsoft.SharePoint.SPChannelFactoryOperations.CreateChannelAsProcess[TChannel](ChannelFactory`1 factory, EndpointAddress address) 
at Microsoft.Office.Server.UserProfiles.MossClientBase`1.get_Channel() 
at Microsoft.Office.Server.UserProfiles.MossClientBase`1.ExecuteOnChannel(String operationName, CodeBlock codeBlock) 
at Microsoft.Office.Server.UserProfiles.ProfilePropertyServiceClient.ExecuteOnChannel(String operationName, CodeBlock codeBlock)

UserProfileApplicationProxy.InitializePropertyCache: Microsoft.Office.Server.UserProfiles.UserProfileException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs. ---> System.ServiceModel.FaultException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs. 
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.ReadResponse(Message response) 
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr) 
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst) 
at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForContext(Uri context, Boolean bearerToken, SecurityToken onBehalfOf, SecurityToken actAs, SecurityToken delegateTo) 
at Microsoft.SharePoint.SPSecurityContext.<>c__DisplayClass7.b__6() 
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) 
at Microsoft.SharePoint.SPSecurityContext.GetProcessSecurityTokenForServiceContext() 
at Microsoft.SharePoint.SPChannelFactoryOperations.CreateChannelAsProcess[TChannel](ChannelFactory`1 factory, EndpointAddress address, Uri via) 
at Microsoft.SharePoint.SPChannelFactoryOperations.CreateChannelAsProcess[TChannel](ChannelFactory`1 factory, EndpointAddress address) 
at Microsoft.Office.Server.UserProfiles.MossClientBase`1.get_Channel() 
at Microsoft.Office.Server.UserProfiles.MossClientBase`1.ExecuteOnChannel(String operationName, CodeBlock codeBlock) 
at Microsoft.Office.Server.UserProfiles.ProfilePropertyServiceClient.ExecuteOnChannel(String operationName, CodeBlock codeBlock) -
-- End of inner exception stack trace --- 
at Microsoft.Office.Server.UserProfiles.ProfilePropertyServiceClient.ExecuteOnChannel(String operationName, CodeBlock codeBlock) 
at Microsoft.Office.Server.UserProfiles.ProfilePropertyServiceClient.GetProfileProperties() 
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.RefreshProperties(Guid applicationID) 
at Microsoft.Office.Server.Utilities.SPAsyncCache`2.GetValueNow(K key) 
at Microsoft.Office.Server.Utilities.SPAsyncCache`2.GetValue(K key, Boolean asynchronous) 
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.InitializePropertyCache()

System.NullReferenceException: Object reference not set to an instance of an object. 
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_ApplicationProperties() 
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_PartitionIDs() 
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.IsAvailable(SPServiceContext serviceContext) 
at Microsoft.Office.Server.WebControls.MyLinksRibbon.get_PortalAvailable() 
at Microsoft.Office.Server.WebControls.MyLinksRibbon.EnsureMySiteUrls() 
at Microsoft.Office.Server.WebControls.MyLinksRibbon.get_PortalMySiteUrlAvailable() 
at Microsoft.Office.Server.WebControls.MyLinksRibbon.OnLoad(EventArgs e) 
at System.Web.UI.Control.LoadRecursive() 
at System.Web.UI.Control.LoadRecursive() 
at System.Web.UI.Control.LoadRecursive() 
at System.Web.UI.Control.LoadRecursive() 
at System.Web.UI.Control.LoadRecursive() 
at System.Web.UI.Control.LoadRecursive() 
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Cause:
This will occur on single server deployments which uses build in SQL database. If you have done a farm installation, the resolution/cause may not apply.

Forefront Identity Manager Synchronization service corrupt not working. This in turn affects User profile sync service and security token service application.

If your applications are associated with User profile service, you will get the error.

Resolution:
As per the Technet article, User profile synchronization service does not work with single server deployment with build in databases.
Check the article for further details:
http://technet.microsoft.com/en-us/library/cc263202.aspx

To resolve the issue, delete the User profile synchronization service instance from Central Admin.

Monday, July 4, 2011

SharePoint User Profile Service stuck in "Starting" state

The reason for this can be many. This issue can be avoided if the steps mentioned in the following articles are done properly. The article is very reference for setting up UPS. (I am feeling a bit lazy today, so pointing you guys to some very informative articles on the net. In case you have messed up User profile service application while setup, I would recommend to do it from scratch by following these articles)

Rational Guide to implementing SharePoint Server 2010 User Profile Synchronization
http://www.harbar.net/articles/sp2010ups.aspx

“Stuck on Starting”: Common Issues with SharePoint Server 2010 User Profile Synchronization
http://www.harbar.net/articles/sp2010ups2.aspx

You might find these articles useful