post installation task failed WSUS 2019 timeout has expired

Mohamed Hassan 1 Reputation point
2022-09-01T14:18:50.983+00:00

Hello
I've upgraded my Domain Controller from windows server 2008 to 2012 R2 to 2019
everything working fine except WSUS so I removed the role and reinstall it again many times following topics, answers, and tutorials on YouTube
but it stopping at Post deployment configuration with error " Time out has expired and the operation has not been completed "

**Kindly find log file **
2022-09-01 15:14:13 Postinstall started
2022-09-01 15:14:13 Detected role services: Api, UI, WidDatabase, Services
2022-09-01 15:14:13 Start: LoadSettingsFromXml
2022-09-01 15:14:13 Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentLocal
2022-09-01 15:14:13 Value is true
2022-09-01 15:14:13 End: GetConfigValue
2022-09-01 15:14:13 Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentDirectory
2022-09-01 15:14:13 Value is E:\WSUS
2022-09-01 15:14:13 End: GetConfigValue
2022-09-01 15:14:13 Content directory is E:\WSUS
2022-09-01 15:14:13 Database roleservice is not installed
2022-09-01 15:14:13 End: LoadSettingsFromXml
Post install is starting
2022-09-01 15:14:13 Start: Run
2022-09-01 15:14:13 Fetching WsusAdministratorsSid from registry store
2022-09-01 15:14:13 Value is S-1-5-21-575199455-3745432009-2901656877-1239
2022-09-01 15:14:13 Fetching WsusReportersSid from registry store
2022-09-01 15:14:13 Value is S-1-5-21-575199455-3745432009-2901656877-1240
2022-09-01 15:15:13 Configuring content directory...
2022-09-01 15:15:13 Configuring groups...
2022-09-01 15:15:13 Starting group configuration for WSUS Administrators...
2022-09-01 15:15:13 Found group in regsitry, attempting to use it...
2022-09-01 15:15:13 Searching for existing group...
2022-09-01 15:15:13 Existing group was found
2022-09-01 15:15:13 Writing group to registry...
2022-09-01 15:15:13 Finished group creation
2022-09-01 15:15:13 Starting group configuration for WSUS Reporters...
2022-09-01 15:15:13 Found group in regsitry, attempting to use it...
2022-09-01 15:15:13 Searching for existing group...
2022-09-01 15:15:13 Existing group was found
2022-09-01 15:15:13 Writing group to registry...
2022-09-01 15:15:13 Finished group creation
2022-09-01 15:15:13 Configuring permissions...
2022-09-01 15:15:13 Fetching content directory...
2022-09-01 15:15:13 Fetching ContentDir from registry store
2022-09-01 15:15:13 Value is E:\WSUS
2022-09-01 15:15:13 Fetching group SIDs...
2022-09-01 15:15:13 Fetching WsusAdministratorsSid from registry store
2022-09-01 15:15:13 Value is S-1-5-21-575199455-3745432009-2901656877-1239
2022-09-01 15:15:13 Fetching WsusReportersSid from registry store
2022-09-01 15:15:13 Value is S-1-5-21-575199455-3745432009-2901656877-1240
2022-09-01 15:15:13 Creating group principals...
2022-09-01 15:15:14 Granting directory permissions...
2022-09-01 15:15:14 Granting permissions on content directory...
2022-09-01 15:15:14 Granting registry permissions...
2022-09-01 15:15:14 Granting registry permissions...
2022-09-01 15:15:14 Granting registry permissions...
2022-09-01 15:15:14 Configuring shares...
2022-09-01 15:15:14 Configuring network shares...
2022-09-01 15:15:14 Fetching content directory...
2022-09-01 15:15:14 Fetching ContentDir from registry store
2022-09-01 15:15:14 Value is E:\WSUS
2022-09-01 15:15:14 Fetching WSUS admin SID...
2022-09-01 15:15:14 Fetching WsusAdministratorsSid from registry store
2022-09-01 15:15:14 Value is S-1-5-21-575199455-3745432009-2901656877-1239
2022-09-01 15:15:14 Content directory is local, creating content shares...
2022-09-01 15:15:14 Creating share "UpdateServicesPackages" with path "E:\WSUS\UpdateServicesPackages" and description "A network share to be used by client systems for collecting all software packages (usually applications) published on this WSUS system."
2022-09-01 15:15:14 Deleting existing share...
2022-09-01 15:15:14 Creating share...
2022-09-01 15:15:14 Share successfully created
2022-09-01 15:15:14 Creating share "WsusContent" with path "E:\WSUS\WsusContent" and description "A network share to be used by Local Publishing to place published content on this WSUS system."
2022-09-01 15:15:14 Deleting existing share...
2022-09-01 15:15:14 Creating share...
2022-09-01 15:15:14 Share successfully created
2022-09-01 15:15:14 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."
2022-09-01 15:15:14 Deleting existing share...
2022-09-01 15:15:14 Creating share...
2022-09-01 15:15:14 Share successfully created
2022-09-01 15:15:14 Finished creating content shares
2022-09-01 15:15:14 Stopping service WSUSService
2022-09-01 15:15:14 Stopping service W3SVC
2022-09-01 15:15:14 Configuring WID database...
2022-09-01 15:15:14 Configuring the database...
2022-09-01 15:16:46 System.ServiceProcess.TimeoutException: Time out has expired and the operation has not been completed.
at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)
at Microsoft.UpdateServices.Administration.ConfigureDB.StartService(String serviceName)
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)
Fatal Error: Time out has expired and the operation has not been completed.

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,453 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,113 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. AllenLiu-MSFT 40,316 Reputation points Microsoft Vendor
    2022-09-02T01:55:02.38+00:00

    Hi, @MohamedHassan-5443

    Thank you for posting in Microsoft Q&A forum.

    Have we followed this blog to remove WSUS completely and reinstall it?
    https://www.ajtek.ca/wsus/how-to-remove-wsus-completely-and-reinstall-it/

    If this still doesn't work, we may try to disjoin the server from the domain, and restart. Try the post-installation steps again. If it works, the issue is a policy on your domain that is causing the issues. You can then rejoin the server to the domain.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. AllenLiu-MSFT 40,316 Reputation points Microsoft Vendor
    2022-09-08T07:47:02.027+00:00

    Hi, @MohamedHassan-5443

    The reason is that you do not uninstall WSUS on server 2008 before upgrade to 2012 R2, this will cause the post installation tasks for WSUS in Windows Server 2012 R2 to fail. And the only known corrective measure is to format the hard drive and reinstall Windows Server 2012 R2.

    Here is the snippet from article:
    Upgrade from any version of Windows Server that supports WSUS 3.2 to Windows Server® 2012 R2 requires that you first uninstall WSUS 3.2. In Windows Server 2012, upgrading from any version of Windows Server with WSUS 3.2 installed is blocked during the installation process if WSUS 3.2 is detected, and you are prompted to first uninstall Windows Server Update Services prior to upgrading Windows Server 2012. However, because of changes in Windows Server 2012 R2, when upgrading from any version of Windows Server and WSUS 3.2 to Windows Server 2012 R2, the installation is not blocked. Failure to uninstall WSUS 3.2 prior to performing a Windows Server 2012 R2 upgrade will cause the post installation tasks for WSUS in Windows Server 2012 R2 to fail. In this case, the only known corrective measure is to format the hard drive and reinstall Windows Server 2012 R2.

    https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh852345(v=ws.11)?redirectedfrom=MSDN#new-and-changed-functionality


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Adam J. Marshall 8,621 Reputation points MVP
    2022-09-08T14:28:28.747+00:00

    I have a blog post started but not finished relating to WSUS on DC's

    an excerpt from it:

    WSUS installs 2 groups to enable role based management. When you install WSUS on a member server, this creates 2 LOCAL groups:

    Name: WSUS Administrators
    Description: Members of this group can administer the Windows Server Update Services role.
    Name: WSUS Reporters
    Description: Members of this group can generate reports but cannot approve updates or configure the Windows Server Update Services role.

    Problem is that on DC's, those groups are "domain" groups .... if you remove it, the reinstall doesn't necessarily create these groups. You have to create them manually.

    0 comments No comments

  4. Limitless Technology 39,351 Reputation points
    2022-09-09T08:06:49.833+00:00

    Hello

    Thank you for your question and reaching out. I can understand you are having issues related to WSUS.

    Please Disable any Antivirus program or Windows firewall you may have for temporary purpose.

    Remove WSUS completely using below steps.

    1. Remove the following server roles and features through Server Manager:

    Roles: Windows Server Update Server

    features: Windows Server Update Services Tools(at Remote Server Administration Tools -> Role Administration Tools)

    1. After the server is restarted, manually delete the folder or file of the following path:
      • C:\WSUS (this depends on where you choose to install WSUS)
      • C:\Program Files\Update Services
    2. Delete SQL or WID database files

    If you use SQL Server Management Studio to delete a database, you can try as follow.

    In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance. Expand Databases, right-click the database to delete, and then click Delete. Confirm the correct database is selected, and then click OK.

    If you use a WID database, it is recommended to delete the following path folders:

    C:\Windows\WID

    1. In the IIS Information Services (IIS) Manager, manually remove the WSUS Administration site. Then restart the server.

    Or, you can also consider using the Powershell command Remove-WebSite -Name "WSUS Administration" for deletion.


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments