I have installed the WSUS role on a new Windows 2012 R2 Standard server after running a recovery of SCCM from an SCCM backup. When I run post-installation tasks for WSUS, it fails. Here is the log file for the WSUS post installation task:
2014-02-07 16:43:10 Postinstall started
2014-02-07 16:43:10 Detected role services: Api, UI, WidDatabase, Services
2014-02-07 16:43:10 Start: LoadSettingsFromXml
2014-02-07 16:43:10 Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentLocal
2014-02-07 16:43:10 Value is true
2014-02-07 16:43:10 End: GetConfigValue
2014-02-07 16:43:10 Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentDirectory
2014-02-07 16:43:10 Value is C:\WSUS Updates
2014-02-07 16:43:10 End: GetConfigValue
2014-02-07 16:43:10 Content directory is C:\WSUS Updates
2014-02-07 16:43:10 Database roleservice is not installed
2014-02-07 16:43:10 End: LoadSettingsFromXml
Post install is starting
2014-02-07 16:43:10 Start: Run
2014-02-07 16:43:10 Fetching WsusAdministratorsSid from registry store
2014-02-07 16:43:10 Value is S-1-5-21-3025612760-274001468-3045011964-1001
2014-02-07 16:43:10 Fetching WsusReportersSid from registry store
2014-02-07 16:43:10 Value is S-1-5-21-3025612760-274001468-3045011964-1002
2014-02-07 16:43:10 Update synchronization in progress. Cancelling...
2014-02-07 16:43:10 Configuring content directory...
2014-02-07 16:43:10 Configuring groups...
2014-02-07 16:43:10 Starting group configuration for WSUS Administrators...
2014-02-07 16:43:10 Found group in regsitry, attempting to use it...
2014-02-07 16:43:13 Writing group to registry...
2014-02-07 16:43:13 Finished group creation
2014-02-07 16:43:13 Starting group configuration for WSUS Reporters...
2014-02-07 16:43:13 Found group in regsitry, attempting to use it...
2014-02-07 16:43:13 Writing group to registry...
2014-02-07 16:43:13 Finished group creation
2014-02-07 16:43:13 Configuring permissions...
2014-02-07 16:43:13 Fetching content directory...
2014-02-07 16:43:13 Fetching ContentDir from registry store
2014-02-07 16:43:13 Value is C:\WSUS Updates
2014-02-07 16:43:13 Fetching group SIDs...
2014-02-07 16:43:13 Fetching WsusAdministratorsSid from registry store
2014-02-07 16:43:13 Value is S-1-5-21-3025612760-274001468-3045011964-1001
2014-02-07 16:43:13 Fetching WsusReportersSid from registry store
2014-02-07 16:43:13 Value is S-1-5-21-3025612760-274001468-3045011964-1002
2014-02-07 16:43:13 Creating group principals...
2014-02-07 16:43:13 Granting directory permissions...
2014-02-07 16:43:15 Granting permissions on content directory...
2014-02-07 16:43:16 Granting registry permissions...
2014-02-07 16:43:16 Granting registry permissions...
2014-02-07 16:43:16 Granting registry permissions...
2014-02-07 16:43:16 Configuring shares...
2014-02-07 16:43:17 Configuring network shares...
2014-02-07 16:43:17 Fetching content directory...
2014-02-07 16:43:17 Fetching ContentDir from registry store
2014-02-07 16:43:17 Value is C:\WSUS Updates
2014-02-07 16:43:17 Fetching WSUS admin SID...
2014-02-07 16:43:17 Fetching WsusAdministratorsSid from registry store
2014-02-07 16:43:17 Value is S-1-5-21-3025612760-274001468-3045011964-1001
2014-02-07 16:43:17 Content directory is local, creating content shares...
2014-02-07 16:43:19 Creating share "UpdateServicesPackages" with path "C:\WSUS Updates\UpdateServicesPackages" and description "A network share to be used by client systems for collecting all software packages (usually applications)
published on this WSUS system."
2014-02-07 16:43:22 Deleting existing share...
2014-02-07 16:43:24 Creating share...
2014-02-07 16:43:24 Share successfully created
2014-02-07 16:43:24 Creating share "WsusContent" with path "C:\WSUS Updates\WsusContent" and description "A network share to be used by Local Publishing to place published content on this WSUS system."
2014-02-07 16:43:25 Deleting existing share...
2014-02-07 16:43:26 Creating share...
2014-02-07 16:43:26 Share successfully created
2014-02-07 16:43:26 Creating share "WSUSTemp" with path "C:\Program Files\Update Services\LogFiles\WSUSTemp" and description "A network share used by Local Publishing from a Remote WSUS Console Instance."
2014-02-07 16:43:27 Deleting existing share...
2014-02-07 16:43:27 Creating share...
2014-02-07 16:43:27 Share successfully created
2014-02-07 16:43:27 Finished creating content shares
2014-02-07 16:43:27 Stopping service WSUSService
2014-02-07 16:43:27 Stopping service W3SVC
2014-02-07 16:43:32 Configuring WID database...
2014-02-07 16:43:32 Configuring the database...
2014-02-07 16:43:33 Establishing DB connection...
2014-02-07 16:43:34 Checking to see if database exists...
2014-02-07 16:43:39 Database exists
2014-02-07 16:43:39 Switching database to single user mode...
2014-02-07 16:43:42 Loading install type query...
2014-02-07 16:43:42 DECLARE @currentDBVersion int
DECLARE @scriptMajorVersion int = (9600)
DECLARE @scriptMinorVersion int = (16384)
DECLARE @databaseMajorVersion int
DECLARE @databaseMinorVersion int
DECLARE @databaseBuildNumber nvarchar(10)
IF NOT EXISTS(SELECT * FROM sys.databases WHERE name='SUSDB')
BEGIN
SELECT 1
END
ELSE
BEGIN
SET @currentDBVersion = (SELECT SchemaVersion FROM SUSDB.dbo.tbSchemaVersion WHERE ComponentName = 'CoreDB')
SET @databaseBuildNumber = (SELECT BuildNumber FROM SUSDB.dbo.tbSchemaVersion WHERE ComponentName = 'CoreDB')
DECLARE @delimiterPosition INT = CHARINDEX('.', @databaseBuildNumber)
IF (@delimiterPosition = 0)
BEGIN
RAISERROR('Invalid schema version number', 16, 1) with nowait
return
END
SET @databaseMajorVersion = SUBSTRING(@databaseBuildNumber, 1, @delimiterPosition - 1)
SET @databaseMinorVersion = SUBSTRING(@databaseBuildNumber, (@delimiterPosition + 1), (10 - @delimiterPosition))
IF @currentDBVersion < 926
BEGIN
SELECT 3
END
ELSE
BEGIN
IF (@scriptMajorVersion > @databaseMajorVersion OR
(@scriptMajorVersion = @databaseMajorVersion AND @scriptMinorVersion > @databaseMinorVersion))
BEGIN
SELECT 2
END
ELSE IF (@scriptMajorVersion = @databaseMajorVersion AND
@scriptMinorVersion = @databaseMinorVersion)
BEGIN
SELECT 0
END
ELSE
BEGIN
SELECT 4
END
END
END
2014-02-07 16:43:42 Install type is: Reinstall
2014-02-07 16:43:42 Creating logins...
2014-02-07 16:43:42 Fetching account info for S-1-5-20
2014-02-07 16:43:42 Found principal
2014-02-07 16:43:42 Found account
2014-02-07 16:43:42 Got binary SID
2014-02-07 16:43:44 Fetching WsusAdministratorsSid from registry store
2014-02-07 16:43:44 Value is S-1-5-21-3025612760-274001468-3045011964-1001
2014-02-07 16:43:44 Fetching account info for S-1-5-21-3025612760-274001468-3045011964-1001
2014-02-07 16:43:44 Found principal
2014-02-07 16:43:44 Found account
2014-02-07 16:43:44 Got binary SID
2014-02-07 16:43:44 Setting content location...
2014-02-07 16:43:44 Fetching ContentDir from registry store
2014-02-07 16:43:44 Value is C:\WSUS Updates
2014-02-07 16:43:45 Swtching DB to multi-user mode......
2014-02-07 16:43:55 Finished setting multi-user mode
2014-02-07 16:43:55 Writing DB settings to registry...
2014-02-07 16:43:55 Marking PostInstall done for UpdateServices-WidDatabase in the registry...
2014-02-07 16:43:55 Starting service W3SVC
2014-02-07 16:43:55 Configuring IIS...
2014-02-07 16:43:55 Start: ConfigureWebsite
2014-02-07 16:44:03 Configuring website on port 8530
2014-02-07 16:47:21 2014-02-07 16:44:27 Info IISCustomAction Performing Setup Action, Command /Install
2014-02-07 16:47:15 Info IISCustomAction Command /Install Succeeded
2014-02-07 16:47:21 End: ConfigureWebsite
2014-02-07 16:47:21 Configuring performance counters...
2014-02-07 16:47:21 Configuring Stats.NET perf counter...
2014-02-07 16:47:21 Configuring reporting perf counter...
2014-02-07 16:47:21 Configuring client webservice perf counter...
2014-02-07 16:47:21 Configuring server sync webservice perf counter...
2014-02-07 16:47:21 Configuring API remoting perf counter...
2014-02-07 16:47:21 Bringing services online...
2014-02-07 16:47:21 Checking initialization status...
2014-02-07 16:48:00 Database needs initialization.
2014-02-07 16:48:00 StartServer starting...
2014-02-07 16:48:00 Generating encryption key to write to the registry...
2014-02-07 16:48:00 Generating encryption key to write to the database...
2014-02-07 16:48:13 Generating encryption key succeeded...
2014-02-07 16:48:13 Setting WSUSService to autostart...
2014-02-07 16:48:13 WSUSService is set to autostart.
2014-02-07 16:48:13 Starting WSUSService...
2014-02-07 16:48:13 WSUSService is now started.
2014-02-07 16:48:13 Importing default detectoids.
2014-02-07 16:48:13 Importing CriticalUpdates.xml...
2014-02-07 16:48:21 Importing Drivers.xml...
2014-02-07 16:48:31 Importing FeaturePacks.xml...
2014-02-07 16:48:39 Importing MicrosoftCorporation.xml...
2014-02-07 16:48:48 Importing SecurityUpdates.xml...
2014-02-07 16:48:57 Importing ServicePacks.xml...
2014-02-07 16:49:06 Importing Tools.xml...
2014-02-07 16:49:06 Importing UpdateRollups.xml...
2014-02-07 16:49:20 Importing Updates.xml...
2014-02-07 16:49:28 Importing Windows.xml...
2014-02-07 16:49:49 Importing Windows2000family.xml...
2014-02-07 16:49:53 Importing WindowsServer2003DatacenterEdition.xml...
2014-02-07 16:49:57 Importing WindowsServer2003Family.xml...
2014-02-07 16:50:04 Importing WindowsXPfamily.xml...
2014-02-07 16:50:04 Importing LocalPublisher.xml...
2014-02-07 16:50:04 Importing LocallyPublishedPackages.xml...
2014-02-07 16:50:13 Importing Applications.xml...
2014-02-07 16:50:17 Importing Exchange.xml...
2014-02-07 16:50:22 Importing Office.xml...
2014-02-07 16:50:27 Importing SQL.xml...
2014-02-07 16:50:33 Importing Exchange2000Server.xml...
2014-02-07 16:53:04 ImportDefaultDetectoids failed. Exception: System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Warning: The join order has been enforced because a local join hint is used. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
at Microsoft.UpdateServices.DatabaseAccess.DBConnection.DrainObsoleteConnections(SqlException e)
at Microsoft.UpdateServices.DatabaseAccess.DBConnection.ExecuteCommandNoResult()
at Microsoft.UpdateServices.Internal.DatabaseAccess.CommonDataAccess.ExecuteSPImportUpdate(Int32 upstreamServerLocalId, String xmlUpdateBlob, Byte[] xmlUpdateBlobCompressed, Int32& localRevisionId)
at Microsoft.UpdateServices.Internal.DatabaseAccess.CommonDataAccess.ImportUpdate(Int32 ussRevLocalId, String xmlUpdateBlob, Byte[] xmlUpdateBlobCompressed, String xmlSdpBlob, Int32& localRevisionId)
at Microsoft.UpdateServices.Internal.DatabaseAccess.CommonDataAccess.ImportUpdate(Int32 ussRevLocalId, String xmlUpdateBlob, Byte[] xmlUpdateBlobCompressed)
at Microsoft.UpdateServices.Setup.StartServer.StartServer.ImportDefaultDetectoids()
ClientConnectionId:0026c9c0-ff10-4daa-9b8b-ff3c9d1ae055
2014-02-07 16:53:04 StartServer encountered errors. Exception=Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Warning: The join order has been enforced because a local join hint is used.
2014-02-07 16:53:04 Microsoft.UpdateServices.Administration.CommandException: Failed to start and configure the WSUS service
at Microsoft.UpdateServices.Administration.PostInstall.Run()
at Microsoft.UpdateServices.Administration.PostInstall.Execute(String[] arguments)
Fatal Error: Failed to start and configure the WSUS service