Solved

Event ID 517 - system state backups failing

Posted on 2013-12-12
6
1,017 Views
Last Modified: 2013-12-18
I'm trying to run a manual backup of system state.  I'm getting an event ID 517 and error 2155347997.  Below is the entire event log error.  What should I try?  

Log Name:      Application
Source:        Microsoft-Windows-Backup
Date:          12/12/2013 7:44:43 PM
Event ID:      517
Task Category: None
Level:         Error
Keywords:      
User:          SYSTEM
Computer:      server.corp.domain.com
Description:
The backup operation that started at '¿2013¿-¿12¿-¿13T01:44:17.261013200Z' has failed with following error code '2155347997' (The operation ended before completion.). Please review the event details for a solution, and then rerun the backup operation once the issue is resolved.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Backup" Guid="{1DB28F2E-8F80-4027-8C5A-A11F7F10F62D}" />
    <EventID>517</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2013-12-13T01:44:43.032213200Z" />
    <EventRecordID>82876</EventRecordID>
    <Correlation />
    <Execution ProcessID="652" ThreadID="5884" />
    <Channel>Application</Channel>
    <Computer>server.corp.domain.com</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="BackupTime">2013-12-13T01:44:17.261013200Z</Data>
    <Data Name="ErrorCode">2155347997</Data>
    <Data Name="ErrorMessage">%%2155347997</Data>
  </EventData>
</Event>
0
Comment
Question by:gopher_49
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 18

Expert Comment

by:Steven Harris
ID: 39715666
Try running the following script in Powershell to identify any invalid paths.

########################################################################### 
# 
# NAME: GetInvalidImagePathsV2.ps1 
# 
# AUTHOR:      Suhas Rao 
# REVISED BY:  Mark Stanfill 
# 
# COMMENT: This script was created to help minimize the time of parsing through the registry searching for invalid ImagePaths 
#          under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services keys. 
# 
#          For more details, search for "Enumeration of the files failed" in a blog posted on: 
#          http://blogs.technet.com/b/askcore/ 
# 
#    Disclaimer: 
#    
#    The sample scripts are not supported under any Microsoft standard support program or service. 
#    The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, 
#    without limitation, any implied warranties of merchantability or of fitness for a particular purpose. 
#    The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. 
#    In no event shall Microsoft, its authors, or anyone else involved in the creation, production, 
#    or delivery of the scripts be liable for any damages whatsoever (including, without limitation,
#    damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) 
#    arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages. 
# 
# 
# VERSION HISTORY: 
# 1.0 - Initial release 
# 2.0 - Included searching for spaces in the path 
# 
###########################################################################

$Verbose = $false;

if (($ARGS.Count -gt 0) -and ($ARGS[0] -ieq "-verbose")) 
{ 
    $Verbose = $true; 
}

# 
# The list of possible reasons for failure 
# 
$FailureReasons = @{ 
                    "INVALID_CHARS"      = "The service path contains invalid characters. " + 
                                           "Characters < > : `" | ? cannot be used in a file path.";
                    "INVALID_FORMAT"     = "The service path does not have a proper path format. " +
                                           "Only paths beginning with [<Drive>]:\ format are supported."; 
                    "DOUBLE_SLASH"       = "The service path contains double inverted slashes. " + 
                                           "UNC Network paths or paths containing double inverted slashes are not supported."; 
                    "RELATIVE_PATH"      = "The service path is relative. " + 
                                           "Only absolute paths are supported."; 
                    "FOWARD_SLASH"       = "The service path contains a foward slash. " + 
                                           "Only paths containing an inverted slash are supported.";
                    "REPARSE_POINT"      = "The service path contains a reparse point. " + 
                                           "Paths containing a reparse point are not supported."; 
                    "UNRECOGNIZED_PATH"  = "Unable to check the path. " + 
                                           "Expecting the ImagePath for the service to be a .dll or .exe"; 
            "SPACE_IN_PATH"      = "The service path contains spaces, " + 
                       "the whole path needs to be enclosed using double quotes";

                   }

