June 16, 2011

SharePoint: SPUpgradeSession errors in ULS log every 8 hours

Problem:
SharePoint 2010 ULS logs get bunch of error messages at around 2:00, 10:00 and 18:00. If there are more than one WFE in the farm, you will probably have the error related to every WFE.

Errors look like this:

[powershell] [SPUpgradeSession] [ERROR] [6.6.2011 9:59:01]: CanUpgrade [SPConfigurationDatabase] failed.[powershell] [SPUpgradeSession] [ERROR] [6.6.2011 9:59:01]: Exception: Login failed for user 'AD\WFESERVERNAME$'.
[powershell] [SPUpgradeSession] [ERROR] [6.6.2011 9:59:01]:   
     at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)    
     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)    
     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)    
     at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)    
     at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)    
     at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)    
     at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)    
     at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)    
     at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)    
     at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)    
     at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)    
     at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)    
     at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)    
     at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)    
     at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)    
     at System.Data.SqlClient.SqlConnection.Open()    
     at Microsoft.SharePoint.Utilities.SqlSession.OpenConnection()    
     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)    
     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, Boolean retryForDeadLock)    
     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command)    
     at Microsoft.SharePoint.Upgrade.SPDatabaseSequence.GetVersion(SPDatabase database, Guid id, Version defaultVersion, SqlSession session, SPDatabaseSequence sequence)    
     at Microsoft.SharePoint.Upgrade.SPDatabaseWssSequence.get_BuildVersion()    
     at Microsoft.SharePoint.Upgrade.SPSequence.get_CanUpgrade()    
     at Microsoft.SharePoint.Upgrade.SPUpgradeSession.CanUpgrade(Object o)
   

Workaround:
Add 'AD\WFESERVERNAME$‘ (and other WFEs if there are several) to users in SQL, but with no additional permissions (so that they’re in public role).

I will call this a workaround as I haven’t found information that would point this to be best solution mainly in terms of security. Also the actual job/task causing these errors is not yet known.

2 comments:

  1. Hi! I have exactly the same problem, but it's a Sharepoint RTM used by another piece of software. Have you fixed it ? Is it just Sharepoint ?

    ReplyDelete
  2. Hi Nuno,
    the reason for this is a generic one that user doesn't have permissions (or doesn't even exist) on the SQL Server.

    You should find out what the user having the problem actually is and grant permissions for the user.

    Unfortunately I cannot say more based on the details you provided.

    ReplyDelete