cancel
Showing results for 
Search instead for 
Did you mean: 

BE 15.0.3 The query for jobview failed

MMouse
Level 2

Hi,

We have about 230 Job definitions, 1400 jobs on a 3 month old install on 2012R2.

from 1 day to another, "The query for jobview failed" and the console is rendered useless.

In this case i was instructed to restore the database after the incident occured. After insisting thats not a way forward, they came back its a known issue, and a workarround is to edit the job and save it, and that i should wait for a fix. But as most fixes state, this does not resolve your issue, thus you have to reset your database.....

After this "Work arround" on a P1 case, the ticket was closed.... No date was given on a fix release.

All unacceptable if you ask me...

Reading about this issue, is that somehow, due to one of many bugs, the schedule ID gets mixed or currupted on one or 2 jobs. That breaks the jobview query.

Continuing the investigation, led me to using BECLI as thats still working normal.

First i started checking all jobs, i removed everything that wasnt needed, this lead me to an install agent job, that could not be deleted even through the CLI.

-Although i cannot recommend this i had to delete it through in the Jobs table of the database.

Second as its the work arround i resaved all jobs, this did not lead to a solution.

get-BEBackupDefinition | save-BEBackupDefinition -confirm:0

Because i still had the code at hand, i recreated all the Monthly and Yearly jobs duplication jobs including their schedule.

$tapedrive = Get-BEStorage "RH-LIB-1";
[datetime]$Month = "Saturday, January 23, 2016 2:00:00 AM";
$Monthlymedia = Get-BEMediaSet "3 - Monthly";
$Monthly = New-BESchedule -MonthlyEvery Second -Day Saturday -StartingAt $Month;
$Readyjobs = get-bejob -status ready;

foreach ($job in $readyjobs){;    
    if ($job.name -match "Monthly"){;      
        $def = $job.BackupDefinition | Get-BEBackupDefinition;      
        $def | Remove-BEBackupTask $job.taskname -confirm:0;      
        $def | Add-BEDuplicateStageBackupTask -name $job.taskname -VerifyAsPartOfJob:0 -Schedule $monthly -Storage $tapedrive -TapeStorageMediaSet $Monthlymedia -SourceBackup MostRecentFullBackup;      
        $def | Save-BEBackupDefinition -confirm:0    
    };
};

-No change so far, console still loads blanc.

The next morning 2 jobs show up in the console with invalid schedule.

I edited those 2 jobs, and voila. its working again.

Although i dont know how on the background this fixed the issue, but the general idea is, BECLI still alows job controll. By editing or saving jobs, the misconfiguration will show in the console / repair the job schedules.

No data los, no restores or reijnstalls needed.

Drop me an email if you need more info.

 

3 REPLIES 3

MMouse
Level 2

Removed the Ready part that was a bad copy paste

 

$tapedrive = Get-BEStorage "RH-LIB-1";
[datetime]$Month = "Saturday, January 23, 2016 2:00:00 AM";
$Monthlymedia = Get-BEMediaSet "3 - Monthly";
$Monthly = New-BESchedule -MonthlyEvery Second -Day Saturday -StartingAt $Month;
$jobs = get-bejob;

foreach ($job in $jobs){;    
    if ($job.name -match "Monthly"){;      
        $def = $job.BackupDefinition | Get-BEBackupDefinition;      
        $def | Remove-BEBackupTask $job.taskname -confirm:0;      
        $def | Add-BEDuplicateStageBackupTask -name $job.taskname -VerifyAsPartOfJob:0 -Schedule $monthly -Storage $tapedrive -TapeStorageMediaSet $Monthlymedia -SourceBackup MostRecentFullBackup;      
        $def | Save-BEBackupDefinition -confirm:0    
    };
};

Suresh_S
Level 2

We appreciated your gread effort on this. It would definitly help those who have the same issue

My systems engineer and I were able to gather information and manually edit the SQL database responsible for tracking job information to get this working without all this difficulty.  

First, from the BE command line console, I did a "Get-BEJobs > jobs.txt" command to get a full list of jobs.  Then I went through that list to look for anything that might indicate corrupted job info.  I found one job with the "Schedule" information blank, indicating there was a problem there.  (All jobs should list either "Unscheduled" or a schedule in that line.  If it doesn't have a schedule, it would list "Unscheduled".  A blank listing there indicates information it didn't know how to handle.)  My systems engineer was able to go through the SQL server to find the jobs table and remove that one line from the table.  Once that was done, the whole thing worked again.