Post-Deployment Configuration

Hi Instructors,

In Module 6, “Installing the WSUS Role”, my Post-deployment Configuration continues to fail. I’ve removed/re-installed “Windows Server Update Services” (2 of 3 installed) multiple times, and immediately after, I launch Post-Installation tasks - it fails each time. What am I doing wrong? Any ideas, thoughts? Help would be greatly appreciated!

The log file states the following:

2020-10-18 15:43:22 Postinstall started

2020-10-18 15:43:22 Detected role services: Api, UI, WidDatabase, Services

2020-10-18 15:43:22 Start: LoadSettingsFromXml

2020-10-18 15:43:22 Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentLocal

2020-10-18 15:43:22 Value is true

2020-10-18 15:43:22 End: GetConfigValue

2020-10-18 15:43:22 Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentDirectory

2020-10-18 15:43:22 Value is C:\WSUSUpdates

2020-10-18 15:43:22 End: GetConfigValue

2020-10-18 15:43:22 Content directory is C:\WSUSUpdates

2020-10-18 15:43:22 Database roleservice is not installed

2020-10-18 15:43:22 End: LoadSettingsFromXml

Post install is starting

2020-10-18 15:43:22 Start: Run

2020-10-18 15:43:22 Fetching WsusAdministratorsSid from registry store

2020-10-18 15:43:22 Value is S-1-5-21-303353843-1653003329-2043962379-1000

2020-10-18 15:43:22 Fetching WsusReportersSid from registry store

2020-10-18 15:43:22 Value is S-1-5-21-303353843-1653003329-2043962379-1001

2020-10-18 15:43:22 Configuring content directory…

2020-10-18 15:43:22 Configuring groups…

2020-10-18 15:43:22 Starting group configuration for WSUS Administrators…

2020-10-18 15:43:22 Found group in regsitry, attempting to use it…

2020-10-18 15:43:25 Writing group to registry…

2020-10-18 15:43:25 Finished group creation

2020-10-18 15:43:25 Starting group configuration for WSUS Reporters…

2020-10-18 15:43:25 Found group in regsitry, attempting to use it…

2020-10-18 15:43:25 Writing group to registry…

2020-10-18 15:43:25 Finished group creation

2020-10-18 15:43:25 Configuring permissions…

2020-10-18 15:43:25 Fetching content directory…

2020-10-18 15:43:25 Fetching ContentDir from registry store

2020-10-18 15:43:25 Value is C:\WSUSUpdates

2020-10-18 15:43:25 Fetching group SIDs…

2020-10-18 15:43:25 Fetching WsusAdministratorsSid from registry store

2020-10-18 15:43:25 Value is S-1-5-21-303353843-1653003329-2043962379-1000

2020-10-18 15:43:25 Fetching WsusReportersSid from registry store

2020-10-18 15:43:25 Value is S-1-5-21-303353843-1653003329-2043962379-1001

2020-10-18 15:43:25 Creating group principals…

2020-10-18 15:43:25 Granting directory permissions…

2020-10-18 15:43:25 Granting permissions on content directory…

2020-10-18 15:43:25 Granting registry permissions…

2020-10-18 15:43:25 Granting registry permissions…

2020-10-18 15:43:25 Granting registry permissions…

2020-10-18 15:43:25 Configuring shares…

2020-10-18 15:43:25 Configuring network shares…

2020-10-18 15:43:25 Fetching content directory…

2020-10-18 15:43:25 Fetching ContentDir from registry store

2020-10-18 15:43:25 Value is C:\WSUSUpdates

2020-10-18 15:43:25 Fetching WSUS admin SID…

2020-10-18 15:43:25 Fetching WsusAdministratorsSid from registry store

2020-10-18 15:43:25 Value is S-1-5-21-303353843-1653003329-2043962379-1000

2020-10-18 15:43:25 Content directory is local, creating content shares…

