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.

Monday, October 10, 2011

SharePoint Health Analyzer - Common Issues

I have seen in many SharePoint Farm installations where these messages usually show up in Health Analyzer page. Following are some basic steps that can be taken to get rid of the error/warning messages.

1- The server farm account should not be used for other services.
In the error description, you will see the names of the web application or windows services that is using the service account. Go to Central Administration -> Security -> Configure Service Accounts, Select the proper web application nor windows service and change the service account to an account which is not the system account. If there is no other domain account other than system account, use the Configure managed account page to register a new managed account.

2- Web.config files are not identical on all machines in the farm
Use a file utility like ExamDiff to check for differences in the web.config files. If the web.config files do not match up, make sure that the web.config files are similar across all the servers in the farm. Ensure you take a backup of the web.config files before replacing any files.
Then, you need to turn “off” automatic repair in “Web.config files are not identical on all machines in the farm” rule. This rule can be found in Central Administration -> Monitoring -> Health Analyzer Rule Definition -> under configuration category.




3- InfoPath Forms Services forms cannot be filled out in a Web browser because no State Service connection is configured
You will need to configure the State Service by running the configuration wizard. Detailed information can be found here - http://technet.microsoft.com/en-us/library/ff805084.aspx


4- Drives are running out of free space. 
Hard disk space is low on SP servers mentioned in the warning message. The available disk space should be at least or more than twice the amount of RAM installed on the machine.

Solution 1:  Free disk space on the server computer
1.     Verify that the user account that is performing this procedure is a member of the Administrators group on the local computer.
2.     Run the Disk Cleanup tool to free disk space on the server computer.
Solution 2:   Decrease the number of days to store log files
1.     Verify that the user account that is performing this procedure is a member of the Farm Administrators group.
2.     On the Central Administration Home page, click Monitoring.
3.     On the Monitoring page, in the Reporting section, click Configure diagnostic logging.
4.     On the Diagnostic Logging page, in the Trace Log section, in the Number of days to store log files box, type a smaller number.
5.     Click OK.
Solution 3: Add more disk space on the server

5- Database has large amounts of unused space.
Database files are defragmented or have more storage allocated on disk than actually required.
Follow http://support.microsoft.com/kb/307487/en-us to defragment the databases.

You might find these articles useful