WSUS – Error during Cleanup wizard -SQL Timeout

December 23, 2016 Leave a comment

Problem
When attempting to perform a WSUS Server Cleanup on the WSUS Server always getting a error and have to ‘Reset Server Node’.
Checking the Event Viewer showed the following error;
Log Name:      Application
Source:        Windows Server Update Services
Date:          23/12/2016 9:42:55 AM
Event ID:      7042
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      Server.domain.local
Description:
The WSUS administration console was unable to connect to the WSUS Server Database.
Verify that SQL server is running on the WSUS Server. If the problem persists, try restarting SQL.
System.Data.SqlClient.SqlException — Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated.
Source
.Net SqlClient Data Provider
Stack Trace:
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at Microsoft.UpdateServices.UI.SnapIn.Wizards.ServerCleanup.ServerCleanupWizard.OnCleanupComplete(Object sender, PerformCleanupCompletedEventArgs e)
Event Xml:

7042
3
0
0x80000000000000

122805
Application
Server.domain.local

The WSUS administration console was unable to connect to the WSUS Server Database.
Verify that SQL server is running on the WSUS Server. If the problem persists, try restarting SQL.
System.Data.SqlClient.SqlException — Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated.
Source
.Net SqlClient Data Provider
Stack Trace:
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at Microsoft.UpdateServices.UI.SnapIn.Wizards.ServerCleanup.ServerCleanupWizard.OnCleanupComplete(Object sender, PerformCleanupCompletedEventArgs e)
Resolution
I have found there are two ways to resolve this issue;
Firstly…
For those less experienced in SQL, here is the process:
1. Enable “named pipes” access for the Microsoft##WID database. Access wasn’t enabled on mine initially.
2. Open SSMS (SQL Server Management Studio and enter “\\.\pipe\MICROSOFT##WID\tsql\query” under server name.
3. Click “options” and select “Named Pipes” under “Network protocol” under the “Connection Properties” tab
4. Click “connect”
5. Execute a query for:
USE SUSDB
GO
exec spGetObsoleteUpdatesToCleanup
You will see a list of obsolete updates pop up. Take note of these UpdateID’s.
6. Execute “exec spDeleteUpdate @localUpdateID=000000” where 000000=UpdateID

Another option is to increase the timeout on the sql server.
Extend Timeout (f.e. for Cleanup-Wizard)
Connect to SQL via: Extend Timeout (f.e. for Cleanup-Wizard)
Connect to SQL via: \\\.\pipe\MICROSOFT##WID\tsql\query
Right click on \\.\pipe\MICROSOFT##WID\tsql\query (first in the row on the left)
Select Properties
Select Connections
Set timeout from default 600 to 1200 (or greater, avoid 0 as this is unlimited and not best practise).

Content Index Failed – Microsoft Exchange Search Service Constantly Crashing

December 21, 2016 Leave a comment

Problem

Single Microsoft Server 2012, Exchange 2013 server.
There are 4 Database Files (e.g. DB01, DB02, DB03, PFDB).

There was one Database showing the ContentIndexState as ‘FailedandSuspended’.
Administrator performed the following in an attempt to resolve the issue;
[PS] C:\>stop-service MSExchangeFastSearch
[PS] C:\>stop-service HostControllerService
Deleted the catalog index location folders.
[PS] C:\>start-service MSExchangeFastSearch
[PS] C:\>start-service HostControllerService
The catalog index location folders are recreated and the crawling begins.

Very shortly after the Microsoft Exchange Search service restarts and the following error is logged to the System Event Viewer log.
Event ID 7031, System, Service Control Manager
The Microsoft Exchange Search service terminated unexpectedly. It has done this 1 time(s).
The following corrective action will be taken in 5000 milliseconds: Restart the service.

In the Application Event Viewer log the following warning and error are logged also. Unsure of the relevance of these two but thought I better put here for completeness.
Event ID 10015, Application, MSExchange Mid-Tier Storage
Active Manager Client already doing query for object ‘SERVER’ on another thread, however this thread didn’t complete in 100 msec.

Event ID 4999, Application, MSExchangeCommon
Watson report about to be sent for process id: 2284, with parameters: E12IIS, c-RTL-AMD64, 15.00.1236.003, M.E.Search.Service, unknown, M.E.D.D.A.SessionSettingsFactory.FromOrganizationIdWithoutRbacScopesServiceOnly, System.ArgumentNullException, a135, unknown.
ErrorReportingEnabled: True

This situation loops and loops, I had to disable the Microsoft Exchange Search service to stop the process until I could resolve the issue.

Resolution

I have resolved this issue by following these steps;

  1. Double Checked there was a Group in AD named ContentSubmitters.
    Ensured that ‘Domain Admins’ and ‘NETWORK SERVICE’ was added to Security tab with Full Rights.
  2. Download CU15 and extract to C:\Temp
  3. Run CMD as Administrator and complete the following commands
    C:\Temp\setup.exe /PrepareAD /IAcceptExchangeServerLicenseTerms
    C:\Temp\setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms
    C:\Temp\setup.exe /PrepareDomain /IAcceptExchangeServerLicenseTerms
    C:\Temp\setup.exe /IAcceptExchangeServerLicenseTerms
  4. Restart Server
  5. Enabled service ‘Microsoft Exchange Search’ (which was previously disabled due to main issue’.
  6. Run PowerShell as Administrator and complete the following commands
    C:\>stop-service MSExchangeFastSearch
    C:\>stop-service HostControllerService
  7. Navigate to the location of the content index folders for the database/s, this can be found out via the following PowerShell command. If you have multiple databases (as I do) may need to run for each database.
    C:\>Get-MailboxDatabase DB01 | select EdbFilePath
  8. In this path there will be a folder named after the GUID of each database. Delete the folder/s
  9. Run PowerShell as Administrator and complete the following commands
    C:\>start-service MSExchangeFastSearch
    C:\>start-service HostControllerService
  10. The content indexes will be rebuilt, which can take some time. Eventually the content indexes were healthy again. Can use the following PS commands to check status;
    C:\>Get-MailboxDatabaseCopyStatus * | ft -auto
    C:\>Get-MailboxDatabaseCopyStatus | FL Name,*Index*
  11. I then double checked Event Viewer for any further errors.

ReadyNAS – Lost Permissions / No Access

December 12, 2016 Leave a comment

Problem
ReadyNAS 2120 was exhibiting strange behaviour with permissions. Via network access the shared folders were visible but permission was denied when attempting to browse. When accessing the ReadyNAS via the web portal the shares would not show up at all. Sometimes when rebooting the web page would just refresh the front page and couldn’t access any of webpage to make changes or investigate. The odd time that configuration/share pages would appear, it would take ages for any changes to take affect.

Investigation/Explanation
I searched for a decent amount of hours as usually someone has experienced similar on the web however not much came up. There were a few similar scenarios, enough to suggest there was corruption and the only way was to factory reset to default. The problem with that is that it would also lose data. This was not really an option! I was unable to get into the ReadyNAS via web to allow any protocols (e.g. SSH, FTP etc.), however knowing that the share was viewable on the network I sort of assumed that SMB was working and perhaps just the AD permissions were not working.

Resolution
To resolve the issue I had to get the data off the NAS, which I did using the following steps, and using XXCOPY (which is my preferred copy tool, this would work with robocopy, xcopy etc.,) however XXCOPY has switches to do incremental per se;
Run CMD as Administrator…
c:\>cd Windows\System32
c:\Windows\System32>net use * /DELETE
c:\Windows\System32>net use \\172.16.0.100\BigFolder /user:Domain\Administrator
c:\Windows\System32>xxcopy \\172.16.0.26\BigFolder j:\Backups\BigFolder /H/K0/K/KS/E/BB/R/Q/Y/PB/C

Once data was backed up to external drive (plugged into my local lappy) I then performed a factory reset and started again, this time with a working backup 🙂

Windows Store failed to sync machine licenses. Result code 0x80070002

November 29, 2016 Leave a comment

Problem
Log Name: Microsoft-WS-Licensing/Admin
Source: Microsoft-WS-Licensing
Date: 18/10/2016 3:52:15 PM
Event ID: 512
Task Category: None
Level: Error
Keywords: Service Keyword
User: DOMAIN\administrator
Computer: server.domain.local
Description: Windows Store failed to sync machine licenses. Result code 0x80070002
Event Xml:
<Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event”&gt;
<System>
<Provider Name=”Microsoft-WS-Licensing” Guid=”{ED76D77F-7FB5-4EE4-8268-EE46212CB2D3}” />
<EventID>512</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x2000000000000001</Keywords>
<TimeCreated SystemTime=”2016-10-18T05:22:15.694926800Z” />
<EventRecordID>127</EventRecordID>
<Correlation />
<Execution ProcessID=”6692″ ThreadID=”6252″ />
<Channel>Microsoft-WS-Licensing/Admin</Channel>
<Computer>server.domain.local</Computer>
<Security UserID=”S-1-5-21-1324492469-2274245932-2023616121-500″ />
</System>
<EventData>
<Data Name=”HRESULT”>2147942402</Data>
</EventData>
</Event>

Explanation
Scheduled Task syncing app licenses for Microsoft Store. it has a requirement to sign in to the store with a Microsoft account. This is a production server and is never used nor required.

Resolution
Disable the WSRefreshBannedAppsListTask task in Task Scheduler.

Access to drivers on Windows Update was blocked by policy

November 29, 2016 Leave a comment

Problem
Log Name: Microsoft-Windows-DeviceSetupManager/Admin
Source: Microsoft-Windows-DeviceSetupManager
Date: 18/10/2016 3:44:20 PM
Event ID: 122
Task Category: None
Level: Warning
Keywords:
User: SYSTEM
Computer: server.domain.local
Description: Access to drivers on Windows Update was blocked by policy
Event Xml:
<Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event”&gt;
<System>
<Provider Name=”Microsoft-Windows-DeviceSetupManager” Guid=”{FCBB06BB-6A2A-46E3-ABAA-246CB4E508B2}” />
<EventID>122</EventID>
<Version>0</Version>
<Level>3</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x4000000000000000</Keywords>
<TimeCreated SystemTime=”2016-10-18T05:14:20.860369100Z” />
<EventRecordID>1413</EventRecordID>
<Correlation />
<Execution ProcessID=”896″ ThreadID=”3480″ />
<Channel>Microsoft-Windows-DeviceSetupManager/Admin</Channel>
<Computer>server.domain.local</Computer>
<Security UserID=”S-1-5-18″ />
</System>
<EventData>
</EventData>
</Event>

Resolution
If you open “Devices and Printers” in Control Panel, you might see a small pop-down about displaying enhanced device icons. right click that bar and select “Open device installation settings”.
If you change the setting to “Always install the best driver software from Windows Update.” then the EventID 122 errors will go away.
If you *also* select the “Automatically get the device app and info provided by your manufacturer” then the whole setting will change itself to the first “Yes, do this automatically” option (so the first option is the same as selecting both the bottom ones)
Whether you want to do this or not is on you!

Windows 10 issue where the Start Menu and Cortana to lock up and become unusable

November 29, 2016 Leave a comment

Problem
Windows 10 issue where the Start Menu and Cortana to lock up and become unusable. Here’s how to fix the Windows 10 Start menu.

Resolution
Run powershell as Admin
Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}

Symantec Backup Exec 15 after Windows Updates was unable to connect to the BEDB Database

November 29, 2016 Leave a comment

Problem
Running Symantec Backup Exec 15 after Windows Updates and a restart was unable to connect to the BEDB Database.

Resolution
Uninstall .NET Framework 4.6.1 by going to Control Panel > Programs > Programs and Features > View Installed Updates. Search for or scroll down the list of Microsoft Windows updates to find Update for Microsoft Windows (KB3102467) and click Uninstall. After a restart all was good.