Bacula-users

Re: [Bacula-users] BeforeJob script hangs bacula-dir

2008-09-11 09:05:17
Subject: Re: [Bacula-users] BeforeJob script hangs bacula-dir
From: Silver Salonen <silver AT ultrasoft DOT ee>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 11 Sep 2008 16:04:58 +0300
Any ideas at all? May it be because I'm interacting with bacula-dir via 
bconsole in the script? Can the current jobs be listed some other way than 
that?

--
Silver

On Thursday 28 August 2008 09:33:12 Silver Salonen wrote:
> Hello Bacula gurus :)
> 
> I've got an issue with "Run Before Job" script. The script is ran before 
every 
> job (ie. it's in JobDefs resource), but sometimes the job won't run and I 
see 
> that bacula-dir process is hanging eternally while using 99% of CPU. 
Meanwhile 
> Bacula continues its other normal operations etc. It's happening with 
> different versions of Bacula from 2.0 to 2.4.2 (every one of them on 
different 
> versions of FreeBSD, usually 6.x or 7.0). When I kill -9 the hanging bacula-
> dir process, I get an error e-mail from Bacula server saying smth like:
> =====
> 16-Aug 23:05 vanden-dir JobId 891: BeforeJob: run command 
> "/usr/local/etc/bacula/sh/check-job.sh 'frontier-var' '891'"
> 26-Aug 10:03 vanden-dir JobId 891: Error: Runscript: BeforeJob returned non-
> zero status=9. ERR=Child died from signal 9: Kill, unblockable
> =====
> As can be seen from the message, that job had been hanging for 10 days :)
> 
> The script itself is for checking duplicate jobs. It looks like this:
> =====
> #!/bin/sh
> 
> jobName="$1"
> jobId="$2"
> 
> found=`echo "status dir" | /usr/local/sbin/bconsole | grep -v "^ *${jobId}" 
| 
> \
> grep --only-matching " ${jobName}\.[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}.*is 
> \(running\|waiting\)"`
> 
> if [ "$found" != "" ]; then
>         echo "Duplicate job found:$found!"
>         exit 1
> else
>         echo "No duplicate jobs found! :)"
>         exit 0
> fi
> =====
> 
> Any thoughts on what could cause that?
> 
> --
> Silver

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Bacula-users] BeforeJob script hangs bacula-dir, Silver Salonen <=