2020-10-18 15:43:25 Creating share “UpdateServicesPackages” with path “C:\WSUSUpdates\UpdateServicesPackages” and description “A network share to be used by client systems for collecting all software packages (usually applications) published on this WSUS system.”

2020-10-18 15:43:25 Deleting existing share…

2020-10-18 15:43:25 Creating share…

2020-10-18 15:43:25 Share successfully created

2020-10-18 15:43:25 Creating share “WsusContent” with path “C:\WSUSUpdates\WsusContent” and description “A network share to be used by Local Publishing to place published content on this WSUS system.”

2020-10-18 15:43:25 Deleting existing share…

2020-10-18 15:43:25 Creating share…

2020-10-18 15:43:25 Share successfully created

2020-10-18 15:43:25 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.”

2020-10-18 15:43:25 Deleting existing share…

2020-10-18 15:43:25 Creating share…

2020-10-18 15:43:25 Share successfully created

2020-10-18 15:43:25 Finished creating content shares

2020-10-18 15:43:25 Stopping service WSUSService

2020-10-18 15:43:25 Stopping service W3SVC

2020-10-18 15:43:25 Configuring WID database…

2020-10-18 15:43:25 Configuring the database…

2020-10-18 15:43:25 Establishing DB connection…

2020-10-18 15:43:25 Checking to see if database exists…

2020-10-18 15:43:25 Database exists

2020-10-18 15:43:25 Switching database to single user mode…

2020-10-18 15:43:25 Loading install type query…

2020-10-18 15:43:25 DECLARE @currentDBVersion int

DECLARE @scriptMajorVersion int = (14393)

DECLARE @scriptMinorVersion int = (0)

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

2020-10-18 15:43:25 Install type is: Reinstall

2020-10-18 15:43:25 Creating logins…

2020-10-18 15:43:25 Fetching account info for S-1-5-20

2020-10-18 15:43:25 Found principal

2020-10-18 15:43:25 Found account

2020-10-18 15:43:25 Got binary SID

2020-10-18 15:43:25 Fetching WsusAdministratorsSid from registry store

2020-10-18 15:43:25 Value is S-1-5-21-303353843-1653003329-2043962379-1000

2020-10-18 15:43:25 Fetching account info for S-1-5-21-303353843-1653003329-2043962379-1000

2020-10-18 15:43:25 Found principal

2020-10-18 15:43:25 Found account

2020-10-18 15:43:25 Got binary SID

2020-10-18 15:43:25 Setting content location…

2020-10-18 15:43:25 Fetching ContentDir from registry store

2020-10-18 15:43:25 Value is C:\WSUSUpdates

2020-10-18 15:43:25 Swtching DB to multi-user mode…

2020-10-18 15:43:25 System.Data.SqlClient.SqlException (0x80131904): Schema verification failed for database ‘SUSDB’.

ALTER DATABASE statement failed.

Failed to restart the current database. The current database is switched to master.

at Microsoft.UpdateServices.DatabaseAccess.DBConnection.DrainObsoleteConnections(SqlException e)

at Microsoft.UpdateServices.DatabaseAccess.DBConnection.ExecuteCommandNoResult()

at Microsoft.UpdateServices.Administration.ConfigureDB.ExecuteQueryNoResults(String query)

at Microsoft.UpdateServices.Administration.ConfigureDB.SetMultiUser(Boolean noFail)

ClientConnectionId:9b7dff87-775b-481b-bf4f-88b3f6432270

Error Number:3605,State:1,Class:16

2020-10-18 15:43:25 Disposing Connection

2020-10-18 15:43:25 Clearing Connection Pools

2020-10-18 15:43:25 System.Data.SqlClient.SqlException (0x80131904): Schema verification failed for database ‘SUSDB’.

ALTER DATABASE statement failed.

Failed to restart the current database. The current database is switched to master.

at Microsoft.UpdateServices.DatabaseAccess.DBConnection.DrainObsoleteConnections(SqlException e)

at Microsoft.UpdateServices.DatabaseAccess.DBConnection.ExecuteCommandNoResult()

