WSUS Server – How to Fix Local Content Not Being Seen

windows-server-2019wsus

I have a Windows Server 2019 running as a WSUS server. I just rebuilt it because of some database connection issues moving from one server to another. SO this is a fresh install. This is not connected to the internet as I exported the data from one machine and imported it to this one. After the import I ran the Clean-WSUS script from Adam. I approved 3 updates.

Now the Download Status says 0.00MB or 531.00MB.

Its been like that for half an hour now and it still doesn't see the files. I have moved over the content to the content folder but it still isn't seeing it. Anything I can check to see why it isn't seeing the content?

Logs are showing there is SOAP errors ErrorCode=InvalidCookie on some of the virtual pools like ClientAuth a few others.

UPDATE 1
Found this in teh Software Distribution Log.

2020-02-20 14:45:14.214 UTC Warning w3wp.183    SoapUtilities.CreateException   ThrowException: actor = http://WSUS-SERVER:8530/ClientWebService/client.asmx, ID=e37f37f0-72c8-4184-ba99-1abfd451e4fa, ErrorCode=InvalidCookie, Message=, Client=?
2020-02-20 14:50:10.581 UTC Warning w3wp.517    SoapUtilities.CreateException   ThrowException: actor = http://WSUS-SERVER:8530/ClientWebService/client.asmx, ID=f0c77d21-4a7b-49f8-9cb1-7c22e25dc0d8, ErrorCode=ConfigChanged, Message=, Client=0f080754-49b3-46f1-ab1e-c318bfe38998
2020-02-20 14:50:17.831 UTC Info    w3wp.1220   ThreadEntry ThreadPoolWorkQueue.Dispatch
2020-02-20 14:50:17.831 UTC Warning w3wp.1220   DBConnection.OnReceivingInfoMessage  The join order has been enforced because a local join hint is used.
2020-02-20 14:50:17.847 UTC Info    w3wp.201    ThreadEntry TimerQueue.FireNextTimers
2020-02-20 14:50:17.847 UTC Warning w3wp.201    DBConnection.OnReceivingInfoMessage  The join order has been enforced because a local join hint is used.
2020-02-20 15:11:48.047 UTC Warning w3wp.554    SoapUtilities.CreateException   ThrowException: actor = http://WSUS-SERVER:8530/ClientWebService/client.asmx, ID=e83449d7-7a9e-4104-9eed-e632b6a6a495, ErrorCode=ConfigChanged, Message=, Client=3aee7b99-3cc6-47a6-8a86-c0056488f3a6
2020-02-20 15:13:27.902 UTC Info    w3wp.1469   ThreadEntry ThreadPoolWorkQueue.Dispatch
2020-02-20 15:13:27.902 UTC Warning w3wp.1469   DBConnection.OnReceivingInfoMessage  The join order has been enforced because a local join hint is used.
2020-02-20 15:20:49.611 UTC Warning w3wp.656    UnencryptedCookieData.Deserialize   Argument exceptioninvalid header
Parameter name: bytes
2020-02-20 15:20:49.626 UTC Warning w3wp.656    EncryptionHelper.DecryptData    Argument exceptionMicrosoft.UpdateServices.Internal.Authorization.LoggedArgumentException: invalid header
Parameter name: bytes
   at Microsoft.UpdateServices.Internal.Authorization.UnencryptedCookieData.Deserialize(Byte[] bytes)
   at Microsoft.UpdateServices.Internal.Authorization.EncryptionHelper.DecryptData(Byte[] cookieData)
Parameter name: cookieData
2020-02-20 15:20:49.626 UTC Warning w3wp.656    SoapUtilities.CreateException   ThrowException: actor = http://WSUS-SERVER:8530/ClientWebService/client.asmx, ID=1313dd75-59e9-4db0-a18f-bf59e7d7ca52, ErrorCode=InvalidCookie, Message=, Client=?

Notice it says InvalidCookie for amy of the virtual app pools. I have also torn down WSUS and IIS and rebuilt them and it still gets this error.

Best Answer

Even though it is a new build, if you are migrating your data with a wsusutil.exe export/import, then it can technically be considered a broken WSUS install instead of a new build.

Referencing https://docs.microsoft.com/de-de/security-updates/windowsupdateservices/18127395, I would use the wsusutil.exe reset command, which would

Checks that every update metadata row in the database has corresponding update files stored in the file system. If update files are missing or have been corrupted, WSUS downloads the update files again.

This step is listed as for:

  • After restoring the WSUS database.
  • When troubleshooting

Additionally, from that same Microsoft article, we have

You can use xcopy, the Backup utility, or other non-WSUS specific methods to copy update files from the old location into the new one. If you copy the files by using a method other than WSUSutil.exe, you still need to run WSUSutil.exe to perform the second part of the move. In this case you would use the skipcopy parameter when running WSUSutil.exe.

wsusutil movecontent contentpath logfile -skipcopy where

contentpath is the new root for content files. The path must exist.

and

logfile is the path and file name of the log file to create.