question

RobertTalks-1707 avatar image
0 Votes"
RobertTalks-1707 asked RobertTalks-1707 commented

Server 2019: WSUS Not Working

Hi, I have had constant issues with WSUS on our Windows Server 2019 Standard 1809.
The server has a Intel Exeon E-2224 CPU @ 3.40GHz with 32GB of RAM. The partition for WSUS is 10.3TB with 10.2TB free, the WSUS folder has a current size of 66.8GB.

I have found many resources online that suggest tweaking the advanced settings in the Application Pool for WSUS in IIS, but nothing has helped.

Please see below examples of the problem...

As you can see, there are now a considerable amount of pending updates due to this problem. In this example, I have selected 3164 security updates are waiting to be approved. I have selected the blue approved button.

181862-updatesawaiting1.png


Once I click the approve button, I see the following screen with a loading mouse wheel for almost 5 minutes:
181757-clickthroughwait2.png


After around five minutes, I get the usual connection error screen:
181815-connectionerror3.png


If I click on Copy Error to Clipboard, this is the error:

Blockquote>

The WSUS administration console was unable to connect to the WSUS Server via the remote API.

Verify that the Update Services service, IIS and SQL are running on the server. If the problem persists, try restarting IIS, SQL, and the Update Services Service.

 System.Net.WebException -- The operation has timed out
    
 Source
 System.Web.Services
    
 Stack Trace:
    at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
    at Microsoft.UpdateServices.Internal.DatabaseAccess.ApiRemotingCompressionProxy.GetWebResponse(WebRequest webRequest)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    at Microsoft.UpdateServices.Internal.ApiRemoting.ExecuteSPSearchUpdates(String updateScopeXml, String preferredCulture, Int32 publicationState)
    at Microsoft.UpdateServices.Internal.DatabaseAccess.AdminDataAccessProxy.ExecuteSPSearchUpdates(String updateScopeXml, String preferredCulture, ExtendedPublicationState publicationState)
    at Microsoft.UpdateServices.Internal.BaseApi.Update.SearchUpdates(UpdateScope searchScope, ExtendedPublicationState publicationState, UpdateServer updateServer)
    at Microsoft.UpdateServices.UI.AdminApiAccess.UpdateManager.GetUpdates(ExtendedUpdateScope filter)
    at Microsoft.UpdateServices.UI.AdminApiAccess.BulkUpdatePropertiesCache.GetAndCacheUpdates(ExtendedUpdateScope updateScope, ComputerTargetScope computerTargetScope)
    at Microsoft.UpdateServices.UI.SnapIn.Pages.UpdatesListPage.GetListRows()


If I visit IIS and look at the advanced settings for WsusPool within Application Pools, this is what settings are configured:

181874-wsuspoolsettings5.png


181758-wsuspoolsettings6.png

181816-wsuspoolsettings7.png

I have tried restarting IIS services, tweaking the advanced settings as per many other forum posts, but I get the same result every time. It does not make a difference if I try and carefully browse to WSUS>Updates>Critical or Security Updates, I get the same error again.

Can someone please tell me why this product is not working. We invest a considerable amount in Microsoft Software and this should not be failing.







windows-server-update-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RitaHu-MSFT avatar image
1 Vote"
RitaHu-MSFT answered RitaHu-MSFT edited

@RobertTalks-1707
Thanks for your posting on Q&A.

It seems that you have synced too many updates. According to the Official Document, In an environment that has around 17,000 updates cached, more than 24 GB of memory may be needed as the cache is built until it stabilizes (at around 14 GB). But there are only 32GB RAM in your environment.

Also please try to configure the Application Pool in the IIS as the below screenshots.
182075-7.png

182057-6.png

Also please try to cleanup the superseded updates. Here is PowerShell script for your reference:
https://docs.microsoft.com/en-GB/troubleshoot/mem/configmgr/decline-superseded-updates

Best regards,
Rita


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.