at Microsoft.UpdateServices.Administration.ConfigureDB.ExecuteQueryNoResults(String query)

at Microsoft.UpdateServices.Administration.ConfigureDB.SetMultiUser(Boolean noFail)

at Microsoft.UpdateServices.Administration.ConfigureDB.Configure()

at Microsoft.UpdateServices.Administration.ConfigureDB.Run(String instanceName, Action`1 logWriter, Boolean contentLocal)

at Microsoft.UpdateServices.Administration.PostInstall.Run()

at Microsoft.UpdateServices.Administration.PostInstall.Execute(String[] arguments)

ClientConnectionId:9b7dff87-775b-481b-bf4f-88b3f6432270

Error Number:3605,State:1,Class:16

Fatal Error: Schema verification failed for database ‘SUSDB’.

ALTER DATABASE statement failed.

Failed to restart the current database. The current database is switched to master.

1 Like

Just a hunch here but are you installing WSUS on a Domain Controller? If so that is most likely the cause of these WID database errors.

Thanks for the quick response! WSUS is not installed on a DC. When I open tools on EBWSUS01, there’s no Active Directory, DNS, etc. available. I remember the lesson admonishing us to not install WSUS server (or a backup) on a DC. Any other ideas / t-shooting?

1 Like

Ok thanks. Let’s gather more information about your lab. What version of Windows Server - and what specs are assigned to your WSUS VM? Do you have a domain setup? Any additional information you can think of would be helpful.

1 Like

Please bear in mind - the course lab went without a hitch :grin:. The issue is found in my personal lab, here’s some (hopefully helpful) information:

WSUS Setup:
Windows Server Version:
Windows Server 2016 Datacenter Evaluation
(Windows License valid for 167 days, Build 14393.rs1_release.180427-1804)

WSUS VM Specs:
Processor: Intel Core i5-6200U
CPU 2.30GHz
RAM: 4 GB
System Type: 64-bit OS

Domain Setup:
Computer name: EBWSUS01
Full computer name: EBWSUS01. techworksolu
Domain: techworksolutions. com

IPv4 Properties:
IP Address: 10.0.2.11
Subnet mask 255.0.0.0
Default Gateway: 10.0.2.1
Preferred DNS Server: 10.0.2.10
Alternate DNS Server: 8.8.8.8

DC Setup:
Windows Server Version:
Windows Server 2016 Datacenter Evaluation
(Windows License valid for 167 days, Build 14393.rs1_release.161220-1747)

DC VM Specs:
Processor: Intel Core i5-6200U
CPU 2.30GHz 2.40GHz
RAM: 4 GB
System Type: 64-bit OS

DC Domain Setup:
Computer name: EBDC01
Full computer name: EBDC01.techworksolutions. com
Domain: techworksolutions. com

IPv4 Properties:
IP Address: 10.0.2.10
Subnet mask 255.0.0.0
Default Gateway: 10.0.2.1
Preferred DNS Server: 127.0.0.1
Alternate DNS Server: 8.8.8.8

Additional Info:
I noticed the log states failure with the database:
“Fatal Error: Schema verification failed for database ‘SUSDB’.
ALTER DATABASE statement failed.
Failed to restart the current database. The current database is switched to master.”

Not sure if this matters or not…

1 Like

Also, in WSUS Server Manager, when I goto Tools/Windows Server Update Services, a “Complete WSUS Installation” window pops up. “Store updates locally” is checked, with Content directory path as: C:\WSUSUpdates.

1 Like

How did you go about removing WSUS each time? It’s more in depth than just uninstalling the role:

  1. Remove role and internal WID feature
  2. Delete WSUSContent folder
  3. Delete the WID folder C:\Windows\WID
  4. Remove WsusPool and Wsus Administration from IIS

Go through those steps - or just delete and recreate your WSUS VM then try the installation again. Also make sure .NET 4.7 isn’t installed on your server under Windows Features.