05 March 2014

VSS Writer showing retryable error and how to reset them

When backups fail with exchange, one of the first things i look for are the VSS writers.
These writers create a snapshot function for Windows and third party backup products.

If the status shown is "Retryable error", "Waiting for completion" and a status other than "Stable" things might go wrong.
I say might because the error shown is the writers last state, not the actual state.

To check the status in a command box:

vssadmin list writers

To check the status in Powershell:


& vssadmin list writers | Select-String -Context 0,4 '^writer name:' | ? {
  $_.Context.PostContext[2].Trim() -ne "state: [1] stable" -or
  $_.Context.PostContext[3].Trim() -ne "last error: no error"
}

Or:

vssadmin list writers | fl name,state,last*

All show this output:

PS C:\> vssadmin list writers | fl name,state,last*
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2005 Microsoft Corp.

Writer name: 'Task Scheduler Writer'
   Writer Id: {d61d61c8-d73a-4eee-8cdd-f6f9786b7124}
   Writer Instance Id: {1bddd48e-5052-49db-9b07-b96f96727e6b}
   State: [1] Stable
   Last error: No error

Writer name: 'VSS Metadata Store Writer'
   Writer Id: {75dfb225-e2e4-4d39-9ac9-ffaff65ddf06}
   Writer Instance Id: {088e7a7d-09a8-4cc6-a609-ad90e75ddc93}
   State: [1] Stable
   Last error: No error

Writer name: 'Performance Counters Writer'
   Writer Id: {0bada1de-01a9-4625-8278-69e735f39dd2}
   Writer Instance Id: {f0086dda-9efc-47c5-8eb6-a944c3d09381}
   State: [1] Stable
   Last error: No error

To resolve the error and get back to a healthy writer state, you could do one of the following:


  • Restart your server
  • Reboot the corresponding service (see the table below)

VSS WriterService NameService Display Name
ASR WriterVSSVolume Shadow Copy
BITS WriterBITSBackground Intelligent Transfer Service
COM+ REGDB WriterVSSVolume Shadow Copy
DFS Replication service writerDFSRDFS Replication
DHCP Jet WriterDHCPServerDHCP Server
FRS WriterNtFrsFile Replication
FSRM writersrmsvcFile Server Resource Manager
IIS Config WriterAppHostSvcApplication Host Helper Service
IIS Metabase WriterIISADMINIIS Admin Service
Microsoft Exchange Writer
Microsoft Exchange Writer
MSExchangeIS
MSExchangeRepl
Microsoft Exchange Information Store
Microsoft Exchange Replication
Microsoft Hyper-V VSS WritervmmsHyper-V Virtual Machine Management
NTDSNTDSActive Directory Domain Services
OSearch VSS WriterOSearchOffice SharePoint Server Search
OSearch14 VSS WriterOSearch14SharePoint Server Search 14
Registry WriterVSSVolume Shadow Copy
Shadow Copy Optimization WriterVSSVolume Shadow Copy
SPSearch VSS WriterSPSearchWindows SharePoint Services Search
SPSearch4 VSS WriterSPSearch4SharePoint Foundation Search V4
SqlServerWriterSQLWriterSQL Server VSS Writer
System WriterCryptSvcCryptographic Services
TermServLicensingTermServLicensingRemote Desktop Licensing
WMI WriterWinmgmtWindows Management Instrumentation


I will be trying to get a script to check, report and restart the corresponding service for this.
Stay tuned.




3 comments:

  1. Please let us know the code to find the service name for each writer under vssadmin.

    ReplyDelete
  2. The following code will check all the VSS writers. When one of those writers are in a failed state or not stable it will restart the corresponding service.

    $servicearray = @{
    'ASR Writer' = 'VSS';
    'Bits Writer' = 'BITS';
    'Certificate Authority' = 'EventSystem';
    'COM+ REGDB Writer' = 'VSS';
    'Dedup Writer' = 'ddpvssvc';
    'DFS Replication service writer' = 'DFSR';
    'Dhcp Jet Writer' = 'DHCPServer';
    'FRS Writer' = 'NtFrs';
    'IIS Config Writer' = 'AppHostSvc';
    'IIS Metabase Writer' = 'IISADMIN';
    'Microsoft Exchange Replica Writer' = 'MSExchangeRepl';
    'Microsoft Exchange Writer' = 'MSExchangeIS';
    'Microsoft Hyper-V VSS Writer' = 'vmms';
    'MSSearch Service Writer' = 'WSearch';
    'NPS VSS Writer' = 'EventSystem';
    'NTDS' = 'EventSystem';
    'OSearch VSS Writer' = 'OSearch';
    'OSearch14 VSS Writer' = 'OSearch14';
    'OSearch15 VSS Writer' = 'OSearch15';
    'Registry Writer' = 'VSS';
    'Shadow Copy Optimization Writer' = 'VSS';
    'Sharepoint Services Writer' = 'SPWriter';
    'SPSearch VSS Writer' = 'SPSearch';
    'SPSearch4 VSS Writer' = 'SPSearch4';
    'SqlServerWriter' = 'SQLWriter';
    'System Writer' = 'CryptSvc';
    'TermServLicensing' = 'TermServLicensing';
    'WDS VSS Writer' = 'WDSServer';
    'WIDWriter' = 'WIDWriter';
    'WINS Jet Writer' = 'WINS';
    'WMI Writer' = 'Winmgmt';
    }

    $vssadminerror = vssadmin list writers | Select-String -Context 0,4 'writer name:' | Where-Object { $_.Context.PostContext[2].Trim() -ne "state: [1] stable" -or $_.Context.PostContext[3].Trim() -ne "last error: no error"}
    foreach($i in $vssadminerror)
    {
    $I = $i.tostring()
    $servicestring = $i.split("`r`n") | select -first 1
    $servicename = $servicestring.split("'") | select -first 2 | select -last 1
    $temp = $servicearray.$servicename
    get-service $temp | restart-service -force
    }

    Greetings from: Robbert Z.

    ReplyDelete
  3. Anonymous25/4/18 12:08

    'FSRM writer' ='srmsvc';

    ReplyDelete