6.png (17.1 KiB)
7.png (23.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RobertTalks-1707 avatar image
0 Votes"
RobertTalks-1707 answered RitaHu-MSFT converted comment to answer

Thank you @RitaHu-MSFT for your reply.
I have followed through your post and made the necessary changes.
I also tried to use the PowerShell script you provided a link to but it is not running as per the below.

It would seem that the server is not running SSH from the results. Whilst it connects when doing a test run against WSUS Server without SSL, it fails to get updates with a time out error.

I notice that the WSUS Update Services Management Console also shows the same Error: Connection Error message it was showing in my original post at the start of this thread so the tweaks you suggested in IIS do not seem to have made a change. If I click 'reset server node' it tends to bring WSUS back up, but as soon as I run the PowerShell script, I get the Error: Connection Error message again and the PowerShell script returns the failed to get updates time out error message.

I have tried to re-start the IIS services, but this does not help.
I am running this PowerShell script on the WSUS server its self.

Is there anything else I can do to successfully get this to run and clear the updates?

Many thanks for your help.

183283-declinesuperseededupdatesps.png



· 11
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RobertTalks-1707
May I know the status of the case right now? You have enabled the SSL. Am I right? Could you connect to the database by SSMS?

Please try to follow the below link to maintain the WSUS first and then confirm whether the issue will be resolved.
https://docs.microsoft.com/en-us/troubleshoot/mem/configmgr/wsus-maintenance-guide#help-my-wsus-has-been-running-for-years-without-ever-having-maintenance-done-and-the-cleanup-wizard-keeps-timing-out

Best regards,
Rita

1 Vote 1 ·

Rita,
Thank you for your post. Unfortunately, I have experienced further issues.
When I open SSMS on the server in question, I am unable to locate the WSUS database.
This is what I am seeing....

185607-sqlserverbrowse.png



As you can see, the only DB engine identified is that of Backup Exec. There does not seem to be a WSUS database, yet WSUS is installed on this system.

Can you advise what I could do next?
Many Thanks
Rob

0 Votes 0 ·
sqlserverbrowse.png (11.7 KiB)
RitaHu-MSFT avatar image RitaHu-MSFT RobertTalks-1707 ·

Hello Rob,

Thanks for your response.

What is the type of your WSUS database? WID or SQL server? To connect to the WID database in SSMS, we could open SSMS as an administrator and print the Server name as

  \\.\pipe\MICROSOFT##WID\tsql\query

Reference screenshot:
185954-1.png

Best regards,
Rita


1 Vote 1 ·
1.png (16.9 KiB)
Show more comments
RitaHu-MSFT avatar image
0 Votes"
RitaHu-MSFT answered RobertTalks-1707 commented

Hello Robert,

Please follow the below steps and confirm whether it is helpful.

  1. Try to connect to the WID database
    Open the SSMS as an administrator and print the Server Name: \\.\pipe\MICROSOFT##WID\tsql\query. Then we could connect to the database.

  2. Try to attach the WID database again
    Reference screenshot:
    190444-2.png

  3. Back up the database
    Reference screenshot:
    190379-3.png

  4. Run the wsusutil.exe postinstall command on the WSUS server
    Open the CMD as an administrator and navigate to the wsusutil.exe tool(Location: C:\Program Files\Update Services\Tools) Then we should run the command to finish the postinstall, like: wsusutil.exe postinstall SQL_INSTANCE_NAME=SQLSRV CONTENT_DIR=C:\WSUS

Reference screenshot:
190473-4.png
5. Open the SSMS on the SQL Server and run the following command on the New Query to restore the database to the backup:

 RESTORE DATABASE SUSDB
 FROM DISK = 'C:\backup\susdb.bak'
 WITH REPLACE

Hope the above will be helpful.

Best regards,
Rita


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.png (62.2 KiB)
4.png (188.4 KiB)
3.png (39.4 KiB)
· 24
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Rita,
Thanks for this, I followed all the way through with no problems until I got to the last part with the New Query to restore the db to the backup.
I entered in the following:

 RESTORE DATABASE SUSDB
 FROM DISK = 'D:\WIDBackupAPRIL22\widbackupapril22.bak'
 WITH REPLACE

This is the location to the backup of the database I took in step 3.
When I run the above New Query, I got the following error:

 Msg 3102, Level 16, State 1, Line 1
 RESTORE cannot process database 'SUSDB' because it is in use by this session. It is recommended that the master database be used when performing this operation.
 Msg 3013, Level 16, State 1, Line 1
 RESTORE DATABASE is terminating abnormally.
    
 Completion time: 2022-04-06T11:18:50.4618379+01:00

To get around this, I closed the New Query window and selected another DB which was not the one I had wanted to restore.
But now, I get this error:

     Msg 3101, Level 16, State 1, Line 1
     Exclusive access could not be obtained because the database is in use.
     Msg 3013, Level 16, State 1, Line 1
     RESTORE DATABASE is terminating abnormally.
        
     Completion time: 2022-04-06T11:22:45.7643758+01:00


Do you have any ideas on how I can get around this?
Regards
Robert



0 Votes 0 ·
RitaHu-MSFT avatar image RitaHu-MSFT RobertTalks-1707 ·

Hello Robert,

Please try to offline the database and run the commands to restore the DB to the backup.
Reference screenshot:
190670-6.png

Don't forget to bring the DB online after following the above steps.

Hope the above will be helpful. Don't forget to feedback the result if there are any updates of the case.

Have a great day.

Best regards,
Rita

1 Vote 1 ·
6.png (41.5 KiB)

Rita,
Thank you for your helpful response, I did this and it is currently "Executing query" and has been doing this for a while so it looks like this is working,

Oh, as I type, it has just completed. The backup is done. What are the next steps?

Regards
Robert

0 Votes 0 ·
Show more comments