# 
# The failure INVALID_CHARS can occur due to the following type of characters 
# 
$InvalidChars   = @{ 
                    "*\\*"   = "DOUBLE_SLASH"; 
                    "*\..\*" = "RELATIVE_PATH"; 
                    "*\.\*"  = "RELATIVE_PATH"; 
                    "*/*"    = "FOWARD_SLASH" 
            
                   }


# 
# Display the service info 
# 
function PrintServiceInfo([System.Management.ManagementObject] $Service, [string] $Header, 
                          [string] $Reason, [string] $Color) 
{ 
    $Name    = $Service.Name 
    $Caption = $Service.Caption 
    $Path    = $Service.PathName 
    $Info    = $FailureReasons.Item($Reason)

    if ($Color -eq "") 
    { 
        $Color = "White" 
    }

    Write-Host "$Header`n" ` 
               "    Service Name    : $Name`n" ` 
               "    Service Caption : $Caption`n" ` 
               "    Registry key    : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\$Name\ImagePath`n" ` 
               "    Value           : $Path`n" ` 
               "    Reason          : $Info`n" ` 
               "`n" ` 
               -ForeGroundColor "$Color" 
}

# 
# For verbose mode, print extra info for every path 
# 
function PrintStatus([Boolean] $IsBadPath) 
{ 
    if ($Verbose -eq $true) 
    { 
        if ($IsBadPath -eq $true) 
        { 
            Write-Host "ERROR" -ForeGroundColor Red; 
        } 
        else 
        { 
            Write-Host "OK" -ForeGroundColor Green; 
        } 
    } 
}

# 
# This is a core function that fetches the service path given the input from registry 
# It expects the service path to be a .dll or .exe 
# 
function GetActualPathFromServiceImagePath([string] $ServiceImagePath) 
{ 
    $ActualPathName = $null 
    $IndexForPath   = $null

    $ExeIndex = $ServiceImagePath.ToLower().IndexOf(".exe"); 
    $DllIndex = $ServiceImagePath.ToLower().IndexOf(".dll");

    ## 
    ## NOTE: Assumption is that the Service Path Always ends in dll or exe 
    ## 
    if(($ExeIndex -eq -1) -and ($DllIndex -eq -1)) 
    { 
        return $null 
    }

    ## 
    ## If the path contains both Dll And Exe then we should use the One that Comes First 
    ## 
    if(($ExeIndex -ne -1) -and ($DllIndex -ne -1)) 
    { 
        if($ExeIndex -gt $DllIndex) 
        { 
            $IndexForPath = $DllIndex +4; 
        } 
        else 
        { 
            $IndexForPath = $ExeIndex +4; 
        } 
    } 
    else 
    { 
        if($ExeIndex -eq -1) 
        { 
            $IndexForPath = $DllIndex +4; 
        } 
        else 
        { 
            $IndexForPath = $ExeIndex +4; 
        } 
    }


    $ActualPathName = $ServiceImagePath.Substring(0,$IndexForPath)

    $Quote = "`"" 
    if($ActualPathName.StartsWith($Quote)) 
    { 
        $ActualPathName = $ActualPathName.Remove(0,1); 
    }

    if ($ActualPathName.StartsWith("\\?\") -or $ActualPathName.StartsWith("\\.\")) 
    { 
        $ActualPathName = $ActualPathName.Substring(4); 
    }

    return $ActualPathName 
}


################################################################################## 
##                                  Main                                        ## 
##################################################################################

$Services         = Get-WmiObject Win32_Service 
$BadServices      = $null 
$Reasons          = $null 
$UnrecognizedPath = 0


for ($i = 0; $i -lt $Services.Count; $i++) 
{ 
    ## 
    ## Get the actual Exe Path 
    ## 
    $ActualPathName = GetActualPathFromServiceImagePath $Services[$i].PathName 
    if($ActualPathName -eq $null) 
    { 
        $Path             = $Services[$i].PathName 
        $Name             = $Services[$i].Name 
        $UnrecognizedPath = 1;

        PrintServiceInfo $Services[$i] "WARNING:" "UNRECOGNIZED_PATH" "Yellow" 
        continue; 
    }


########new 
#######make sure all paths with spaces have double quotes around them

if ( ($Services[$i].PathName -match "^[^\x22].*\s.*\.exe.*" ) -eq $true) 
   { 
    $BadServices += ,$Services[$i]; 
    $Reasons += ,"SPACE_IN_PATH";

    PrintStatus($true); 
    continue;


   }

 

 

    if ($Verbose -eq $true) 
    { 
        Write-Host -nonewline "Analyzing path '$ActualPathName' ..." 
    }

    ## 
    ## Check for Attributes 
    ## 
    if((Test-Path -IsValid $ActualPathName) -eq $False) 
    { 
        $BadServices += ,$Services[$i] ; 
        $Reasons     += ,"INVALID_CHARS";

        PrintStatus($true); 
        continue; 
    }


    ## 
    ## Check for invalid chars 
    ## 
    foreach ($Key in $InvalidChars.Keys) 
    { 
        $Value = $InvalidChars.Item($Key);

        if ($ActualPathName -like $Key) 
        { 
            $temp = $Key.Replace("*","")

            $BadServices += ,$Services[$i] 
            $Reasons     += ,$Value; 
        }

    }

    ## 
    ## The Start string must be in the below specified format 
    ## 
    if((($ActualPathName -match "^[a-z]:\\") -ne $true)) 
    { 
        $BadServices += ,$Services[$i] 
        $Reasons     += ,"INVALID_FORMAT";

        PrintStatus($true); 
        continue; 
    }

    ## 
    ## Check for Reparse points 
    ## 
    $RootPath = [System.IO.Path]::GetPathRoot($ActualPathName)

    
    $Path = $ActualPathName 
    $DoesPathExist = Test-Path -Path $ActualPathName 
    while(($DoesPathExist -eq $true) -and ($Path -ne $RootPath)) 
    {

         $h = [System.IO.File]::GetAttributes($Path);

         if ($h.CompareTo([System.IO.FileAttributes]::ReparsePoint) -ge 0) 
         { 
            $BadServices += ,$Services[$i] 
            $Reasons     += ,"REPARSE_POINT";

            PrintStatus($true); 
            break; 
         }

         if ($Path.Contains("\") -ne $true) 
         { 
             break; 
         }

         $strPath = $Path.Substring(0,$Path.LastIndexOf("\")); 
         $Path    = $strPath 
    }

    PrintStatus($false); 
}


if ($BadServices.Count -gt 0) 
{ 
    echo "" 
    echo "Following are the service(s) found to be reporting invalid paths." 
    echo ""

    for ($i=0; $i-lt$BadServices.Count; $i++) 
    { 
        $Count   = $i + 1 
        PrintServiceInfo $BadServices[$i] "$Count." $Reasons[$i] 
    } 
} 
elseif ($UnrecognizedPath -ne 1) 
{ 
    echo "" 
    Write-Host "No invalid service paths found." -ForeGroundColor Green 
    echo "" 
}

Open in new window



If there are any invalid paths, refer to this MS KB Article.
0
 

Author Comment

by:gopher_49
ID: 39715687
I'm getting an unexpected token error when trying to run this script.
0
 

Author Comment

by:gopher_49
ID: 39715752
Anyone else wanna' chime in?  I really need help on this and I'm getting no where.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 18

Expert Comment

by:Steven Harris
ID: 39716743
Can you provide the entire error message from PowerShell?  This could be something relatively easy to fix.

Also, make sure you check the backup logs for errors:  %windir%\Logs\WindowsServerBackup
0
 

Accepted Solution

by:
gopher_49 earned 0 total points
ID: 39718166
I fixed it via the link below.  I had the EXACT same invalid system variable in the registry.  It was pointing to an invalid drive/path.  It was the same vbox application noted in the link below.

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/SBS_Small_Business_Server/Q_27923910.html
0
 

Author Closing Comment

by:gopher_49
ID: 39726228
Found answer in another post.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
A safe way to clean winsxs folder from your windows server 2008 R2 editions
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question